Revision 628eba87
Von Philip Reetz vor fast 19 Jahren hinzugefügt
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 |
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
Probleme bei der Behandlung von Buchungen mit Steuerkorrektur behoben