From: Sven Schöling Date: Mon, 6 Apr 2009 15:25:02 +0000 (+0000) Subject: Bilanzfunktion: X-Git-Tag: release-2.6.0beta2~116 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a0ad15b238b5cf810795e36b73a9e9d6f51c3029;p=kivitendo-erp.git Bilanzfunktion: - Dezimalstellen --- diff --git a/SL/RP.pm b/SL/RP.pm index d9902050b..ebc0dd688 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -46,9 +46,7 @@ use warnings; # # stuff missing from the original implementation: # - bold stuff -# - format (2 places, varying signs of negative amounts) -# - rounding (might not be necessary) -# - accno and subdescription +# - subdescription # - proper testing for heading charts # - transmission from $form to TMPL realm is not as clear as i'd like sub balance_sheet { diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index fea72bcdb..7075c4de7 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -1091,6 +1091,7 @@ sub generate_balance_sheet { $auth->assert('report'); + $form->{decimalplaces} = $form->{decimalplaces} * 1 || 2; $form->{padding} = "  "; $form->{bold} = ""; $form->{endbold} = ""; diff --git a/templates/webpages/rp/balance_sheet_de.html b/templates/webpages/rp/balance_sheet_de.html index 7dd49e064..04ad4412a 100644 --- a/templates/webpages/rp/balance_sheet_de.html +++ b/templates/webpages/rp/balance_sheet_de.html @@ -20,9 +20,9 @@ [% row.accno _ ' - ' IF l_accno %][% row.description %] - [% LxERP.format_amount(row.this,2) %] + [% LxERP.format_amount(row.this, decimalplaces) %] [%- IF last_period %] - [% LxERP.format_amount(row.last,2) %] + [% LxERP.format_amount(row.last, decimalplaces) %] [%- END %] [% END %] @@ -36,9 +36,9 @@ TOTAL - [% LxERP.format_amount(total.A.this,2) %]
+ [% LxERP.format_amount(total.A.this, decimalplaces) %]
[%- IF last_period %] - [% LxERP.format_amount(total.A.last,2) %]
+ [% LxERP.format_amount(total.A.last, decimalplaces) %]
[%- END %] [% END %] @@ -51,9 +51,9 @@ [% row.accno _ ' - ' IF l_accno %][% row.description %] - [% LxERP.format_amount(row.this,2) %] + [% LxERP.format_amount(row.this, decimalplaces) %] [%- IF last_period %] - [% LxERP.format_amount(row.last,2) %] + [% LxERP.format_amount(row.last, decimalplaces) %] [%- END %] [% END %] @@ -68,9 +68,9 @@ TOTAL - [% LxERP.format_amount(total.L.this,2) %]

+ [% LxERP.format_amount(total.L.this, decimalplaces) %]

[%- IF last_period %] - [% LxERP.format_amount(total.L.last,2) %]

+ [% LxERP.format_amount(total.L.last, decimalplaces) %]

[%- END %] [% END %] @@ -82,10 +82,10 @@ [% FOREACH row = Q %] - [% row.accno _ ' - ' IF l_accno %][% row.description %] - [% LxERP.format_amount(row.this,2) %] + [% row.description %] + [% LxERP.format_amount(row.this, decimalplaces) %] [%- IF last_period %] - [% LxERP.format_amount(row.last,2) %] + [% LxERP.format_amount(row.last, decimalplaces) %] [%- END %] [% END %] @@ -100,18 +100,18 @@ TOTAL - [% LxERP.format_amount(total.Q.this,2) %]

+ [% LxERP.format_amount(total.Q.this, decimalplaces) %]

[%- IF last_period %] - [% LxERP.format_amount(total.Q.last,2) %]

+ [% LxERP.format_amount(total.Q.last, decimalplaces) %]

[%- END %] [% END %] TOTAL PASSIVA & EIGENTUM - [% LxERP.format_amount(total.this,2) %]

+ [% LxERP.format_amount(total.this, decimalplaces) %]

[%- IF last_period %] - [% LxERP.format_amount(total.last,2) %]

+ [% LxERP.format_amount(total.last, decimalplaces) %]

[%- END %] diff --git a/templates/webpages/rp/balance_sheet_master.html b/templates/webpages/rp/balance_sheet_master.html index 5890987d1..fc3b8eedd 100644 --- a/templates/webpages/rp/balance_sheet_master.html +++ b/templates/webpages/rp/balance_sheet_master.html @@ -20,9 +20,9 @@ [% row.accno _ ' - ' IF l_accno %][% row.description %] - [% LxERP.format_amount(row.this,2) %] + [% LxERP.format_amount(row.this, decimalplaces) %] [%- IF last_period %] - [% LxERP.format_amount(row.last,2) %] + [% LxERP.format_amount(row.last, decimalplaces) %] [%- END %] [% END %] @@ -36,9 +36,9 @@ TOTAL - [% LxERP.format_amount(total.A.this,2) %]
+ [% LxERP.format_amount(total.A.this, decimalplaces) %]
[%- IF last_period %] - [% LxERP.format_amount(total.A.last,2) %]
+ [% LxERP.format_amount(total.A.last, decimalplaces) %]
[%- END %] [% END %] @@ -51,9 +51,9 @@ [% row.accno _ ' - ' IF l_accno %][% row.description %] - [% LxERP.format_amount(row.this,2) %] + [% LxERP.format_amount(row.this, decimalplaces) %] [%- IF last_period %] - [% LxERP.format_amount(row.last,2) %] + [% LxERP.format_amount(row.last, decimalplaces) %] [%- END %] [% END %] @@ -68,9 +68,9 @@ TOTAL - [% LxERP.format_amount(total.L.this,2) %]

+ [% LxERP.format_amount(total.L.this, decimalplaces) %]

[%- IF last_period %] - [% LxERP.format_amount(total.L.last,2) %]

+ [% LxERP.format_amount(total.L.last, decimalplaces) %]

[%- END %] [% END %] @@ -83,9 +83,9 @@ [% row.description %] - [% LxERP.format_amount(row.this,2) %] + [% LxERP.format_amount(row.this, decimalplaces) %] [%- IF last_period %] - [% LxERP.format_amount(row.last,2) %] + [% LxERP.format_amount(row.last, decimalplaces) %] [%- END %] [% END %] @@ -100,18 +100,18 @@ TOTAL - [% LxERP.format_amount(total.Q.this,2) %]

+ [% LxERP.format_amount(total.Q.this, decimalplaces) %]

[%- IF last_period %] - [% LxERP.format_amount(total.Q.last,2) %]

+ [% LxERP.format_amount(total.Q.last, decimalplaces) %]

[%- END %] [% END %] TOTAL LIABILITIES & EQUITY - [% LxERP.format_amount(total.this,2) %]

+ [% LxERP.format_amount(total.this, decimalplaces) %]

[%- IF last_period %] - [% LxERP.format_amount(total.last,2) %]

+ [% LxERP.format_amount(total.last, decimalplaces) %]

[%- END %]