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/AR.pm
103 103
    $form->{AR_amounts}{"amount_$i"}{taxkey} = $form->{"taxkey_$i"};
104 104

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

  

Auch abrufbar als: Unified diff