~serpentcs/account-financial-report/account-serpentcs

« back to all changes in this revision

Viewing changes to account_webkit/report/account_financial_report.mako

  • Committer: Nishant Jogi(SerpentCS)
  • Date: 2013-10-10 09:26:14 UTC
  • Revision ID: n.jogi.serpentcs@gmail.com-20131010092614-jwfls1s4xe39sll2
[ADD] Added Accounting report modules with conversion from rml to webkit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
    <head>
 
3
        <style type="text/css">
 
4
                
 
5
                        table.mystyle{border-width: 0 0 0 0;
 
6
                                border-spacing: 0;
 
7
                                border-collapse: collapse;
 
8
                                border-style: solid;
 
9
                                border: 1px solid grey;
 
10
                                font-size: 100%;}
 
11
 
 
12
                        .mystyle td, .mystyle th{
 
13
                                margin: 0;
 
14
                                padding: 4px;
 
15
                                border-width: 1px 1px 1px 1px;
 
16
                                border-style: solid;
 
17
                                border: 1px solid grey;
 
18
                                font-size: 70%;}
 
19
                                
 
20
                        table.mystyleone{border-width: 0 0 0 0;
 
21
                                border-spacing: 0;
 
22
                                border-collapse: collapse;
 
23
                                border-color: black;
 
24
                                border-style: solid;
 
25
                                font-size: 100%;}
 
26
 
 
27
                        .mystyleone tr{
 
28
                                margin: 0;
 
29
                                padding: 4px;
 
30
                                border-width: 0 0 1px 0;
 
31
                                border-color: black;
 
32
                                border-style: solid;
 
33
                                font-size: 70%;}
 
34
                </style>
 
35
    </head>
 
36
    <body>
 
37
        <center><h2>${ data['form']['account_report_id'][1] }</h2></center>
 
38
        <table cellspacing="0" class='mystyle' width="100%">
 
39
            <tr>
 
40
                <td class="cell td_f12" width="33%" align="center"><b>${ _('Chart of Accounts') }</b></td>
 
41
                <td class="cell td_f12" width="33%" align="center"><b>${ _('Fiscal Year') }</b></td>
 
42
                <td class="cell td_f12" width="34%" align="center"><b>${ _('Filter By') }
 
43
                    %if data['form']['filter']!='filter_no':
 
44
                        ${ get_filter(data) }
 
45
                    %endif</b>
 
46
                </td>
 
47
            </tr>
 
48
            <tr>
 
49
                <td class="cell" align="center">
 
50
                    %if get_account(data):
 
51
                        ${ get_account(data) }
 
52
                    %endif
 
53
                </td>
 
54
                <td class="cell" align="center">${ get_fiscalyear(data) or '' }</td>
 
55
                <td class="cell" align="center">
 
56
                    %if get_filter(data)=='No Filters':
 
57
                        ${ get_filter(data) }
 
58
                    %endif
 
59
                    %if get_filter(data)=='Date':
 
60
                        <table cellspacing="0" class="cell">
 
61
                            <tr>
 
62
                                <td class="cell">${ _('Start Date') }</td>
 
63
                                <td class="cell">${ _('End Date') }</td>
 
64
                            </tr>
 
65
                            <tr>
 
66
                                <td class="cell">${ formatLang(get_start_date(data),date=True) }</td>
 
67
                                <td class="cell">${ formatLang(get_end_date(data),date=True) }</td>
 
68
                            </tr>
 
69
                        </table>
 
70
                    %endif
 
71
                    %if get_filter(data)=='Periods':
 
72
                        <table cellspacing="0" class="cell tbl_header">
 
73
                            <tr>
 
74
                                <td class="cell">${ _('Start Period') }</td>
 
75
                                <td class="cell">${ _('End Period') }</td>
 
76
                            </tr>
 
77
                            <tr>
 
78
                                <td class="cell">${ get_start_period(data) }</td>
 
79
                                <td class="cell">${ get_end_period(data) }</td>
 
80
                            </tr>
 
81
                        </table>
 
82
                    %endif
 
83
                </td>
 
84
            </tr>
 
85
        </table>
 
86
        <br/>
 
87
        %if data['form']['debit_credit'] == 1:
 
88
            <table class="mystyleone" width="100%">
 
89
                <tr>
 
90
                    <td class="td_f12" width="44%"><b>${ _('Name') }</b></td>
 
91
                    <td class="td_f12_right" width="11%"><b>${ _('Debit') }</b></td>
 
92
                    <td class="td_f12_right" width="11%"><b>${ _('Credit') }</b></td>
 
93
                    <td class="td_f12_right" width="14%"><b>${ _('Balance') }</b></td>
 
94
                </tr>
 
95
                </table>
 
96
                <table width="100%">
 
97
                %for a in get_lines(data):
 
98
                    %if a.get('level') != 0:
 
99
                        <tr>
 
100
                            <td class="font${ min(6,a.get('level'))} padding${ min(6,a.get('level'))}" width="44%" style="font-size: 70%;"><b>${ a.get('name') }</b></td>
 
101
                            <td class="font${ min(6,a.get('level'))} right" width="11%">${ formatLang(a.get('debit',0.0), currency_obj = company.currency_id) }</td>
 
102
                            <td class="font${ min(6,a.get('level'))} right" width="11%">${ formatLang(a.get('credit',0.0), currency_obj = company.currency_id) }</td>
 
103
                            <td class="font${ min(6,a.get('level'))} right" width="14%">
 
104
                                %if (a.get('account_type') =='view' and a.get('level') != 1):
 
105
                                    <u>${ formatLang(a.get('balance'), currency_obj = company.currency_id) }</u>
 
106
                                %endif
 
107
                                %if (a.get('account_type') !='view' or a.get('level') == 1):
 
108
                                    ${ formatLang(a.get('balance'), currency_obj = company.currency_id) }
 
109
                                %endif
 
110
                            </td>
 
111
                        </tr>
 
112
                        %if a.get('level')==1:
 
113
                            <tr></tr>
 
114
                        %endif
 
115
                    %endif
 
116
                %endfor
 
117
            </table>
 
118
        %endif
 
119
        %if (not data['form']['enable_filter'] and not data['form']['debit_credit']):
 
120
            <table class="mystyleone" width="100%">
 
121
                <tr>
 
122
                    <td class="td_f12" width="80%"><b>${ _('Name') }</b></td>
 
123
                    <td class="td_f12_right" width="20%"><b>${ _('Balance') }</b></td>
 
124
                </tr><tr></tr>
 
125
                %for a in get_lines(data):
 
126
                    %if a.get('level') != 0:
 
127
                        <tr>
 
128
                            <td class="font${ min(6,a.get('level'))} padding${ min(6,a.get('level'))}">${ a.get('name') }</td>
 
129
                            <td class="font${ min(6,a.get('level'))} right">
 
130
                                %if (a.get('account_type') =='view' and a.get('level') != 1):
 
131
                                    <u>${ formatLang(a.get('balance'), currency_obj = company.currency_id) }</u>
 
132
                                %endif
 
133
                                %if (a.get('account_type') !='view' or a.get('level') == 1):
 
134
                                    ${ formatLang(a.get('balance'), currency_obj = company.currency_id) }
 
135
                                %endif
 
136
                            </td>
 
137
                        </tr>
 
138
                        %if a.get('level')==1:
 
139
                            <tr></tr>
 
140
                        %endif
 
141
                    %endif
 
142
                %endfor
 
143
            </table>
 
144
        %endif
 
145
        %if (data['form']['enable_filter'] == 1 and not data['form']['debit_credit']):
 
146
            <table class="mystyleone" width="100%">
 
147
                <tr>
 
148
                    <td class="td_f12" width="56%"><b>${ _('Name') }</b></td>
 
149
                    <td class="td_f12_right" width="22%"><b>${ _('Balance') }</b></td>
 
150
                    <td class="td_f12_right" width="22%"><b>${ data['form']['label_filter'] }</b></td>
 
151
                </tr>
 
152
                %for a in get_lines(data):
 
153
                    %if a.get('level') != 0:
 
154
                        <tr>
 
155
                            <td class="font${ min(6,a.get('level'))} padding${ min(6,a.get('level'))}">${ a.get('name') }</td>
 
156
                            <td class="font${ min(6,a.get('level'))} right">
 
157
                                %if (a.get('account_type') =='view' and a.get('level') != 1):
 
158
                                    <u>${ formatLang(a.get('balance'), currency_obj = company.currency_id) }</u>
 
159
                                %endif
 
160
                                %if (a.get('account_type') !='view' or a.get('level') == 1):
 
161
                                    ${ formatLang(a.get('balance'), currency_obj = company.currency_id) }
 
162
                                %endif
 
163
                            </td>
 
164
                            <td class="font${ min(6,a.get('level'))} right">
 
165
                                %if (a.get('account_type') =='view' and a.get('level') != 1):
 
166
                                    <u>${ formatLang(a.get('balance_cmp'), currency_obj = company.currency_id) }</u>
 
167
                                %endif
 
168
                                %if (a.get('account_type') !='view' or a.get('level') == 1):
 
169
                                    ${ formatLang(a.get('balance_cmp'), currency_obj = company.currency_id) }
 
170
                                %endif
 
171
                            </td>
 
172
                        </tr>
 
173
                        %if a.get('level')==1:
 
174
                            <tr></tr>
 
175
                        %endif
 
176
                    %endif
 
177
                %endfor
 
178
            </table>
 
179
        %endif
 
180
    </body>
 
181
</html>
 
 
b'\\ No newline at end of file'