Revision 9feb246d
Von Philip Reetz vor etwa 19 Jahren hinzugefügt
bin/mozilla/gl.pl | ||
---|---|---|
160 | 160 |
if ($tax && ($ref->{accno} eq $taxaccno)) { |
161 | 161 |
$form->{"tax_$j"} = abs($ref->{amount}); |
162 | 162 |
$form->{"taxchart_$j"} = $ref->{taxkey} . "--" . $ref->{taxrate}; |
163 |
if ($form->{taxincluded}) { |
|
164 |
if ($ref->{amount} < 0) { |
|
165 |
$form->{"debit_$j"} += $form->{"tax_$j"}; |
|
166 |
} else { |
|
167 |
$form->{"credit_$j"} += $form->{"tax_$j"}; |
|
168 |
} |
|
169 |
} |
|
163 | 170 |
} else { |
164 | 171 |
$form->{"accno_$i"} = "$ref->{accno}--$ref->{accnotaxkey}"; |
165 | 172 |
for (qw(fx_transaction source memo)) { $form->{"${_}_$i"} = $ref->{$_} } |
... | ... | |
1068 | 1075 |
} else { |
1069 | 1076 |
if ($form->{"debit_$i"} != 0) { |
1070 | 1077 |
$form->{totaldebit} += $form->{"debit_$i"}; |
1071 |
$form->{totaldebit} += $form->{"tax_$i"}; |
|
1078 |
if (!$form->{taxincluded}) { |
|
1079 |
$form->{totaldebit} += $form->{"tax_$i"}; |
|
1080 |
} |
|
1072 | 1081 |
} else { |
1073 | 1082 |
$form->{totalcredit} += $form->{"credit_$i"}; |
1074 |
$form->{totalcredit} += $form->{"tax_$i"}; |
|
1083 |
if (!$form->{taxincluded}) { |
|
1084 |
$form->{totalcredit} += $form->{"tax_$i"}; |
|
1085 |
} |
|
1075 | 1086 |
} |
1076 | 1087 |
|
1077 | 1088 |
for (qw(debit credit tax)) { |
... | ... | |
1596 | 1607 |
} |
1597 | 1608 |
if ($form->{taxincluded}) { |
1598 | 1609 |
$form->{"tax_$i"} = $amount / ($rate + 1) * $rate; |
1610 |
if ($debitcredit) { |
|
1611 |
$form->{"debit_$i"} = $form->{"debit_$i"} - $form->{"tax_$i"}; |
|
1612 |
} else { |
|
1613 |
$form->{"credit_$i"} = $form->{"credit_$i"} - $form->{"tax_$i"}; |
|
1614 |
} |
|
1599 | 1615 |
} else { |
1600 | 1616 |
$form->{"tax_$i"} = $amount * $rate; |
1601 | 1617 |
} |
... | ... | |
1629 | 1645 |
)); |
1630 | 1646 |
} |
1631 | 1647 |
if ($form->{taxincluded}) { |
1632 |
$debit += $dr; |
|
1633 |
$credit += $cr; |
|
1648 |
if ($dr) { |
|
1649 |
$debit += $dr + $tax; |
|
1650 |
} |
|
1651 |
if ($cr) { |
|
1652 |
$credit += $cr + $tax; |
|
1653 |
} |
|
1634 | 1654 |
$taxtotal += $tax; |
1635 | 1655 |
} else { |
1636 | 1656 |
if ($dr) { |
Auch abrufbar als: Unified diff
Bug#205 behoben. Beim Dialogbuchen werden nun auch MwSt. inkl. Buchungen korrekt verarbeitet