Revision 12727b13
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
SL/DB/MetaSetup/Default.pm | ||
---|---|---|
91 | 91 |
revtrans => { type => 'boolean', default => 'false' }, |
92 | 92 |
rfqnumber => { type => 'text' }, |
93 | 93 |
rmanumber => { type => 'text' }, |
94 |
rndgain_accno_id => { type => 'integer' }, |
|
95 |
rndloss_accno_id => { type => 'integer' }, |
|
96 | 94 |
sales_delivery_order_show_delete => { type => 'boolean', default => 'true' }, |
97 | 95 |
sales_order_show_delete => { type => 'boolean', default => 'true' }, |
98 | 96 |
sales_purchase_order_ship_missing_column => { type => 'boolean', default => 'false' }, |
SL/Form.pm | ||
---|---|---|
2886 | 2886 |
d.closedto, d.revtrans, |
2887 | 2887 |
(SELECT cu.name FROM currencies cu WHERE cu.id=d.currency_id) AS defaultcurrency, |
2888 | 2888 |
(SELECT c.accno FROM chart c WHERE d.fxgain_accno_id = c.id) AS fxgain_accno, |
2889 |
(SELECT c.accno FROM chart c WHERE d.fxloss_accno_id = c.id) AS fxloss_accno, |
|
2890 |
(SELECT c.accno FROM chart c WHERE d.rndgain_accno_id = c.id) AS rndgain_accno, |
|
2891 |
(SELECT c.accno FROM chart c WHERE d.rndloss_accno_id = c.id) AS rndloss_accno |
|
2889 |
(SELECT c.accno FROM chart c WHERE d.fxloss_accno_id = c.id) AS fxloss_accno |
|
2892 | 2890 |
FROM defaults d|; |
2893 | 2891 |
$ref = selectfirst_hashref_query($self, $dbh, $query); |
2894 | 2892 |
map { $self->{$_} = $ref->{$_} } keys %$ref; |
... | ... | |
2901 | 2899 |
current_date AS transdate, d.closedto, d.revtrans, |
2902 | 2900 |
(SELECT cu.name FROM currencies cu WHERE cu.id=d.currency_id) AS defaultcurrency, |
2903 | 2901 |
(SELECT c.accno FROM chart c WHERE d.fxgain_accno_id = c.id) AS fxgain_accno, |
2904 |
(SELECT c.accno FROM chart c WHERE d.fxloss_accno_id = c.id) AS fxloss_accno, |
|
2905 |
(SELECT c.accno FROM chart c WHERE d.rndgain_accno_id = c.id) AS rndgain_accno, |
|
2906 |
(SELECT c.accno FROM chart c WHERE d.rndloss_accno_id = c.id) AS rndloss_accno |
|
2902 |
(SELECT c.accno FROM chart c WHERE d.fxloss_accno_id = c.id) AS fxloss_accno |
|
2907 | 2903 |
FROM defaults d|; |
2908 | 2904 |
$ref = selectfirst_hashref_query($self, $dbh, $query); |
2909 | 2905 |
map { $self->{$_} = $ref->{$_} } keys %$ref; |
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 |
|
SL/OE.pm | ||
---|---|---|
690 | 690 |
my $tax = 0; |
691 | 691 |
map { $tax += $form->round_amount($taxaccounts{$_}, 2) } keys %taxaccounts; |
692 | 692 |
|
693 |
$amount = $form->round_amount($netamount + $tax, 2, 1);
|
|
693 |
$amount = $form->round_amount($netamount + $tax, 2); |
|
694 | 694 |
$netamount = $form->round_amount($netamount, 2); |
695 | 695 |
|
696 | 696 |
if ($form->{currency} eq $form->{defaultcurrency}) { |
... | ... | |
956 | 956 |
(SELECT c.accno FROM chart c WHERE d.income_accno_id = c.id) AS income_accno, |
957 | 957 |
(SELECT c.accno FROM chart c WHERE d.expense_accno_id = c.id) AS expense_accno, |
958 | 958 |
(SELECT c.accno FROM chart c WHERE d.fxgain_accno_id = c.id) AS fxgain_accno, |
959 |
(SELECT c.accno FROM chart c WHERE d.fxloss_accno_id = c.id) AS fxloss_accno, |
|
960 |
(SELECT c.accno FROM chart c WHERE d.rndgain_accno_id = c.id) AS rndgain_accno, |
|
961 |
(SELECT c.accno FROM chart c WHERE d.rndloss_accno_id = c.id) AS rndloss_accno |
|
959 |
(SELECT c.accno FROM chart c WHERE d.fxloss_accno_id = c.id) AS fxloss_accno |
|
962 | 960 |
$query_add |
963 | 961 |
FROM defaults d|; |
964 | 962 |
my $ref = selectfirst_hashref_query($form, $dbh, $query); |
bin/mozilla/am.pl | ||
---|---|---|
590 | 590 |
$form->{title} = $locale->text('Delete Account'); |
591 | 591 |
|
592 | 592 |
foreach my $id ( |
593 |
qw(inventory_accno_id income_accno_id expense_accno_id fxgain_accno_id fxloss_accno_id rndgain_accno_id rndloss_accno_id)
|
|
593 |
qw(inventory_accno_id income_accno_id expense_accno_id fxgain_accno_id fxloss_accno_id) |
|
594 | 594 |
) { |
595 | 595 |
if ($form->{id} == $form->{$id}) { |
596 | 596 |
$form->error($locale->text('Cannot delete default account!')); |
bin/mozilla/is.pl | ||
---|---|---|
463 | 463 |
} |
464 | 464 |
} |
465 | 465 |
|
466 |
$form->{rounding} = $form->round_amount( |
|
467 |
$form->round_amount($form->{invtotal}, 2, 1) - $form->round_amount($form->{invtotal}, 2), 2 |
|
468 |
); |
|
469 |
$form->{invtotal} = $form->round_amount( $form->{invtotal}, 2, 1 ); |
|
470 |
|
|
471 | 466 |
# follow ups |
472 | 467 |
if ($form->{id}) { |
473 | 468 |
$form->{follow_ups} = FU->follow_ups('trans_id' => $form->{id}) || []; |
bin/mozilla/oe.pl | ||
---|---|---|
539 | 539 |
</tr> |; |
540 | 540 |
} |
541 | 541 |
} |
542 |
|
|
543 |
# $form->{invsubtotal} = $form->format_amount(\%myconfig, $form->{invsubtotal}, 2, 0); # template does this |
|
544 |
|
|
542 | 545 |
} else { |
543 | 546 |
foreach my $item (split / /, $form->{taxaccounts}) { |
544 | 547 |
if ($form->{"${item}_base"}) { |
... | ... | |
560 | 563 |
} |
561 | 564 |
} |
562 | 565 |
|
563 |
$form->{rounding} = $form->round_amount( |
|
564 |
$form->round_amount($form->{invtotal}, 2, 1) - $form->round_amount($form->{invtotal}, 2) |
|
565 |
); |
|
566 |
$form->{invtotal} = $form->round_amount( $form->{invtotal}, 2, 1); |
|
567 | 566 |
$form->{oldinvtotal} = $form->{invtotal}; |
568 | 567 |
|
569 | 568 |
$TMPL_VAR{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted(); |
locale/de/all | ||
---|---|---|
2320 | 2320 |
'Risk' => 'Risiko', |
2321 | 2321 |
'Risk levels' => 'Risikograde', |
2322 | 2322 |
'Risks' => 'Risikograde', |
2323 |
'Rounding' => 'Rundung', |
|
2324 |
'Rounding Gain' => 'Rundungserträge', |
|
2325 |
'Rounding Loss' => 'Rundungsaufwendungen', |
|
2326 | 2323 |
'Row' => 'Zeile', |
2327 | 2324 |
'Row #1: amount has to be different from zero.' => 'Zeile #1: Der Wert darf nicht 0 sein.', |
2328 | 2325 |
'Row number' => 'Zeilennummer', |
locale/en/all | ||
---|---|---|
1787 | 1787 |
'Revenues EU without UStId' => '', |
1788 | 1788 |
'Review of Aging list' => '', |
1789 | 1789 |
'Right' => '', |
1790 |
'Rounding' => '', |
|
1791 |
'Rounding Gain' => '', |
|
1792 |
'Rounding Loss' => '', |
|
1793 | 1790 |
'Row #1: amount has to be different from zero.' => '', |
1794 | 1791 |
'Row number' => '', |
1795 | 1792 |
'Row was created from current record' => '', |
sql/Pg-upgrade2/defaults_add_rnd_accno_ids.sql | ||
---|---|---|
1 |
-- @tag: defaults_add_rnd_accno_ids |
|
2 |
-- @description: adds new columns 'rndgain_accno_id' and 'rndloss_accno_id' in table defaults, used to book roundings |
|
3 |
-- @depends: release_3_1_0 |
|
4 |
ALTER TABLE defaults ADD COLUMN rndgain_accno_id Integer; |
|
5 |
ALTER TABLE defaults ADD COLUMN rndloss_accno_id Integer; |
|
6 |
|
templates/webpages/am/edit_accounts.html | ||
---|---|---|
27 | 27 |
<input type="hidden" name="expense_accno_id" value="[% HTML.escape(expense_accno_id) %]"> |
28 | 28 |
<input type="hidden" name="fxgain_accno_id" value="[% HTML.escape(fxgain_accno_id) %]"> |
29 | 29 |
<input type="hidden" name="fxloss_accno_id" value="[% HTML.escape(fxloss_accno_id) %]"> |
30 |
<input type="hidden" name="rndgain_accno_id" value="[% HTML.escape(rndgain_accno_id) %]"> |
|
31 |
<input type="hidden" name="rndloss_accno_id" value="[% HTML.escape(rndloss_accno_id) %]"> |
|
32 | 30 |
|
33 | 31 |
<fieldset> |
34 | 32 |
<legend> |
templates/webpages/client_config/_default_accounts.html | ||
---|---|---|
30 | 30 |
<td>[% L.chart_picker('defaults.fxloss_accno_id', SELF.defaults.fxloss_accno_id, category='E,A', choose=1, style=style) %]<td> |
31 | 31 |
</tr> |
32 | 32 |
|
33 |
<tr> |
|
34 |
<td align="right">[% LxERP.t8("Rounding Gain") %]</td> |
|
35 |
<td>[% L.chart_picker('defaults.rndgain_accno_id', SELF.defaults.rndgain_accno_id, category='I,A', choose=1, style=style) %]</td> |
|
36 |
</tr> |
|
37 |
|
|
38 |
<tr> |
|
39 |
<td align="right">[% LxERP.t8("Rounding Loss") %]</td> |
|
40 |
<td>[% L.chart_picker('defaults.rndloss_accno_id', SELF.defaults.rndloss_accno_id, category='E,A', choose=1, style=style) %]</td> |
|
41 |
</tr> |
|
42 |
|
|
43 | 33 |
<tr> |
44 | 34 |
<td align="right">[% LxERP.t8("Current assets account") %]</td> |
45 | 35 |
<td>[% L.chart_picker('defaults.ar_paid_accno_id', SELF.defaults.ar_paid_accno_id, type='AR_paid', choose=1, style=style) %]<td> |
templates/webpages/is/form_footer.html | ||
---|---|---|
107 | 107 |
</tr> |
108 | 108 |
[%- END %] |
109 | 109 |
|
110 |
[%- IF rounding %] |
|
111 |
<tr> |
|
112 |
<th align='right'>[% 'Rounding' | $T8 %]</th> |
|
113 |
<td align='right'>[% LxERP.format_amount(rounding, 2) %]</td> |
|
114 |
</tr> |
|
115 |
[%- END %] |
|
116 |
|
|
117 | 110 |
[%# tax %] |
118 | 111 |
[% FOREACH item = taxaccounts_array %] |
119 | 112 |
[% SET description_ref = item _ '_description' %] |
... | ... | |
131 | 124 |
</tr> |
132 | 125 |
[%- END %] |
133 | 126 |
[%- END %] |
127 |
|
|
134 | 128 |
<tr> |
135 | 129 |
<th align="right">[% 'Total' | $T8 %]</th> |
136 | 130 |
<td align="right">[% LxERP.format_amount(invtotal, 2) %]</td> |
templates/webpages/is/form_header.html | ||
---|---|---|
162 | 162 |
<td> |
163 | 163 |
<input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]"> |
164 | 164 |
<input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]"> |
165 |
<input type="hidden" name="rndgain_accno" value="[% rndgain_accno %]"> |
|
166 |
<input type="hidden" name="rndloss_accno" value="[% rndloss_accno %]"> |
|
167 | 165 |
</td> |
168 | 166 |
</tr> |
169 | 167 |
[%- IF show_exchangerate %] |
templates/webpages/oe/form_footer.html | ||
---|---|---|
107 | 107 |
<th align='right'>[% 'Subtotal' | $T8 %]</th> |
108 | 108 |
<td align='right'>[% LxERP.format_amount(invsubtotal, 2) %]</td> |
109 | 109 |
</tr> |
110 |
[%- END %] |
|
111 |
[%- IF rounding %] |
|
112 |
<tr> |
|
113 |
<th align='right'>[% 'Rounding' | $T8 %]</th> |
|
114 |
<td align='right'>[% LxERP.format_amount(rounding, 2) %]</td> |
|
115 |
</tr> |
|
116 | 110 |
[%- END %] |
117 | 111 |
[% tax %] |
118 | 112 |
<tr> |
Auch abrufbar als: Unified diff
Revert "Belege runden, und Rundungsdifferenzen auf Extrakonten buchen."
This reverts commit 422f2f17365ea7879c14b902c5db1e4cd7023e48.