Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b14e1fdd

Von Moritz Bunkus vor fast 18 Jahren hinzugefügt

  • ID b14e1fdd2128a73214a2c7f54fa6a4c951458d9d
  • Vorgänger f4d0698c
  • Nachfolger 1565e04f

Recommit von rr978 von preetz: Probleme bei der Behandlung von Buchungen mit Steuerkorrektur behoben

Unterschiede anzeigen:

SL/AP.pm
100 100
    $form->{AP_amounts}{"amount_$i"}{taxkey} = $form->{"taxkey_$i"};
101 101

  
102 102
    $sth->finish;
103
    if (!$form->{"korrektur_$i"}) {
104
      if ($form->{taxincluded} *= 1) {
103
    if ($form->{taxincluded} *= 1) {
104
      if (!$form->{"korrektur_$i"}) {
105 105
        $tax =
106 106
          $form->{"amount_$i"} -
107 107
          ($form->{"amount_$i"} / ($form->{"taxrate_$i"} + 1));
108
        $amount = $form->{"amount_$i"} - $tax;
109
        $form->{"amount_$i"} = $form->round_amount($amount, 2);
110
        $diff += $amount - $form->{"amount_$i"};
111
        $form->{"tax_$i"} = $form->round_amount($tax, 2);
112
        $form->{netamount} += $form->{"amount_$i"};
113 108
      } else {
109
        $tax = $form->{"tax_$i"};
110
      }
111
      $amount = $form->{"amount_$i"} - $tax;
112
      $form->{"amount_$i"} = $form->round_amount($amount, 2);
113
      $diff += $amount - $form->{"amount_$i"};
114
      $form->{"tax_$i"} = $form->round_amount($tax, 2);
115
      $form->{netamount} += $form->{"amount_$i"};
116
    } else {
117
      if (!$form->{"korrektur_$i"}) {
114 118
        $form->{"tax_$i"} = $form->{"amount_$i"} * $form->{"taxrate_$i"};
115
        $form->{"tax_$i"} =
116
          $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2);
117
        $form->{netamount} += $form->{"amount_$i"};
118 119
      }
120
      $form->{"tax_$i"} =
121
        $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2);
122
      $form->{netamount} += $form->{"amount_$i"};
119 123
    }
120
    $form->{total_tax} += $form->{"tax_$i"} * -1;
124
    $form->{total_tax} += $form->{"tax_$i"};
121 125
  }
122 126

  
123 127
  # adjust paidaccounts if there is no date in the last row

Auch abrufbar als: Unified diff