Revision 12727b13
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
968 | 968 |
} |
969 | 969 |
} |
970 | 970 |
|
971 |
# Invoice Summary includes Rounding |
|
972 |
my $rounding = $form->round_amount( |
|
973 |
$form->round_amount($netamount + $tax, 2, 1) - $form->round_amount($netamount + $tax, 2), 2 |
|
974 |
); |
|
975 |
my $rnd_accno = $rounding == 0 ? 0 |
|
976 |
: $rounding > 0 ? $form->{rndgain_accno} |
|
977 |
: $form->{rndloss_accno}; |
|
978 |
$form->{amount}{ $form->{id} }{ $form->{AR} } = $form->round_amount($netamount + $tax, 2, 1); |
|
971 |
$form->{amount}{ $form->{id} }{ $form->{AR} } = $netamount + $tax; |
|
979 | 972 |
$form->{paid} = |
980 | 973 |
$form->round_amount($form->{paid} * $form->{exchangerate} + $diff, 2); |
981 | 974 |
|
... | ... | |
1080 | 1073 |
do_query($form, $dbh, $query, @values); |
1081 | 1074 |
} |
1082 | 1075 |
} |
1083 |
if (!$payments_only && ($rnd_accno != 0)) { |
|
1084 |
$query = |
|
1085 |
qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, tax_id, taxkey, project_id, chart_link) |
|
1086 |
VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, (SELECT id FROM tax WHERE taxkey=0), 0, ?, (SELECT link FROM chart WHERE accno = ?))|; |
|
1087 |
@values = (conv_i($trans_id), $rnd_accno, $rounding, conv_date($form->{invdate}), conv_i($project_id), $rnd_accno); |
|
1088 |
do_query($form, $dbh, $query, @values); |
|
1089 |
$rnd_accno = 0; |
|
1090 |
} |
|
1091 | 1076 |
} |
1092 | 1077 |
|
1093 | 1078 |
# deduct payment differences from diff |
... | ... | |
1252 | 1237 |
return; |
1253 | 1238 |
} |
1254 | 1239 |
|
1255 |
$amount = $form->round_amount( $netamount + $tax, 2, 1);
|
|
1240 |
$amount = $netamount + $tax;
|
|
1256 | 1241 |
|
1257 | 1242 |
# save AR record |
1258 | 1243 |
#erweiterung fuer lieferscheinnummer (donumber) 12.02.09 jb |
... | ... | |
1897 | 1882 |
(SELECT c.accno FROM chart c WHERE d.income_accno_id = c.id) AS income_accno, |
1898 | 1883 |
(SELECT c.accno FROM chart c WHERE d.expense_accno_id = c.id) AS expense_accno, |
1899 | 1884 |
(SELECT c.accno FROM chart c WHERE d.fxgain_accno_id = c.id) AS fxgain_accno, |
1900 |
(SELECT c.accno FROM chart c WHERE d.fxloss_accno_id = c.id) AS fxloss_accno, |
|
1901 |
(SELECT c.accno FROM chart c WHERE d.rndgain_accno_id = c.id) AS rndgain_accno, |
|
1902 |
(SELECT c.accno FROM chart c WHERE d.rndloss_accno_id = c.id) AS rndloss_accno |
|
1885 |
(SELECT c.accno FROM chart c WHERE d.fxloss_accno_id = c.id) AS fxloss_accno |
|
1903 | 1886 |
${query_transdate} |
1904 | 1887 |
FROM defaults d|; |
1905 | 1888 |
|
Auch abrufbar als: Unified diff
Revert "Belege runden, und Rundungsdifferenzen auf Extrakonten buchen."
This reverts commit 422f2f17365ea7879c14b902c5db1e4cd7023e48.