Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a0ad15b2

Von Sven Schöling vor mehr als 15 Jahren hinzugefügt

  • ID a0ad15b238b5cf810795e36b73a9e9d6f51c3029
  • Vorgänger fdee0091
  • Nachfolger 273d8de6

Bilanzfunktion:
- Dezimalstellen

Unterschiede anzeigen:

SL/RP.pm
46 46
#
47 47
# stuff missing from the original implementation:
48 48
# - bold stuff
49
# - format (2 places, varying signs of negative amounts)
50
# - rounding (might not be necessary)
51
# - accno and subdescription
49
# - subdescription
52 50
# - proper testing for heading charts
53 51
# - transmission from $form to TMPL realm is not as clear as i'd like
54 52
sub balance_sheet {
bin/mozilla/rp.pl
1091 1091

  
1092 1092
  $auth->assert('report');
1093 1093

  
1094
  $form->{decimalplaces} = $form->{decimalplaces} * 1 || 2;
1094 1095
  $form->{padding} = "  ";
1095 1096
  $form->{bold}    = "<b>";
1096 1097
  $form->{endbold} = "</b>";
templates/webpages/rp/balance_sheet_de.html
20 20
  <tr>
21 21
    <td> </td>
22 22
    <td>[% row.accno _ ' - ' IF l_accno %][% row.description %]</td>
23
    <td align="right">[% LxERP.format_amount(row.this,2) %]</td>
23
    <td align="right">[% LxERP.format_amount(row.this, decimalplaces) %]</td>
24 24
    [%- IF last_period %]
25
    <td align="right">[% LxERP.format_amount(row.last,2) %]</td>
25
    <td align="right">[% LxERP.format_amount(row.last, decimalplaces) %]</td>
26 26
    [%- END %]
27 27
  </tr>
28 28
  [% END %]
......
36 36

  
37 37
  <tr valign="top">
38 38
    <th align="left" colspan="2">TOTAL</th>
39
    <td align="right">[% LxERP.format_amount(total.A.this,2) %]<hr noshade size="2"></td>
39
    <td align="right">[% LxERP.format_amount(total.A.this, decimalplaces) %]<hr noshade size="2"></td>
40 40
    [%- IF last_period %]
41
    <td align="right">[% LxERP.format_amount(total.A.last,2) %]<hr noshade size="2"></td>
41
    <td align="right">[% LxERP.format_amount(total.A.last, decimalplaces) %]<hr noshade size="2"></td>
42 42
    [%- END %]
43 43
  </tr>
44 44
[% END %]
......
51 51
  <tr>
52 52
    <td></td>
53 53
    <td>[% row.accno _ ' - ' IF l_accno %][% row.description %]</td>
54
    <td align="right">[% LxERP.format_amount(row.this,2) %]</td>
54
    <td align="right">[% LxERP.format_amount(row.this, decimalplaces) %]</td>
55 55
    [%- IF last_period %]
56
    <td align="right">[% LxERP.format_amount(row.last,2) %]</td>
56
    <td align="right">[% LxERP.format_amount(row.last, decimalplaces) %]</td>
57 57
    [%- END %]
58 58
  </tr>
59 59
  [% END %]
......
68 68
  <tr valign="top">
69 69
    <td></td>
70 70
    <th align="left">TOTAL</th>
71
    <td align="right">[% LxERP.format_amount(total.L.this,2) %]<br><hr noshade size="2"</td>
71
    <td align="right">[% LxERP.format_amount(total.L.this, decimalplaces) %]<br><hr noshade size="2"</td>
72 72
    [%- IF last_period %]
73
    <td align="right">[% LxERP.format_amount(total.L.last,2) %]<br><hr noshade size="2"</td>
73
    <td align="right">[% LxERP.format_amount(total.L.last, decimalplaces) %]<br><hr noshade size="2"</td>
74 74
    [%- END %]
75 75
  </tr>
76 76
[% END %]
......
82 82
  [% FOREACH row = Q %]
83 83
  <tr>
84 84
    <td></td>
85
    <td>[% row.accno _ ' - ' IF l_accno %][% row.description %]</td>
86
    <td align="right">[% LxERP.format_amount(row.this,2) %]</td>
85
    <td>[% row.description %]</td>
86
    <td align="right">[% LxERP.format_amount(row.this, decimalplaces) %]</td>
87 87
    [%- IF last_period %]
88
    <td align="right">[% LxERP.format_amount(row.last,2) %]</td>
88
    <td align="right">[% LxERP.format_amount(row.last, decimalplaces) %]</td>
89 89
    [%- END %]
90 90
  </tr>
91 91
  [% END  %]
......
100 100
  <tr valign="top">
101 101
    <td></td>
102 102
    <th align="left">TOTAL</th>
103
    <td align="right">[% LxERP.format_amount(total.Q.this,2) %]<br><hr noshade size="2"</td>
103
    <td align="right">[% LxERP.format_amount(total.Q.this, decimalplaces) %]<br><hr noshade size="2"</td>
104 104
    [%- IF last_period %]
105
    <td align="right">[% LxERP.format_amount(total.Q.last,2) %]<br><hr noshade size="2"</td>
105
    <td align="right">[% LxERP.format_amount(total.Q.last, decimalplaces) %]<br><hr noshade size="2"</td>
106 106
    [%- END %]
107 107
  </tr>
108 108
[% END %]
109 109

  
110 110
  <tr valign="top">
111 111
    <th align="left" colspan="2">TOTAL PASSIVA &amp; EIGENTUM</th>
112
    <td align="right">[% LxERP.format_amount(total.this,2) %]<br><hr noshade size="2"></td>
112
    <td align="right">[% LxERP.format_amount(total.this, decimalplaces) %]<br><hr noshade size="2"></td>
113 113
    [%- IF last_period %]
114
    <td align="right">[% LxERP.format_amount(total.last,2) %]<br><hr noshade size="2"></td>
114
    <td align="right">[% LxERP.format_amount(total.last, decimalplaces) %]<br><hr noshade size="2"></td>
115 115
    [%- END %]
116 116
  </tr>
117 117
</table>
templates/webpages/rp/balance_sheet_master.html
20 20
  <tr>
21 21
    <td> </td>
22 22
    <td>[% row.accno _ ' - ' IF l_accno %][% row.description %]</td>
23
    <td align="right">[% LxERP.format_amount(row.this,2) %]</td>
23
    <td align="right">[% LxERP.format_amount(row.this, decimalplaces) %]</td>
24 24
    [%- IF last_period %]
25
    <td align="right">[% LxERP.format_amount(row.last,2) %]</td>
25
    <td align="right">[% LxERP.format_amount(row.last, decimalplaces) %]</td>
26 26
    [%- END %]
27 27
  </tr>
28 28
  [% END %]
......
36 36

  
37 37
  <tr valign="top">
38 38
    <th align="left" colspan="2"><translate>TOTAL</translate></th>
39
    <td align="right">[% LxERP.format_amount(total.A.this,2) %]<hr noshade size="2"></td>
39
    <td align="right">[% LxERP.format_amount(total.A.this, decimalplaces) %]<hr noshade size="2"></td>
40 40
    [%- IF last_period %]
41
    <td align="right">[% LxERP.format_amount(total.A.last,2) %]<hr noshade size="2"></td>
41
    <td align="right">[% LxERP.format_amount(total.A.last, decimalplaces) %]<hr noshade size="2"></td>
42 42
    [%- END %]
43 43
  </tr>
44 44
[% END %]
......
51 51
  <tr>
52 52
    <td></td>
53 53
    <td>[% row.accno _ ' - ' IF l_accno %][% row.description %]</td>
54
    <td align="right">[% LxERP.format_amount(row.this,2) %]</td>
54
    <td align="right">[% LxERP.format_amount(row.this, decimalplaces) %]</td>
55 55
    [%- IF last_period %]
56
    <td align="right">[% LxERP.format_amount(row.last,2) %]</td>
56
    <td align="right">[% LxERP.format_amount(row.last, decimalplaces) %]</td>
57 57
    [%- END %]
58 58
  </tr>
59 59
  [% END %]
......
68 68
  <tr valign="top">
69 69
    <td></td>
70 70
    <th align="left"><translate>TOTAL</translate></th>
71
    <td align="right">[% LxERP.format_amount(total.L.this,2) %]<br><hr noshade size="2"</td>
71
    <td align="right">[% LxERP.format_amount(total.L.this, decimalplaces) %]<br><hr noshade size="2"</td>
72 72
    [%- IF last_period %]
73
    <td align="right">[% LxERP.format_amount(total.L.last,2) %]<br><hr noshade size="2"</td>
73
    <td align="right">[% LxERP.format_amount(total.L.last, decimalplaces) %]<br><hr noshade size="2"</td>
74 74
    [%- END %]
75 75
  </tr>
76 76
[% END %]
......
83 83
  <tr>
84 84
    <td></td>
85 85
    <td>[% row.description %]</td>
86
    <td align="right">[% LxERP.format_amount(row.this,2) %]</td>
86
    <td align="right">[% LxERP.format_amount(row.this, decimalplaces) %]</td>
87 87
    [%- IF last_period %]
88
    <td align="right">[% LxERP.format_amount(row.last,2) %]</td>
88
    <td align="right">[% LxERP.format_amount(row.last, decimalplaces) %]</td>
89 89
    [%- END %]
90 90
  </tr>
91 91
  [% END  %]
......
100 100
  <tr valign="top">
101 101
    <td></td>
102 102
    <th align="left"><translate>TOTAL</translate></th>
103
    <td align="right">[% LxERP.format_amount(total.Q.this,2) %]<br><hr noshade size="2"</td>
103
    <td align="right">[% LxERP.format_amount(total.Q.this, decimalplaces) %]<br><hr noshade size="2"</td>
104 104
    [%- IF last_period %]
105
    <td align="right">[% LxERP.format_amount(total.Q.last,2) %]<br><hr noshade size="2"</td>
105
    <td align="right">[% LxERP.format_amount(total.Q.last, decimalplaces) %]<br><hr noshade size="2"</td>
106 106
    [%- END %]
107 107
  </tr>
108 108
[% END %]
109 109

  
110 110
  <tr valign="top">
111 111
    <th align="left" colspan="2"><translate>TOTAL</translate> <translate>LIABILITIES</translate> &amp; <translate>EQUITY</translate></th>
112
    <td align="right">[% LxERP.format_amount(total.this,2) %]<br><hr noshade size="2"></td>
112
    <td align="right">[% LxERP.format_amount(total.this, decimalplaces) %]<br><hr noshade size="2"></td>
113 113
    [%- IF last_period %]
114
    <td align="right">[% LxERP.format_amount(total.last,2) %]<br><hr noshade size="2"></td>
114
    <td align="right">[% LxERP.format_amount(total.last, decimalplaces) %]<br><hr noshade size="2"></td>
115 115
    [%- END %]
116 116
  </tr>
117 117
</table>

Auch abrufbar als: Unified diff