summaryrefslogtreecommitdiff
path: root/dynamic_accounts_report/static/src/xml/general_ledger_view.xml
blob: 7a5c582d686bdae23afc243833ea77574bae7ac9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
<templates>
    <t t-name="GeneralTemp">
        <div>
            <div>
                <div class="filter_view_tb"></div>
            </div>
            <br></br>
            <div>
                <div class="table_view_tb" style="right:20px;"></div>
            </div>
        </div>
    </t>
    <t t-name="GLTable">
        <div>
            <div class="table_main_view">
                <table cellspacing="0" width="100%">
                    <thead>
                        <tr>
                            <th colspan="6">Account</th>
                            <th class="mon_fld">Debit</th>
                            <th class="mon_fld">Credit</th>
                            <th class="mon_fld">Balance</th>
                        </tr>
                    </thead>
                    <tbody>
                        <t t-set="none_value" t-value="_"/>
                        <t t-foreach="report_lines" t-as="account">
                            <t t-set="common_id" t-value="0"/>
                            <tr style="border: 1.5px solid black;" class="gl-line"
                                data-toggle="collapse"
                                t-att-data-account-id="account['id']"
                                t-attf-data-target=".a{{account['id']}}">
                                <td colspan="6" style="border: 0px solid black;">
                                    <i class="fa fa-caret-down" role="img" aria-label="Unfolded" title="Unfolded"></i>
                                    <span>
                                        <t t-esc="account['code']"/>
                                        -
                                        <t t-esc="account['name']"/>
                                    </span>
                                </td>

                                <t t-if="currency[1] == 'before'">
                                    <td class="mon_fld">
                                        <t t-if="account['debit'] == 0">
                                            <span>-</span>
                                        </t>
                                        <t t-else="">
                                            <t t-esc="currency[0]"/>
                                            <t t-esc="account['debit']"/>
<!--                                            <t t-raw="Math.round(account['debit'] * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                        </t>
                                    </td>
                                    <td class="mon_fld">
                                        <t t-if="account['credit'] == 0">
                                            <span>-</span>
                                        </t>
                                        <t t-else="">
                                            <t t-esc="currency[0]"/>
                                            <t t-esc="account['credit']"/>
<!--                                            <t t-raw="Math.round(account['credit'] * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                        </t>
                                    </td>
                                    <td class="mon_fld">
                                        <t t-if="account['balance'] == 0">
                                            <span>-</span>
                                        </t>
                                        <t t-else="">
                                            <t t-esc="currency[0]"/>
                                            <t t-esc="account['balance']"/>
<!--                                            <t t-raw="Math.round(account['balance'] * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                        </t>
                                    </td>

                                </t>
                                <t t-else="">
                                    <td class="mon_fld">
                                        <t t-if="account['debit'] == 0">
                                            <span>-</span>
                                        </t>
                                        <t t-else="">
                                            <t t-esc="account['debit']"/>
<!--                                            <t t-raw="Math.round(account['debit'] * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                            <t t-esc="currency[0]"/>
                                        </t>
                                    </td>
                                    <td class="mon_fld">
                                        <t t-if="account['credit'] == 0">
                                            <span>-</span>
                                        </t>
                                        <t t-else="">
                                            <t t-esc="account['credit']"/>
<!--                                            <t t-raw="Math.round(account['credit'] * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                            <t t-esc="currency[0]"/>
                                        </t>
                                    </td>
                                    <td class="mon_fld">
                                        <t t-if="account['balance'] == 0">
                                            <span>-</span>
                                        </t>
                                        <t t-else="">
                                            <t t-esc="account['balance']"/>
<!--                                            <t t-raw="Math.round(account['balance'] * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                            <t t-esc="currency[0]"/>
                                        </t>
                                    </td>

                                </t>


                                <t t-set="common_id" t-value="'a'+account['id']"/>
                            </tr>

                            <tr t-attf-class="collapse a{{account['id']}}">
                                <td colspan="10">
                                    <ul>
                                    </ul>
                                </td>
                            </tr>

                        </t>

                    </tbody>

                </table>
            </div>
        </div>
    </t>


    <t t-name="GLFilterView">
        <div>
                <h1 style="padding:10px">
                    <t t-esc="title"/>
                </h1>

            </div>
        <div class="" style="position: relative;">
            <div class="sub_container_left">
                <div class="report_print">
                    <button type="button" class="btn btn-primary" id="pdf"
                            style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
                        Print (PDF)
                    </button>
                    <button type="button" class="btn btn-primary" id="xlsx"
                            style="left:10px; height:30px;position: relative;color:white;background-color: #00A0AD;border-color: #00A0AD; padding:3px;">
                        Export (XLSX)
                    </button>
                </div>
            </div>
            <br></br>
            <div class="sub_container_right" style="width:50%;height:3%;right:0px;top:0px;position: absolute;">
                  <div class="" style="right:80x;">

                    <br></br>
                    <div class="row" style="right:80px;top:0px;position: absolute;width:50;">
                        <div class="time_range" style="">
                            <a type="button" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                <span class="fa fa-calendar" title="Dates" role="img" aria-label="Dates"></span>
                                Date Range
                            </a>
                            <div class="dropdown-menu" role="menu">
                                <div class="">
                                    <label class="" for="date_from">Start Date :</label>
                                    <div class="">
                                        <div class="" aria-atomic="true" id="">
                                            <input type="date" id="date_from"></input>
                                        </div>
                                    </div>
                                    <label class="" for="date_to">End Date :</label>
                                    <div class="">
                                        <div class="" aria-atomic="true" id="">
                                            <input type="date" id="date_to"></input>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="journals_filter" style="">
                            <a type="button" class="dropdown-toggle" data-toggle="dropdown">
                                <span class="fa fa-book"></span>
                                Journals:
                            </a>
                            <select class="dropdown-menu  journals" name="states[]" multiple="multiple">
                                <div role="separator" class="dropdown-divider"></div>
                                <t t-foreach="filter_data.journals_list" t-as="journal">
                                    <option t-attf-value="{{journal[0]}}">
                                        <t t-esc="journal[1]"/>
                                    </option>
                                </t>
                            </select>
                            <span id="journal_res"></span>
                        </div>

                        <div class="accounts_filter">
                            <a type="button" class="dropdown-toggle" data-toggle="dropdown">
                                <span class="fa fa-book"></span>
                                Accounts:
                            </a>
                            <select class="dropdown-menu account" name="states[]" multiple="multiple">
                                <t t-foreach="filter_data.accounts_list" t-as="account">
                                    <option t-attf-value="{{account[0]}}">
                                        <t t-esc="account[1]"/>
                                    </option>
                                </t>
                            </select>
                            <span id="acc_res"></span>
                        </div>

                        <div class="analytics_filter">
                            <a type="button" class="dropdown-toggle" data-toggle="dropdown">
                                <span class="fa fa-book"></span>
                                Analytic Accounts:
                            </a>
                            <select class="dropdown-menu analytics" name="states[]" multiple="multiple">
                                <t t-foreach="filter_data.analytic_list" t-as="analytic">
                                    <option t-attf-value="{{analytic[0]}}">
                                        <t t-esc="analytic[1]"/>
                                    </option>
                                </t>
                            </select>
                            <span id="analytic_res"></span>
                        </div>

                        <div class="analytic_tags_filter">
                            <a type="button" class="dropdown-toggle" data-toggle="dropdown">
                                <span class="fa fa-book"></span>
                                Analytic Tags:
                            </a>
                            <select class="dropdown-menu analytic_tags" name="states[]" multiple="multiple">
                                <t t-foreach="filter_data.analytic_tag_list" t-as="analytic_tag">
                                    <option t-attf-value="{{analytic_tag[0]}}">
                                        <t t-esc="analytic_tag[1]"/>
                                    </option>
                                </t>
                            </select>
                            <span id="analytic_tag_res"></span>
                        </div>


                        <div class="search-Target-move" style="">
                            <a type="button" class="dropdown-toggle" data-toggle="dropdown">
                                <span class="fa fa-filter"></span>
                                Target Move:
                            </a>
                            <select id="entries" class="dropdown-menu target_move" name="states[]">
                                <div role="separator" class="dropdown-divider"></div>
                                <option value="Posted">Posted Entries</option>
                                <option value="All">All Entries</option>
                            </select>
                            <span id="post_res"></span>
                        </div>
                    </div>

                </div>
                <div style="">
                    <button type="button" id="apply_filter" class="btn btn-primary"
                            style="top:0px;height:30px;right:20px;position: absolute;color:white;background-color: #00A0AD;border-color: #00A0AD;">
                        Apply
                    </button>

                </div>
            </div>
        </div>
    </t>


    <t t-name="SubSection">
        <div class="gl-table-div">
            <table class="table table-sm o_main_table"
                   style="border: 0px solid black;display compact;">
                <thead>
                    <tr style="">
                        <th>Date</th>
                        <th>JRNL</th>
                        <th>Partner</th>
                        <th>Move</th>
                        <th>Entry Label</th>
                        <th class="mon_fld">Debit</th>
                        <th class="mon_fld">Credit</th>
                        <th class="mon_fld">Balance</th>
                    </tr>
                </thead>
                <tbody>
                    <t t-foreach="account_data" t-as="account_line">
                     <t t-set="style" t-value="''"/>
                     <t t-set="style_right" t-value="'text-align:right;'"/>
                         <tr>
                            <td>
                                <t t-if="account_line.ldate">
                                    <div class="dropdown dropdown-toggle">
                                        <a data-toggle="dropdown" href="#">
                                            <span class="caret"></span>
                                            <span>
                                                <t t-esc="account_line.ldate"/>
                                            </span>
                                        </a>
                                        <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
                                            <li>
                                                <a class="view-account-move" tabindex="-1" href="#"
                                                   t-att-data-move-id="account_line.move_id">
                                                    View Source move

                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </t>
                            </td>
                            <td>
                                <t t-esc="account_line.lcode"/>
                            </td>
                            <td>
                                <t t-esc="account_line.partner_name"/>
                            </td>
                            <td t-att-style="style">
                                <t t-esc="account_line.move_name"/>
                            </td>
                            <td t-att-style="style">
                                <t t-esc="account_line.lname"/>
                            </td>
                            <t t-if="currency_position == 'before'">
                                <td t-att-style="style_right" class="amt">
                                    <t t-if="account_line.debit == 0">
                                        <span>-</span>
                                    </t>
                                    <t t-else="">
                                        <t t-esc="account_line.currency_code"/>
                                        <t t-esc="account_line.debit"/>
<!--                                        <t t-esc="Math.round(account_line.debit * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                    </t>
                                </td>
                                <td t-att-style="style_right" class="amt">
                                    <t t-if="account_line.credit == 0">
                                        <span>-</span>
                                    </t>
                                    <t t-else="">
                                        <t t-esc="account_line.currency_code"/>
                                        <t t-esc="account_line.credit"/>
<!--                                        <t t-esc="Math.round(account_line.credit * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                    </t>
                                </td>
                                <td t-att-style="style_right" class="amt">
                                    <t t-if="account_line.balance == 0">
                                        <span>-</span>
                                    </t>
                                    <t t-else="">
                                        <t t-esc="account_line.currency_code"/>
                                        <t t-esc="account_line.balance"/>
<!--                                        <t t-esc="Math.round(account_line.balance * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                    </t>
                                </td>
                            </t>
                            <t t-else="">
                                <td t-att-style="style_right" class="amt">
                                    <t t-if="account_line.debit == 0">
                                        <span>-</span>
                                    </t>
                                    <t t-else="">
                                        <t t-esc="account_line.debit"/>
<!--                                        <t t-esc="Math.round(account_line.debit * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                        <t t-esc="account_line.currency_code"/>
                                    </t>
                                </td>
                                <td t-att-style="style_right" class="amt">
                                    <t t-if="account_line.credit == 0">
                                        <span>-</span>
                                    </t>
                                    <t t-else="">
                                        <t t-esc="account_line.credit"/>
<!--                                        <t t-esc="Math.round(account_line.credit * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                        <t t-esc="account_line.currency_code"/>
                                    </t>
                                </td>
                                <td t-att-style="style_right" class="amt">
                                    <t t-if="account_line.balance == 0">
                                        <span>-</span>
                                    </t>
                                    <t t-else="">
                                        <t t-esc="account_line.balance"/>
<!--                                        <t t-esc="Math.round(account_line.balance * Math.pow(10, 2)) / Math.pow(10, 2)"/>-->
                                        <t t-esc="account_line.currency_code"/>
                                    </t>
                                </td>
                            </t>

                        </tr>

                    </t>
                </tbody>
            </table>
        </div>
    </t>


</templates>