Merge lp:~vauxoo/openerp-venezuela-localization/ovl70-ffrr-rev-kty into lp:openerp-venezuela-localization
- ovl70-ffrr-rev-kty
- Merge into trunk
Proposed by
Katherine Zaoral (Vauxoo)
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 824 | ||||
Proposed branch: | lp:~vauxoo/openerp-venezuela-localization/ovl70-ffrr-rev-kty | ||||
Merge into: | lp:openerp-venezuela-localization | ||||
Diff against target: |
5766 lines (+1699/-3256) 13 files modified
l10n_ve_fiscal_book/demo/purchase_book_demo.xml (+3/-241) l10n_ve_fiscal_book/demo/sale_book_demo.xml (+3/-242) l10n_ve_fiscal_book/model/fiscal_book.py (+755/-482) l10n_ve_fiscal_book/model/invoice.py (+18/-20) l10n_ve_fiscal_book/report/fiscal_book_parser.py (+136/-98) l10n_ve_fiscal_book/report/fiscal_book_purchase_report.rml (+388/-508) l10n_ve_fiscal_book/report/fiscal_book_sale_report.rml (+13/-13) l10n_ve_fiscal_book/report/purchases_book.rml (+0/-723) l10n_ve_fiscal_book/report/sales_book.rml (+0/-681) l10n_ve_fiscal_book/view/fiscal_book.xml (+375/-244) l10n_ve_imex/model/seniat_form_86_config.py (+2/-2) l10n_ve_imex/view/seniat_form_86.xml (+2/-2) l10n_ve_imex/view/seniat_form_86_config.xml (+4/-0) |
||||
To merge this branch: | bzr merge lp:~vauxoo/openerp-venezuela-localization/ovl70-ffrr-rev-kty | ||||
Related bugs: |
|
||||
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
hbto [Vauxoo] http://www.vauxoo.com | Pending | ||
Review via email: mp+160994@code.launchpad.net |
Commit message
Description of the change
Working version of Purchase Book for domestic scope.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'l10n_ve_fiscal_book/demo/purchase_book_demo.xml' |
2 | --- l10n_ve_fiscal_book/demo/purchase_book_demo.xml 2013-03-01 10:15:44 +0000 |
3 | +++ l10n_ve_fiscal_book/demo/purchase_book_demo.xml 2013-04-25 19:45:35 +0000 |
4 | @@ -2,251 +2,13 @@ |
5 | <openerp> |
6 | <data> |
7 | |
8 | - <!-- Fiscal Book --> |
9 | - |
10 | <record id="fiscal_book_purchase_test" model="fiscal.book"> |
11 | - <field name="name">Purchase Book (Report Look&Feel test - Dont Update Lines)</field> |
12 | + <field name="name">Purchase Book (Test)</field> |
13 | <field name="type">purchase</field> |
14 | <field name="period_id" search="[]" model="account.period"/> |
15 | <field name="company_id" ref="base.main_company"/> |
16 | - <field name="note">Really large entry test</field> |
17 | - </record> |
18 | - |
19 | - <!-- Fiscal Book Taxes --> |
20 | - |
21 | - <!-- Fiscal Book Lines --> |
22 | - |
23 | - <record id="fiscal_book_line_purchase_1" model="fiscal.book.lines"> |
24 | - <field name="rank" eval="1"/> |
25 | - <field name="fb_id" ref="fiscal_book_purchase_test"/> |
26 | - <!-- |
27 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
28 | - --> |
29 | - <field name="get_credit_affected"> credit_affected PX1 </field> |
30 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
31 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
32 | - <field name="get_debit_affected"> debit_affected PX1</field> |
33 | - <field name="get_doc">Trans. Type PX1</field> |
34 | - <field name="get_number">CtrlN PX1</field> |
35 | - <field name="get_parent">CtrlN PX1</field> |
36 | - <field name="get_partner_name">Partner PX1</field> |
37 | - <field name="get_partner_vat">VAT PX1</field> |
38 | - <field name="get_reference">Inv Nro. PX1</field> |
39 | - <field name="get_t_doc">Doc. Type PX1</field> |
40 | - <!-- |
41 | - <field name="invoice_id" ref=""/> Invoice many2one |
42 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
43 | - --> |
44 | - </record> |
45 | - |
46 | - <record id="fiscal_book_line_purchase_2" model="fiscal.book.lines"> |
47 | - <field name="rank" eval="2"/> |
48 | - <field name="fb_id" ref="fiscal_book_purchase_test"/> |
49 | - <!-- |
50 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
51 | - --> |
52 | - <field name="get_credit_affected"> credit_affected PX2 </field> |
53 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
54 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
55 | - <field name="get_debit_affected"> debit_affected PX2</field> |
56 | - <field name="get_doc">Trans. Type PX2</field> |
57 | - <field name="get_number">CtrlN PX2</field> |
58 | - <field name="get_parent">CtrlN PX2</field> |
59 | - <field name="get_partner_name">Partner PX2</field> |
60 | - <field name="get_partner_vat">VAT PX2</field> |
61 | - <field name="get_reference">Inv Nro. PX2</field> |
62 | - <field name="get_t_doc">Doc. Type PX2</field> |
63 | - <!-- |
64 | - <field name="invoice_id" ref=""/> Invoice many2one |
65 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
66 | - --> |
67 | - </record> |
68 | - |
69 | - <record id="fiscal_book_line_purchase_3" model="fiscal.book.lines"> |
70 | - <field name="rank" eval="3"/> |
71 | - <field name="fb_id" ref="fiscal_book_purchase_test"/> |
72 | - <!-- |
73 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
74 | - --> |
75 | - <field name="get_credit_affected"> credit_affected PX3 </field> |
76 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
77 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
78 | - <field name="get_debit_affected"> debit_affected PX3</field> |
79 | - <field name="get_doc">Trans. Type PX3</field> |
80 | - <field name="get_number">CtrlN PX3</field> |
81 | - <field name="get_parent">CtrlN PX3</field> |
82 | - <field name="get_partner_name">Partner PX3</field> |
83 | - <field name="get_partner_vat">VAT PX3</field> |
84 | - <field name="get_reference">Inv Nro. PX3</field> |
85 | - <field name="get_t_doc">Doc. Type PX3</field> |
86 | - <!-- |
87 | - <field name="invoice_id" ref=""/> Invoice many2one |
88 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
89 | - --> |
90 | - </record> |
91 | - |
92 | - <record id="fiscal_book_line_purchase_4" model="fiscal.book.lines"> |
93 | - <field name="rank" eval="4"/> |
94 | - <field name="fb_id" ref="fiscal_book_purchase_test"/> |
95 | - <!-- |
96 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
97 | - --> |
98 | - <field name="get_credit_affected"> credit_affected PX4 </field> |
99 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
100 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
101 | - <field name="get_debit_affected"> debit_affected PX4</field> |
102 | - <field name="get_doc">Trans. Type PX4</field> |
103 | - <field name="get_number">CtrlN PX4</field> |
104 | - <field name="get_parent">CtrlN PX4</field> |
105 | - <field name="get_partner_name">Partner PX4</field> |
106 | - <field name="get_partner_vat">VAT PX4</field> |
107 | - <field name="get_reference">Inv Nro. PX4</field> |
108 | - <field name="get_t_doc">Doc. Type PX4</field> |
109 | - <!-- |
110 | - <field name="invoice_id" ref=""/> Invoice many2one |
111 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
112 | - --> |
113 | - </record> |
114 | - |
115 | - <record id="fiscal_book_line_purchase_5" model="fiscal.book.lines"> |
116 | - <field name="rank" eval="5"/> |
117 | - <field name="fb_id" ref="fiscal_book_purchase_test"/> |
118 | - <!-- |
119 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
120 | - --> |
121 | - <field name="get_credit_affected"> credit_affected PX5 </field> |
122 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
123 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
124 | - <field name="get_debit_affected"> debit_affected PX5</field> |
125 | - <field name="get_doc">Trans. Type PX5</field> |
126 | - <field name="get_number">CtrlN PX5</field> |
127 | - <field name="get_parent">CtrlN PX5</field> |
128 | - <field name="get_partner_name">Partner PX5</field> |
129 | - <field name="get_partner_vat">VAT PX5</field> |
130 | - <field name="get_reference">Inv Nro. PX5</field> |
131 | - <field name="get_t_doc">Doc. Type PX5</field> |
132 | - <!-- |
133 | - <field name="invoice_id" ref=""/> Invoice many2one |
134 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
135 | - --> |
136 | - </record> |
137 | - |
138 | - <record id="fiscal_book_line_purchase_6" model="fiscal.book.lines"> |
139 | - <field name="rank" eval="6"/> |
140 | - <field name="fb_id" ref="fiscal_book_purchase_test"/> |
141 | - <!-- |
142 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
143 | - --> |
144 | - <field name="get_credit_affected"> credit_affected PX6 </field> |
145 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
146 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
147 | - <field name="get_debit_affected"> debit_affected PX6</field> |
148 | - <field name="get_doc">Trans. Type PX6</field> |
149 | - <field name="get_number">CtrlN PX6</field> |
150 | - <field name="get_parent">CtrlN PX6</field> |
151 | - <field name="get_partner_name">Partner PX6</field> |
152 | - <field name="get_partner_vat">VAT PX6</field> |
153 | - <field name="get_reference">Inv Nro. PX6</field> |
154 | - <field name="get_t_doc">Doc. Type PX6</field> |
155 | - <!-- |
156 | - <field name="invoice_id" ref=""/> Invoice many2one |
157 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
158 | - --> |
159 | - </record> |
160 | - |
161 | - <record id="fiscal_book_line_purchase_7" model="fiscal.book.lines"> |
162 | - <field name="rank" eval="7"/> |
163 | - <field name="fb_id" ref="fiscal_book_purchase_test"/> |
164 | - <!-- |
165 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
166 | - --> |
167 | - <field name="get_credit_affected"> credit_affected PX7 </field> |
168 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
169 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
170 | - <field name="get_debit_affected"> debit_affected PX7</field> |
171 | - <field name="get_doc">Trans. Type PX7</field> |
172 | - <field name="get_number">CtrlN PX7</field> |
173 | - <field name="get_parent">CtrlN PX7</field> |
174 | - <field name="get_partner_name">Partner PX7</field> |
175 | - <field name="get_partner_vat">VAT PX7</field> |
176 | - <field name="get_reference">Inv Nro. PX7</field> |
177 | - <field name="get_t_doc">Doc. Type PX7</field> |
178 | - <!-- |
179 | - <field name="invoice_id" ref=""/> Invoice many2one |
180 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
181 | - --> |
182 | - </record> |
183 | - |
184 | - <record id="fiscal_book_line_purchase_8" model="fiscal.book.lines"> |
185 | - <field name="rank" eval="8"/> |
186 | - <field name="fb_id" ref="fiscal_book_purchase_test"/> |
187 | - <!-- |
188 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
189 | - --> |
190 | - <field name="get_credit_affected"> credit_affected PX8 </field> |
191 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
192 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
193 | - <field name="get_debit_affected"> debit_affected PX8</field> |
194 | - <field name="get_doc">Trans. Type PX8</field> |
195 | - <field name="get_number">CtrlN PX8</field> |
196 | - <field name="get_parent">CtrlN PX8</field> |
197 | - <field name="get_partner_name">Partner PX8</field> |
198 | - <field name="get_partner_vat">VAT PX8</field> |
199 | - <field name="get_reference">Inv Nro. PX8</field> |
200 | - <field name="get_t_doc">Doc. Type PX8</field> |
201 | - <!-- |
202 | - <field name="invoice_id" ref=""/> Invoice many2one |
203 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
204 | - --> |
205 | - </record> |
206 | - |
207 | - <record id="fiscal_book_line_purchase_9" model="fiscal.book.lines"> |
208 | - <field name="rank" eval="9"/> |
209 | - <field name="fb_id" ref="fiscal_book_purchase_test"/> |
210 | - <!-- |
211 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
212 | - --> |
213 | - <field name="get_credit_affected"> credit_affected PX9 </field> |
214 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
215 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
216 | - <field name="get_debit_affected"> debit_affected PX9</field> |
217 | - <field name="get_doc">Trans. Type PX9</field> |
218 | - <field name="get_number">CtrlN PX9</field> |
219 | - <field name="get_parent">CtrlN PX9</field> |
220 | - <field name="get_partner_name">Partner PX9</field> |
221 | - <field name="get_partner_vat">VAT PX9</field> |
222 | - <field name="get_reference">Inv Nro. PX9</field> |
223 | - <field name="get_t_doc">Doc. Type PX9</field> |
224 | - <!-- |
225 | - <field name="invoice_id" ref=""/> Invoice many2one |
226 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
227 | - --> |
228 | - </record> |
229 | - |
230 | - <record id="fiscal_book_line_purchase_0" model="fiscal.book.lines"> |
231 | - <field name="rank" eval="0"/> |
232 | - <field name="fb_id" ref="fiscal_book_purchase_test"/> |
233 | - <!-- |
234 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
235 | - --> |
236 | - <field name="get_credit_affected"> credit_affected PX0 </field> |
237 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
238 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
239 | - <field name="get_debit_affected"> debit_affected PX0</field> |
240 | - <field name="get_doc">Trans. Type PX0</field> |
241 | - <field name="get_number">CtrlN PX0</field> |
242 | - <field name="get_parent">CtrlN PX0</field> |
243 | - <field name="get_partner_name">Partner PX0</field> |
244 | - <field name="get_partner_vat">VAT PX0</field> |
245 | - <field name="get_reference">Inv Nro. PX0</field> |
246 | - <field name="get_t_doc">Doc. Type PX0</field> |
247 | - <!-- |
248 | - <field name="invoice_id" ref=""/> Invoice many2one |
249 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
250 | - --> |
251 | - </record> |
252 | - |
253 | - <!-- Fiscal Book Lines Taxes --> |
254 | + <field name="note">Purchase Book (Test)</field> |
255 | + </record> |
256 | |
257 | </data> |
258 | </openerp> |
259 | |
260 | === modified file 'l10n_ve_fiscal_book/demo/sale_book_demo.xml' |
261 | --- l10n_ve_fiscal_book/demo/sale_book_demo.xml 2013-03-01 10:15:44 +0000 |
262 | +++ l10n_ve_fiscal_book/demo/sale_book_demo.xml 2013-04-25 19:45:35 +0000 |
263 | @@ -2,252 +2,13 @@ |
264 | <openerp> |
265 | <data> |
266 | |
267 | - <!-- Fiscal Book --> |
268 | - |
269 | <record id="fiscal_book_sale_test" model="fiscal.book"> |
270 | - <field name="name">Sale Book (Report Look&Feel test - Dont Update Lines)</field> |
271 | + <field name="name">Sale Book (Test)</field> |
272 | <field name="type">sale</field> |
273 | <field name="period_id" search="[]" model="account.period"/> |
274 | <field name="company_id" ref="base.main_company"/> |
275 | - <field name="note">Really large entry test</field> |
276 | - </record> |
277 | - |
278 | - <!-- Fiscal Book Taxes --> |
279 | - |
280 | - <!-- Fiscal Book Lines --> |
281 | - |
282 | - <record id="fiscal_book_line_sale_00" model="fiscal.book.lines"> |
283 | - <field name="rank" eval="00"/> |
284 | - <field name="fb_id" ref="fiscal_book_sale_test"/> |
285 | - <!-- |
286 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
287 | - --> |
288 | - <field name="get_credit_affected"> credit_affected SX00 </field> |
289 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
290 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
291 | - <field name="get_debit_affected"> debit_affected SX00</field> |
292 | - <field name="get_doc">Trans. Type SX00</field> |
293 | - <field name="get_number">CtrlN SX00</field> |
294 | - <field name="get_parent">CtrlN SX00</field> |
295 | - <field name="get_partner_name">Partner SX00</field> |
296 | - <field name="get_partner_vat">VAT SX00</field> |
297 | - <field name="get_reference">Inv Nro. SX00</field> |
298 | - <field name="get_t_doc">Doc. Type SX00</field> |
299 | - <!-- |
300 | - <field name="invoice_id" ref=""/> Invoice many2one |
301 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
302 | - --> |
303 | - </record> |
304 | - |
305 | - <record id="fiscal_book_line_sale_01" model="fiscal.book.lines"> |
306 | - <field name="rank" eval="01"/> |
307 | - <field name="fb_id" ref="fiscal_book_sale_test"/> |
308 | - <!-- |
309 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
310 | - --> |
311 | - <field name="get_credit_affected"> credit_affected SX01 </field> |
312 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
313 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
314 | - <field name="get_debit_affected"> debit_affected SX01</field> |
315 | - <field name="get_doc">Trans. Type SX01</field> |
316 | - <field name="get_number">CtrlN SX01</field> |
317 | - <field name="get_parent">CtrlN SX01</field> |
318 | - <field name="get_partner_name">Partner SX01</field> |
319 | - <field name="get_partner_vat">VAT SX01</field> |
320 | - <field name="get_reference">Inv Nro. SX01</field> |
321 | - <field name="get_t_doc">Doc. Type SX01</field> |
322 | - <!-- |
323 | - <field name="invoice_id" ref=""/> Invoice many2one |
324 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
325 | - --> |
326 | - </record> |
327 | - |
328 | - <record id="fiscal_book_line_sale_02" model="fiscal.book.lines"> |
329 | - <field name="rank" eval="02"/> |
330 | - <field name="fb_id" ref="fiscal_book_sale_test"/> |
331 | - <!-- |
332 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
333 | - --> |
334 | - <field name="get_credit_affected"> credit_affected SX02 </field> |
335 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
336 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
337 | - <field name="get_debit_affected"> debit_affected SX02</field> |
338 | - <field name="get_doc">Trans. Type SX02</field> |
339 | - <field name="get_number">CtrlN SX02</field> |
340 | - <field name="get_parent">CtrlN SX02</field> |
341 | - <field name="get_partner_name">Partner SX02</field> |
342 | - <field name="get_partner_vat">VAT SX02</field> |
343 | - <field name="get_reference">Inv Nro. SX02</field> |
344 | - <field name="get_t_doc">Doc. Type SX02</field> |
345 | - <!-- |
346 | - <field name="invoice_id" ref=""/> Invoice many2one |
347 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
348 | - --> |
349 | - </record> |
350 | - |
351 | - <record id="fiscal_book_line_sale_03" model="fiscal.book.lines"> |
352 | - <field name="rank" eval="03"/> |
353 | - <field name="fb_id" ref="fiscal_book_sale_test"/> |
354 | - <!-- |
355 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
356 | - --> |
357 | - <field name="get_credit_affected"> credit_affected SX03 </field> |
358 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
359 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
360 | - <field name="get_debit_affected"> debit_affected SX03</field> |
361 | - <field name="get_doc">Trans. Type SX03</field> |
362 | - <field name="get_number">CtrlN SX03</field> |
363 | - <field name="get_parent">CtrlN SX03</field> |
364 | - <field name="get_partner_name">Partner SX03</field> |
365 | - <field name="get_partner_vat">VAT SX03</field> |
366 | - <field name="get_reference">Inv Nro. SX03</field> |
367 | - <field name="get_t_doc">Doc. Type SX03</field> |
368 | - <!-- |
369 | - <field name="invoice_id" ref=""/> Invoice many2one |
370 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
371 | - --> |
372 | - </record> |
373 | - |
374 | - <record id="fiscal_book_line_sale_04" model="fiscal.book.lines"> |
375 | - <field name="rank" eval="04"/> |
376 | - <field name="fb_id" ref="fiscal_book_sale_test"/> |
377 | - <!-- |
378 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
379 | - --> |
380 | - <field name="get_credit_affected"> credit_affected SX04 </field> |
381 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
382 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
383 | - <field name="get_debit_affected"> debit_affected SX04</field> |
384 | - <field name="get_doc">Trans. Type SX04</field> |
385 | - <field name="get_number">CtrlN SX04</field> |
386 | - <field name="get_parent">CtrlN SX04</field> |
387 | - <field name="get_partner_name">Partner SX04</field> |
388 | - <field name="get_partner_vat">VAT SX04</field> |
389 | - <field name="get_reference">Inv Nro. SX04</field> |
390 | - <field name="get_t_doc">Doc. Type SX04</field> |
391 | - <!-- |
392 | - <field name="invoice_id" ref=""/> Invoice many2one |
393 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
394 | - --> |
395 | - </record> |
396 | - |
397 | - <record id="fiscal_book_line_sale_05" model="fiscal.book.lines"> |
398 | - <field name="rank" eval="05"/> |
399 | - <field name="fb_id" ref="fiscal_book_sale_test"/> |
400 | - <!-- |
401 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
402 | - --> |
403 | - <field name="get_credit_affected"> credit_affected SX05 </field> |
404 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
405 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
406 | - <field name="get_debit_affected"> debit_affected SX05</field> |
407 | - <field name="get_doc">Trans. Type SX05</field> |
408 | - <field name="get_number">CtrlN SX05</field> |
409 | - <field name="get_parent">CtrlN SX05</field> |
410 | - <field name="get_partner_name">Partner SX05</field> |
411 | - <field name="get_partner_vat">VAT SX05</field> |
412 | - <field name="get_reference">Inv Nro. SX05</field> |
413 | - <field name="get_t_doc">Doc. Type SX05</field> |
414 | - <!-- |
415 | - <field name="invoice_id" ref=""/> Invoice many2one |
416 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
417 | - --> |
418 | - </record> |
419 | - |
420 | - <record id="fiscal_book_line_sale_06" model="fiscal.book.lines"> |
421 | - <field name="rank" eval="06"/> |
422 | - <field name="fb_id" ref="fiscal_book_sale_test"/> |
423 | - <!-- |
424 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
425 | - --> |
426 | - <field name="get_credit_affected"> credit_affected SX06 </field> |
427 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
428 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
429 | - <field name="get_debit_affected"> debit_affected SX06</field> |
430 | - <field name="get_doc">Trans. Type SX06</field> |
431 | - <field name="get_number">CtrlN SX06</field> |
432 | - <field name="get_parent">CtrlN SX06</field> |
433 | - <field name="get_partner_name">Partner SX06</field> |
434 | - <field name="get_partner_vat">VAT SX06</field> |
435 | - <field name="get_reference">Inv Nro. SX06</field> |
436 | - <field name="get_t_doc">Doc. Type SX06</field> |
437 | - <!-- |
438 | - <field name="invoice_id" ref=""/> Invoice many2one |
439 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
440 | - --> |
441 | - </record> |
442 | - |
443 | - <record id="fiscal_book_line_sale_07" model="fiscal.book.lines"> |
444 | - <field name="rank" eval="07"/> |
445 | - <field name="fb_id" ref="fiscal_book_sale_test"/> |
446 | - <!-- |
447 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
448 | - --> |
449 | - <field name="get_credit_affected"> credit_affected SX07 </field> |
450 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
451 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
452 | - <field name="get_debit_affected"> debit_affected SX07</field> |
453 | - <field name="get_doc">Trans. Type SX07</field> |
454 | - <field name="get_number">CtrlN SX07</field> |
455 | - <field name="get_parent">CtrlN SX07</field> |
456 | - <field name="get_partner_name">Partner SX07</field> |
457 | - <field name="get_partner_vat">VAT SX07</field> |
458 | - <field name="get_reference">Inv Nro. SX07</field> |
459 | - <field name="get_t_doc">Doc. Type SX07</field> |
460 | - <!-- |
461 | - <field name="invoice_id" ref=""/> Invoice many2one |
462 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
463 | - --> |
464 | - </record> |
465 | - |
466 | - <record id="fiscal_book_line_sale_08" model="fiscal.book.lines"> |
467 | - <field name="rank" eval="8"/> |
468 | - <field name="fb_id" ref="fiscal_book_sale_test"/> |
469 | - <!-- |
470 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
471 | - --> |
472 | - <field name="get_credit_affected"> credit_affected SX08 </field> |
473 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
474 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
475 | - <field name="get_debit_affected"> debit_affected SX08</field> |
476 | - <field name="get_doc">Trans. Type SX08</field> |
477 | - <field name="get_number">CtrlN SX08</field> |
478 | - <field name="get_parent">CtrlN SX08</field> |
479 | - <field name="get_partner_name">Partner SX08</field> |
480 | - <field name="get_partner_vat">VAT SX08</field> |
481 | - <field name="get_reference">Inv Nro. SX08</field> |
482 | - <field name="get_t_doc">Doc. Type SX08</field> |
483 | - <!-- |
484 | - <field name="invoice_id" ref=""/> Invoice many2one |
485 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
486 | - --> |
487 | - </record> |
488 | - |
489 | - <record id="fiscal_book_line_sale_09" model="fiscal.book.lines"> |
490 | - <field name="rank" eval="9"/> |
491 | - <field name="fb_id" ref="fiscal_book_sale_test"/> |
492 | - <!-- |
493 | - <field name="fblt_ids" ref=""/> #### Tax Lines one2many |
494 | - --> |
495 | - <field name="get_credit_affected"> credit_affected SX09 </field> |
496 | - <field name="get_date_imported" eval="time.strftime('%Y-%m-%d')"/> |
497 | - <field name="get_date_invoiced" eval="time.strftime('%Y-%m-%d')"/> |
498 | - <field name="get_debit_affected"> debit_affected SX09</field> |
499 | - <field name="get_doc">Trans. Type SX09</field> |
500 | - <field name="get_number">CtrlN SX09</field> |
501 | - <field name="get_parent">CtrlN SX09</field> |
502 | - <field name="get_partner_name">Partner SX09</field> |
503 | - <field name="get_partner_vat">VAT SX09</field> |
504 | - <field name="get_reference">Inv Nro. SX09</field> |
505 | - <field name="get_t_doc">Doc. Type SX09</field> |
506 | - <!-- |
507 | - <field name="invoice_id" ref=""/> Invoice many2one |
508 | - <field name="iwdl_id" ref=""/> Vat Withholding many2one |
509 | - --> |
510 | - </record> |
511 | - |
512 | - |
513 | - <!-- Fiscal Book Lines Taxes --> |
514 | + <field name="note">Sale Book (Test)</field> |
515 | + </record> |
516 | |
517 | </data> |
518 | </openerp> |
519 | |
520 | === modified file 'l10n_ve_fiscal_book/model/fiscal_book.py' |
521 | --- l10n_ve_fiscal_book/model/fiscal_book.py 2013-04-16 15:42:12 +0000 |
522 | +++ l10n_ve_fiscal_book/model/fiscal_book.py 2013-04-25 19:45:35 +0000 |
523 | @@ -1,18 +1,18 @@ |
524 | #!/usr/bin/python |
525 | # -*- encoding: utf-8 -*- |
526 | -########################################################################### |
527 | +############################################################################### |
528 | # Module Writen to OpenERP, Open Source Management Solution |
529 | # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
530 | # All Rights Reserved |
531 | -###############Credits###################################################### |
532 | +############# Credits ######################################################### |
533 | # Coded by: Humberto Arocha <hbto@vauxoo.com> |
534 | # Katherine Zaoral <katherine.zaoral@vauxoo.com> |
535 | # Planified by: Humberto Arocha & Nhomar Hernandez |
536 | # Audited by: Humberto Arocha <hbto@vauxoo.com> |
537 | -############################################################################# |
538 | +############################################################################### |
539 | # This program is free software: you can redistribute it and/or modify |
540 | -# it under the terms of the GNU Affero General Public License as published by |
541 | -# the Free Software Foundation, either version 3 of the License, or |
542 | +# it under the terms of the GNU Affero General Public License as published |
543 | +# by the Free Software Foundation, either version 3 of the License, or |
544 | # (at your option) any later version. |
545 | # |
546 | # This program is distributed in the hope that it will be useful, |
547 | @@ -22,7 +22,7 @@ |
548 | # |
549 | # You should have received a copy of the GNU Affero General Public License |
550 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
551 | -############################################################################## |
552 | +############################################################################### |
553 | from openerp.osv import osv, orm, fields |
554 | from openerp.tools.translate import _ |
555 | from openerp.addons import decimal_precision as dp |
556 | @@ -41,18 +41,21 @@ |
557 | """ |
558 | context = context or {} |
559 | res = {}.fromkeys(ids, 'NO HAY DIRECCION FISCAL DEFINIDA') |
560 | - #~ TODO: ASK: what company, fisal.book.company_id? |
561 | - addr = self.pool.get('res.users').browse(cr,uid,uid,context=context).company_id.partner_id |
562 | + #~ TODO: ASK: what company, fisal.book.company_id? |
563 | + addr = self.pool.get('res.users').browse( |
564 | + cr, uid, uid, context=context).company_id.partner_id |
565 | for fb_id in ids: |
566 | if addr: |
567 | - res[fb_id] = addr.type == 'invoice' and (addr.street or '') + ' ' + \ |
568 | - (addr.street2 or '') + ' ' + (addr.zip or '') + ' ' + \ |
569 | - (addr.city or '') + ' ' + \ |
570 | - (addr.country_id and addr.country_id.name or '')+ ', TELF.:' + \ |
571 | - (addr.phone or '') or 'NO HAY DIRECCION FISCAL DEFINIDA' |
572 | + res[fb_id] = addr.type == 'invoice' and (addr.street or '') + \ |
573 | + ' ' + (addr.street2 or '') + ' ' + (addr.zip or '') + ' ' \ |
574 | + + (addr.city or '') + ' ' + \ |
575 | + (addr.country_id and addr.country_id.name or '') + \ |
576 | + ', TELF.:' + (addr.phone or '') or \ |
577 | + 'NO HAY DIRECCION FISCAL DEFINIDA' |
578 | return res |
579 | |
580 | - def _get_total_with_iva_sum(self, cr, uid, ids, field_names, arg, context=None): |
581 | + def _get_total_with_iva_sum(self, cr, uid, ids, field_names, arg, |
582 | + context=None): |
583 | """ It returns sum of of all columns total with iva of the fiscal book |
584 | lines. |
585 | @param field_name: ['get_total_with_iva_sum', |
586 | @@ -63,28 +66,30 @@ |
587 | for fb_brw in self.browse(cr, uid, ids, context=context): |
588 | for fbl_brw in fb_brw.fbl_ids: |
589 | if fbl_brw.invoice_id: |
590 | - if fbl_brw.get_is_imported: |
591 | - res[fb_brw.id]['get_total_with_iva_i_sum']+= fbl_brw.get_total_with_iva |
592 | - else: |
593 | - res[fb_brw.id]['get_total_with_iva_n_sum']+= fbl_brw.get_total_with_iva |
594 | + if fbl_brw.invoice_is_imported: |
595 | + res[fb_brw.id]['get_total_with_iva_i_sum'] += \ |
596 | + fbl_brw.total_with_iva |
597 | + else: |
598 | + res[fb_brw.id]['get_total_with_iva_n_sum'] += \ |
599 | + fbl_brw.total_with_iva |
600 | |
601 | res[fb_brw.id]['get_total_with_iva_sum'] = \ |
602 | - res[fb_brw.id]['get_total_with_iva_i_sum'] + \ |
603 | - res[fb_brw.id]['get_total_with_iva_n_sum'] |
604 | + res[fb_brw.id]['get_total_with_iva_i_sum'] + \ |
605 | + res[fb_brw.id]['get_total_with_iva_n_sum'] |
606 | |
607 | return res |
608 | |
609 | def _totalization(self, cr, uid, ids, field_name, arg, context=None): |
610 | """ It returns summation of a fiscal book tax column (Using |
611 | - fiscal.book.taxes.summary). |
612 | + fiscal.book.taxes.summary). |
613 | @param: field [ 'get_vat_exempt_i_sum', 'get_vat_exempt_n_sum', |
614 | - 'get_vat_sdcf_n_sum', 'get_vat_sdcf_i_sum', |
615 | - 'get_vat_general_i_base_sum', 'get_vat_general_i_tax_sum', |
616 | - 'get_vat_additional_i_base_sum', 'get_vat_additional_i_tax_sum', |
617 | - 'get_vat_reduced_i_base_sum', 'get_vat_reduced_i_tax_sum', |
618 | - 'get_vat_general_n_base_sum', 'get_vat_general_n_tax_sum', |
619 | - 'get_vat_additional_n_base_sum', 'get_vat_additional_n_tax_sum', |
620 | - 'get_vat_reduced_n_base_sum', 'get_vat_reduced_n_tax_sum' ] |
621 | + 'get_vat_sdcf_n_sum', 'get_vat_sdcf_i_sum', |
622 | + 'get_vat_general_i_base_sum', 'get_vat_general_i_tax_sum', |
623 | + 'get_vat_additional_i_base_sum', 'get_vat_additional_i_tax_sum', |
624 | + 'get_vat_reduced_i_base_sum', 'get_vat_reduced_i_tax_sum', |
625 | + 'get_vat_general_n_base_sum', 'get_vat_general_n_tax_sum', |
626 | + 'get_vat_additional_n_base_sum', 'get_vat_additional_n_tax_sum', |
627 | + 'get_vat_reduced_n_base_sum', 'get_vat_reduced_n_tax_sum' ] |
628 | """ |
629 | context = context or {} |
630 | res = {}.fromkeys(ids, 0.0) |
631 | @@ -93,20 +98,21 @@ |
632 | #~ Identifying the field |
633 | field_info = field_name[8:][:-4].split('_') |
634 | field_tax, field_scope, field_amount = (len(field_info) == 3) \ |
635 | - and field_info \ |
636 | - or field_info+['base'] |
637 | + and field_info \ |
638 | + or field_info + ['base'] |
639 | |
640 | - #~ Translation between the fb fields names and the fbts records data. |
641 | - tax_type = { 'exempt': 'exento', 'sdcf': 'sdcf', 'reduced': 'reducido', |
642 | - 'general': 'general', 'additional': 'adicional' } |
643 | - amount_type = { 'base': 'base_amount_sum', 'tax': 'tax_amount_sum' } |
644 | - scope_type = { 'n': False, 'i': True } |
645 | + #~ Translation between the fb fields names and the fbts records data. |
646 | + tax_type = {'exempt': 'exento', 'sdcf': 'sdcf', 'reduced': 'reducido', |
647 | + 'general': 'general', 'additional': 'adicional'} |
648 | + amount_type = {'base': 'base_amount_sum', 'tax': 'tax_amount_sum'} |
649 | + scope_type = {'n': False, 'i': True} |
650 | |
651 | #~ Calculate |
652 | for fb_brw in self.browse(cr, uid, ids, context=context): |
653 | for fbts_brw in fb_brw.fbts_ids: |
654 | if fbts_brw.tax_type == tax_type[field_tax] and fbts_brw.international == scope_type[field_scope]: |
655 | - res[fb_brw.id] = getattr( fbts_brw, amount_type[field_amount] ) |
656 | + res[fb_brw.id] = \ |
657 | + getattr(fbts_brw, amount_type[field_amount]) |
658 | return res |
659 | |
660 | def _get_vat_sdcf_sum(self, cr, uid, ids, field_name, arg, context=None): |
661 | @@ -119,7 +125,8 @@ |
662 | res[fb_id] = fb_obj.get_vat_sdcf_n_sum + fb_obj.get_vat_sdcf_i_sum |
663 | return res |
664 | |
665 | - def _get_vat_all_base_sum(self, cr, uid, ids, field_name, arg, context=None): |
666 | + def _get_vat_all_base_sum(self, cr, uid, ids, field_name, arg, |
667 | + context=None): |
668 | """ It calculate sum of all tax base (reduced, general and additional) |
669 | for international and domestic scope. |
670 | @param field_name: field ['get_vat_all_i_base_sum', |
671 | @@ -131,187 +138,345 @@ |
672 | for fb_brw in self.browse(cr, uid, ids, context=context): |
673 | if field_name == 'get_vat_all_i_base_sum': |
674 | res[fb_brw.id] = fb_brw.get_vat_general_i_base_sum + \ |
675 | - fb_brw.get_vat_additional_i_base_sum + \ |
676 | - fb_brw.get_vat_reduced_i_base_sum |
677 | + fb_brw.get_vat_additional_i_base_sum + \ |
678 | + fb_brw.get_vat_reduced_i_base_sum |
679 | if field_name == 'get_vat_all_n_base_sum': |
680 | res[fb_brw.id] = fb_brw.get_vat_general_n_base_sum + \ |
681 | - fb_brw.get_vat_additional_n_base_sum + \ |
682 | - fb_brw.get_vat_reduced_n_base_sum |
683 | + fb_brw.get_vat_additional_n_base_sum + \ |
684 | + fb_brw.get_vat_reduced_n_base_sum |
685 | + return res |
686 | + |
687 | + def _get_total_tax_credit_debit(self, cr, uid, ids, field_names, arg, |
688 | + context=None): |
689 | + """ It returns sum of of all data in the fiscal book summary table. |
690 | + @param field_name: ['get_total_tax_credit_debit_base_sum', |
691 | + 'get_total_tax_credit_debit_tax_sum']""" |
692 | + context = context or {} |
693 | + res = {}.fromkeys(ids, {}.fromkeys(field_names, 0.0)) |
694 | + for fb_brw in self.browse(cr, uid, ids, context=context): |
695 | + res[fb_brw.id]['get_total_tax_credit_debit_base_sum'] += \ |
696 | + fb_brw.get_vat_sdcf_i_sum + \ |
697 | + fb_brw.get_vat_general_i_base_sum + \ |
698 | + fb_brw.get_vat_additional_i_base_sum + \ |
699 | + fb_brw.get_vat_reduced_i_base_sum + \ |
700 | + fb_brw.get_vat_sdcf_n_sum + \ |
701 | + fb_brw.get_vat_general_n_base_sum + \ |
702 | + fb_brw.get_vat_additional_n_base_sum + \ |
703 | + fb_brw.get_vat_reduced_n_base_sum |
704 | + res[fb_brw.id]['get_total_tax_credit_debit_tax_sum'] += \ |
705 | + fb_brw.get_vat_general_i_tax_sum + \ |
706 | + fb_brw.get_vat_additional_i_tax_sum + \ |
707 | + fb_brw.get_vat_reduced_i_tax_sum + \ |
708 | + fb_brw.get_vat_general_n_tax_sum + \ |
709 | + fb_brw.get_vat_additional_n_tax_sum + \ |
710 | + fb_brw.get_vat_reduced_n_tax_sum |
711 | + |
712 | + return res |
713 | + |
714 | + def _get_wh(self, cr, uid, ids, field_names, arg, context=None): |
715 | + """ It returns sum of all data in the withholding summary table. |
716 | + @param field_name: ['get_total_wh_sum', 'get_previous_wh_sum', |
717 | + 'get_wh_sum']""" |
718 | + #~ TODO: this works if its ensuring that that emmision date is always |
719 | + #~ set and and all periods for every past dates are created. |
720 | + context = context or {} |
721 | + res = {}.fromkeys(ids, {}.fromkeys(field_names, 0.0)) |
722 | + period_obj = self.pool.get('account.period') |
723 | + for fb_brw in self.browse(cr, uid, ids, context=context): |
724 | + for fbl_brw in fb_brw.fbl_ids: |
725 | + if fbl_brw.iwdl_id: |
726 | + emission_period = period_obj.find(cr, uid, |
727 | + fbl_brw.emission_date, |
728 | + context=context) |
729 | + if emission_period[0] == fb_brw.period_id.id: |
730 | + res[fb_brw.id]['get_wh_sum'] += \ |
731 | + fbl_brw.iwdl_id.amount_tax_ret |
732 | + res[fb_brw.id]['get_wh_debit_credit_sum'] += \ |
733 | + fbl_brw.get_wh_debit_credit |
734 | + else: |
735 | + res[fb_brw.id]['get_previous_wh_sum'] += \ |
736 | + fbl_brw.iwdl_id.amount_tax_ret |
737 | + res[fb_brw.id]['get_total_wh_sum'] = \ |
738 | + res[fb_brw.id]['get_wh_sum'] + \ |
739 | + res[fb_brw.id]['get_previous_wh_sum'] |
740 | return res |
741 | |
742 | _description = "Venezuela's Sale & Purchase Fiscal Books" |
743 | - _name='fiscal.book' |
744 | + _name = 'fiscal.book' |
745 | _inherit = ['mail.thread'] |
746 | - _columns={ |
747 | - 'name':fields.char('Description', size=256, required=True), |
748 | - 'company_id':fields.many2one('res.company','Company', |
749 | - help='Company',required=True), |
750 | - 'period_id':fields.many2one('account.period','Period', |
751 | - help="Book's Fiscal Period",required=True), |
752 | - 'state': fields.selection([('draft','Getting Ready'), |
753 | - ('open','Approved by Manager'),('done','Seniat Submitted')], |
754 | - string='Status', required=True), |
755 | - 'type': fields.selection([('sale','Sale Book'), |
756 | - ('purchase','Purchase Book')], |
757 | - help='Select Sale for Customers and Purchase for Suppliers', |
758 | - string='Book Type', required=True), |
759 | - 'base_amount':fields.float('Taxable Amount',help='Amount used as Taxing Base'), |
760 | - 'tax_amount':fields.float('Taxed Amount',help='Taxed Amount on Taxing Base'), |
761 | - 'fbl_ids':fields.one2many('fiscal.book.lines', 'fb_id', 'Book Lines', |
762 | - help='Lines being recorded in a Fiscal Book'), |
763 | - 'fbt_ids':fields.one2many('fiscal.book.taxes', 'fb_id', 'Tax Lines', |
764 | - help='Taxes being recorded in a Fiscal Book'), |
765 | - 'fbts_ids':fields.one2many('fiscal.book.taxes.summary', 'fb_id', 'Tax Summary'), |
766 | - 'invoice_ids':fields.one2many('account.invoice', 'fb_id', 'Invoices', |
767 | - help='Invoices being recorded in a Fiscal Book'), |
768 | - 'issue_invoice_ids':fields.one2many('account.invoice', 'issue_fb_id', 'Issue Invoices', |
769 | - help='Invoices that are in pending state. Cancel or Draft'), |
770 | - 'iwdl_ids':fields.one2many('account.wh.iva.line', 'fb_id', 'Vat Withholdings', |
771 | - help='Vat Withholdings being recorded in a Fiscal Book'), |
772 | - 'abl_ids':fields.one2many('adjustment.book.line', 'fb_id', 'Adjustment Lines', |
773 | - help='Adjustment Lines being recorded in a Fiscal Book'), |
774 | - 'note': fields.text('Note',required=True), |
775 | + _columns = { |
776 | + 'name': fields.char('Description', size=256, required=True), |
777 | + 'company_id': fields.many2one('res.company', 'Company', |
778 | + help='Company', required=True), |
779 | + 'period_id': fields.many2one('account.period', 'Period', |
780 | + help="Book's Fiscal Period", |
781 | + required=True), |
782 | + 'state': fields.selection([('draft', 'Getting Ready'), |
783 | + ('open', 'Approved by Manager'), |
784 | + ('done', 'Seniat Submitted')], |
785 | + string='Status', required=True), |
786 | + 'type': fields.selection([('sale', 'Sale Book'), |
787 | + ('purchase', 'Purchase Book')], |
788 | + help='Select Sale for Customers and Purchase \ |
789 | + for Suppliers', |
790 | + string='Book Type', required=True), |
791 | + 'base_amount': fields.float('Taxable Amount', |
792 | + help='Amount used as Taxing Base'), |
793 | + 'tax_amount': fields.float('Taxed Amount', |
794 | + help='Taxed Amount on Taxing Base'), |
795 | + 'fbl_ids': fields.one2many('fiscal.book.lines', 'fb_id', 'Book Lines', |
796 | + help='Lines being recorded in the book'), |
797 | + 'fbt_ids': fields.one2many('fiscal.book.taxes', 'fb_id', 'Tax Lines', |
798 | + help='Taxes being recorded in the book'), |
799 | + 'fbts_ids': fields.one2many('fiscal.book.taxes.summary', 'fb_id', |
800 | + 'Tax Summary'), |
801 | + 'invoice_ids': fields.one2many('account.invoice', 'fb_id', 'Invoices', |
802 | + help='Invoices being recorded in a \ |
803 | + Fiscal Book'), |
804 | + 'issue_invoice_ids': fields.one2many('account.invoice', 'issue_fb_id', |
805 | + 'Issue Invoices', |
806 | + help='Invoices that are in \ |
807 | + pending state. Cancel or Draft'), |
808 | + 'iwdl_ids': fields.one2many('account.wh.iva.line', 'fb_id', |
809 | + 'Vat Withholdings', |
810 | + help='Vat Withholdings being recorded in \ |
811 | + a Fiscal Book'), |
812 | + 'abl_ids': fields.one2many('adjustment.book.line', 'fb_id', |
813 | + 'Adjustment Lines', |
814 | + help='Adjustment Lines being recorded in \ |
815 | + a Fiscal Book'), |
816 | + 'note': fields.text('Note', required=True), |
817 | |
818 | #~ Totalization fields depending on international scope |
819 | - 'get_total_with_iva_i_sum': fields.function(_get_total_with_iva_sum, |
820 | - type="float", method=True, store=True, |
821 | - multi="get_total_with_iva", |
822 | - string='International Total with VAT Sum'), |
823 | - 'get_total_with_iva_n_sum': fields.function(_get_total_with_iva_sum, |
824 | - type="float", method=True, store=True, |
825 | - multi="get_total_with_iva", |
826 | - string='Domestic Total with VAT Sum'), |
827 | - 'get_vat_exempt_i_sum': fields.function(_totalization, |
828 | - type="float", method=True, store=True, |
829 | - string="Exempt International Purchase Sum", |
830 | - help="Exempt International Purchase Sum"), |
831 | - 'get_vat_exempt_n_sum': fields.function(_totalization, |
832 | - type="float", method=True, store=True, |
833 | - string="Exempt Domestic Purchase Sum", |
834 | - help="Exempt Domestic Purchase Sum"), |
835 | - 'get_vat_sdcf_n_sum': fields.function(_totalization, |
836 | - type="float", method=True, store=True, |
837 | - string="NO GRAVADAS Y/O SIN DERECHO A CREDITO FISCAL", |
838 | - help="NO GRAVADAS Y/O SIN DERECHO A CREDITO FISCAL"), |
839 | - 'get_vat_sdcf_i_sum': fields.function(_totalization, |
840 | - type="float", method=True, store=True, |
841 | - string="IMPORTACIONES NO GRAVADAS Y/O SIN DERECHO A CREDITO FISCAL", |
842 | - help="IMPORTACIONES NO GRAVADAS Y/O SIN DERECHO A CREDITO FISCAL"), |
843 | - 'get_vat_general_i_base_sum': fields.function(_totalization, |
844 | - type="float", method=True, store=True, |
845 | - digits_compute=dp.get_precision('Account'), |
846 | - string="Importaciones Gravadas por Alícuota General (Base Imponible).", |
847 | - help="Importaciones Gravadas por Alícuota General (Base Imponible)."), |
848 | - 'get_vat_general_i_tax_sum': fields.function(_totalization, |
849 | - type="float", method=True, store=True, |
850 | - digits_compute=dp.get_precision('Account'), |
851 | - string="Importaciones Gravadas por Alícuota General (Crédito Fiscal)", |
852 | - help="Importaciones Gravadas por Alícuota General (Crédito Fiscal)."), |
853 | - 'get_vat_additional_i_base_sum': fields.function(_totalization, |
854 | - type="float", method=True, store=True, |
855 | - digits_compute=dp.get_precision('Account'), |
856 | - string="Importaciones Gravadas por Alícuota Gral. más Adicional (Base Imponible).", |
857 | - help="Importaciones Gravadas por Alícuota Gral. más Adicional (Base Imponible)."), |
858 | - 'get_vat_additional_i_tax_sum': fields.function(_totalization, |
859 | - type="float", method=True, store=True, |
860 | - digits_compute=dp.get_precision('Account'), |
861 | - string="Importaciones Gravadas por Alícuota Gral. más Adicional (Crédito Fiscal).", |
862 | - help="Importaciones Gravadas por Alícuota Gral. más Adicional (Crédito Fiscal)."), |
863 | - 'get_vat_reduced_i_base_sum': fields.function(_totalization, |
864 | - type="float", method=True, store=True, |
865 | - digits_compute=dp.get_precision('Account'), |
866 | - string="Importaciones Gravadas por Alícuota Reducida (Base Imponible).", |
867 | - help="Importaciones Gravadas por Alícuota Reducida (Base Imponible)."), |
868 | - 'get_vat_reduced_i_tax_sum': fields.function(_totalization, |
869 | - type="float", method=True, store=True, |
870 | - digits_compute=dp.get_precision('Account'), |
871 | - string="Importaciones Gravadas por Alícuota Reducida (Crédito Fiscal).", |
872 | - help="Importaciones Gravadas por Alícuota Reducida (Crédito Fiscal)."), |
873 | - 'get_vat_general_n_base_sum': fields.function(_totalization, |
874 | - type="float", method=True, store=True, |
875 | - digits_compute=dp.get_precision('Account'), |
876 | - string="Internas Gravadas sólo por Alícuota General (Base Imponible).", |
877 | - help="Internas Gravadas sólo por Alícuota General (Base Imponible)."), |
878 | - 'get_vat_general_n_tax_sum': fields.function(_totalization, |
879 | - type="float", method=True, store=True, |
880 | - digits_compute=dp.get_precision('Account'), |
881 | - string="Internas Gravadas sólo por Alícuota General (Crédito Fiscal).", |
882 | - help="Internas Gravadas sólo por Alícuota General (Crédito Fiscal)."), |
883 | - 'get_vat_additional_n_base_sum': fields.function(_totalization, |
884 | - type="float", method=True, store=True, |
885 | - digits_compute=dp.get_precision('Account'), |
886 | - string="Internas Gravadas sólo por Alícuota General más Adicional (Base Imponible).", |
887 | - help="Internas Gravadas sólo por Alícuota General más Adicional (Base Imponible)."), |
888 | - 'get_vat_additional_n_tax_sum': fields.function(_totalization, |
889 | - type="float", method=True, store=True, |
890 | - digits_compute=dp.get_precision('Account'), |
891 | - string="Internas Gravadas sólo por Alícuota General más Adicional (Crédito Fiscal).", |
892 | - help="Internas Gravadas sólo por Alícuota General más Adicional (Crédito Fiscal)."), |
893 | - 'get_vat_reduced_n_base_sum': fields.function(_totalization, |
894 | - type="float", method=True, store=True, |
895 | - digits_compute=dp.get_precision('Account'), |
896 | - string="Internas Gravadas por Alícuota Reducida (Base Imponible).", |
897 | - help="Internas Gravadas por Alícuota Reducida (Base Imponible)."), |
898 | - 'get_vat_reduced_n_tax_sum': fields.function(_totalization, |
899 | - type="float", method=True, store=True, |
900 | - digits_compute=dp.get_precision('Account'), |
901 | - string="Internas Gravadas por Alícuota Reducida (Crédito Fiscal).", |
902 | - help="Internas Gravadas por Alícuota Reducida (Crédito Fiscal)."), |
903 | - |
904 | - 'get_vat_all_i_base_sum': fields.function(_get_vat_all_base_sum, |
905 | - type="float", method=True, store=True, |
906 | - string="International base sum (reduced, general and additional)", |
907 | - help="International base sum (reduced, general and additional)"), |
908 | - 'get_vat_all_n_base_sum': fields.function(_get_vat_all_base_sum, |
909 | - type="float", method=True, store=True, |
910 | - string="Domestic base sum (reduced, general and additional)", |
911 | - help="Domestic base sum (reduced, general and additional)"), |
912 | + 'get_total_with_iva_i_sum': fields.function( |
913 | + _get_total_with_iva_sum, |
914 | + type="float", method=True, store=True, |
915 | + multi="get_total_with_iva", |
916 | + string='International Total with VAT Sum'), |
917 | + 'get_total_with_iva_n_sum': fields.function( |
918 | + _get_total_with_iva_sum, |
919 | + type="float", method=True, store=True, |
920 | + multi="get_total_with_iva", |
921 | + string='Domestic Total with VAT Sum'), |
922 | + |
923 | + 'get_vat_exempt_i_sum': fields.function( |
924 | + _totalization, |
925 | + type="float", method=True, store=True, |
926 | + string="Exempt International Purchase Sum", |
927 | + help="Exempt International Purchase Sum"), |
928 | + 'get_vat_exempt_n_sum': fields.function( |
929 | + _totalization, |
930 | + type="float", method=True, store=True, |
931 | + string="Exempt Domestic Purchase Sum", |
932 | + help="Exempt Domestic Purchase Sum"), |
933 | + 'get_vat_sdcf_n_sum': fields.function( |
934 | + _totalization, |
935 | + type="float", method=True, store=True, |
936 | + string="NO GRAVADAS Y/O SIN DERECHO A CREDITO FISCAL", |
937 | + help="NO GRAVADAS Y/O SIN DERECHO A CREDITO FISCAL"), |
938 | + 'get_vat_sdcf_i_sum': fields.function( |
939 | + _totalization, |
940 | + type="float", method=True, store=True, |
941 | + string="IMPORTACIONES NO GRAVADAS Y/O SIN DERECHO A CREDITO \ |
942 | + FISCAL", |
943 | + help="IMPORTACIONES NO GRAVADAS Y/O SIN DERECHO A CREDITO FISCAL"), |
944 | + 'get_vat_general_i_base_sum': fields.function( |
945 | + _totalization, |
946 | + type="float", method=True, store=True, |
947 | + digits_compute=dp.get_precision('Account'), |
948 | + string="Importaciones Gravadas por Alícuota General \ |
949 | + (Base Imponible).", |
950 | + help="Importaciones Gravadas por Alícuota General \ |
951 | + (Base Imponible)."), |
952 | + 'get_vat_general_i_tax_sum': fields.function( |
953 | + _totalization, |
954 | + type="float", method=True, store=True, |
955 | + digits_compute=dp.get_precision('Account'), |
956 | + string="Importaciones Gravadas por Alícuota General \ |
957 | + (Crédito Fiscal)", |
958 | + help="Importaciones Gravadas por Alícuota General \ |
959 | + (Crédito Fiscal)."), |
960 | + 'get_vat_additional_i_base_sum': fields.function( |
961 | + _totalization, |
962 | + type="float", method=True, store=True, |
963 | + digits_compute=dp.get_precision('Account'), |
964 | + string="Importaciones Gravadas por Alícuota Gral. más Adicional \ |
965 | + (Base Imponible).", |
966 | + help="Importaciones Gravadas por Alícuota Gral. más Adicional \ |
967 | + (Base Imponible)."), |
968 | + 'get_vat_additional_i_tax_sum': fields.function( |
969 | + _totalization, |
970 | + type="float", method=True, store=True, |
971 | + digits_compute=dp.get_precision('Account'), |
972 | + string="Importaciones Gravadas por Alícuota Gral. más Adicional \ |
973 | + (Crédito Fiscal).", |
974 | + help="Importaciones Gravadas por Alícuota Gral. más Adicional \ |
975 | + (Crédito Fiscal)."), |
976 | + 'get_vat_reduced_i_base_sum': fields.function( |
977 | + _totalization, |
978 | + type="float", method=True, store=True, |
979 | + digits_compute=dp.get_precision('Account'), |
980 | + string="Importaciones Gravadas por Alícuota Reducida \ |
981 | + (Base Imponible).", |
982 | + help="Importaciones Gravadas por Alícuota Reducida \ |
983 | + (Base Imponible)."), |
984 | + 'get_vat_reduced_i_tax_sum': fields.function( |
985 | + _totalization, |
986 | + type="float", method=True, store=True, |
987 | + digits_compute=dp.get_precision('Account'), |
988 | + string="Importaciones Gravadas por Alícuota Reducida \ |
989 | + (Crédito Fiscal).", |
990 | + help="Importaciones Gravadas por Alícuota Reducida \ |
991 | + (Crédito Fiscal)."), |
992 | + 'get_vat_general_n_base_sum': fields.function( |
993 | + _totalization, |
994 | + type="float", method=True, store=True, |
995 | + digits_compute=dp.get_precision('Account'), |
996 | + string="Internas Gravadas sólo por Alícuota General \ |
997 | + (Base Imponible).", |
998 | + help="Internas Gravadas sólo por Alícuota General \ |
999 | + (Base Imponible)."), |
1000 | + 'get_vat_general_n_tax_sum': fields.function( |
1001 | + _totalization, |
1002 | + type="float", method=True, store=True, |
1003 | + digits_compute=dp.get_precision('Account'), |
1004 | + string="Internas Gravadas sólo por Alícuota General \ |
1005 | + (Crédito Fiscal).", |
1006 | + help="Internas Gravadas sólo por Alícuota General \ |
1007 | + (Crédito Fiscal)."), |
1008 | + 'get_vat_additional_n_base_sum': fields.function( |
1009 | + _totalization, |
1010 | + type="float", method=True, store=True, |
1011 | + digits_compute=dp.get_precision('Account'), |
1012 | + string="Internas Gravadas sólo por Alícuota General más Adicional \ |
1013 | + (Base Imponible).", |
1014 | + help="Internas Gravadas sólo por Alícuota General más Adicional \ |
1015 | + (Base Imponible)."), |
1016 | + 'get_vat_additional_n_tax_sum': fields.function( |
1017 | + _totalization, |
1018 | + type="float", method=True, store=True, |
1019 | + digits_compute=dp.get_precision('Account'), |
1020 | + string="Internas Gravadas sólo por Alícuota General más Adicional \ |
1021 | + (Crédito Fiscal).", |
1022 | + help="Internas Gravadas sólo por Alícuota General más Adicional \ |
1023 | + (Crédito Fiscal)."), |
1024 | + 'get_vat_reduced_n_base_sum': fields.function( |
1025 | + _totalization, |
1026 | + type="float", method=True, store=True, |
1027 | + digits_compute=dp.get_precision('Account'), |
1028 | + string="Internas Gravadas por Alícuota Reducida (Base Imponible).", |
1029 | + help="Internas Gravadas por Alícuota Reducida (Base Imponible)."), |
1030 | + 'get_vat_reduced_n_tax_sum': fields.function( |
1031 | + _totalization, |
1032 | + type="float", method=True, store=True, |
1033 | + digits_compute=dp.get_precision('Account'), |
1034 | + string="Internas Gravadas por Alícuota Reducida (Crédito Fiscal).", |
1035 | + help="Internas Gravadas por Alícuota Reducida (Crédito Fiscal)."), |
1036 | + |
1037 | + 'get_vat_all_i_base_sum': fields.function( |
1038 | + _get_vat_all_base_sum, |
1039 | + type="float", method=True, store=True, |
1040 | + string="International base sum (reduced, general and additional)", |
1041 | + help="International base sum (reduced, general and additional)"), |
1042 | + 'get_vat_all_n_base_sum': fields.function( |
1043 | + _get_vat_all_base_sum, |
1044 | + type="float", method=True, store=True, |
1045 | + string="Domestic base sum (reduced, general and additional)", |
1046 | + help="Domestic base sum (reduced, general and additional)"), |
1047 | |
1048 | #~ Totalization fields that covers all scopes |
1049 | - 'get_total_with_iva_sum': fields.function(_get_total_with_iva_sum, |
1050 | - type="float", method=True, store=True, |
1051 | - multi="get_total_with_iva", |
1052 | - string='Total with VAT Sum'), |
1053 | - 'get_vat_sdcf_sum': fields.function(_get_vat_sdcf_sum, |
1054 | - type="float", method=True, store=True, |
1055 | - string="No Gravadas y/o Sin Derecho a Crédito Fiscal", |
1056 | - help="No Gravadas y/o Sin Derecho a Crédito Fiscal"), |
1057 | + 'get_total_with_iva_sum': fields.function( |
1058 | + _get_total_with_iva_sum, |
1059 | + type="float", method=True, store=True, |
1060 | + multi="get_total_with_iva", |
1061 | + string='Total with VAT Sum'), |
1062 | + 'get_vat_sdcf_sum': fields.function( |
1063 | + _get_vat_sdcf_sum, |
1064 | + type="float", method=True, store=True, |
1065 | + string="No Gravadas y/o Sin Derecho a Crédito Fiscal", |
1066 | + help="No Gravadas y/o Sin Derecho a Crédito Fiscal"), |
1067 | + |
1068 | + 'get_total_tax_credit_debit_base_sum': fields.function( |
1069 | + _get_total_tax_credit_debit, |
1070 | + type="float", method=True, store=True, |
1071 | + multi="get_total_tax_credit_debit", |
1072 | + string="Base Amount for Tax (Debit/Credit) Total for \ |
1073 | + (Sale/Pruchase)", |
1074 | + help="Base Imponible del Total (Débitos/Créditos) Fiscales para \ |
1075 | + el libro de (Venta/Compra)"), |
1076 | + 'get_total_tax_credit_debit_tax_sum': fields.function( |
1077 | + _get_total_tax_credit_debit, |
1078 | + type="float", method=True, store=True, |
1079 | + multi="get_total_tax_credit_debit", |
1080 | + string="Tax Amount for Tax (Debit/Credit) Total for \ |
1081 | + (Sale/Pruchase)", |
1082 | + help="Monto Imponible del Total (Débitos/Créditos) Fiscales para \ |
1083 | + el libro de (Venta/Compra)"), |
1084 | + |
1085 | + 'get_wh_sum': fields.function( |
1086 | + _get_wh, |
1087 | + type="float", method=True, store=True, multi="get_wh", |
1088 | + string="Current Period Withholding", |
1089 | + help="Used at \ |
1090 | + 1. Totalization row in Fiscal Book Line block at Withholding VAT \ |
1091 | + Column \ |
1092 | + 2. Second row at the Withholding Summary block"), |
1093 | + 'get_previous_wh_sum': fields.function( |
1094 | + _get_wh, |
1095 | + type="float", method=True, store=True, multi="get_wh", |
1096 | + string="Previous Period Withholding", |
1097 | + help="First row at the Withholding Summary block"), |
1098 | + 'get_total_wh_sum': fields.function( |
1099 | + _get_wh, |
1100 | + type="float", method=True, store=True, multi="get_wh", |
1101 | + string="VAT Withholding Sum", |
1102 | + help="Totalization row at the Withholding Summary block"), |
1103 | + 'get_wh_debit_credit_sum': fields.function( |
1104 | + _get_wh, |
1105 | + type="float", method=True, store=True, multi="get_wh", |
1106 | + string="Based Tax Debit Sum", |
1107 | + help="Totalization row in Fiscal Book Line block at \ |
1108 | + Based Tax Debit Column"), |
1109 | |
1110 | #~ Printable report data |
1111 | - 'get_partner_addr': fields.function(_get_partner_addr, |
1112 | - type="text", method=True, |
1113 | - help='Partner address printable format'), |
1114 | + 'get_partner_addr': fields.function( |
1115 | + _get_partner_addr, |
1116 | + type="text", method=True, |
1117 | + help='Partner address printable format'), |
1118 | } |
1119 | |
1120 | _defaults = { |
1121 | 'state': 'draft', |
1122 | 'type': _get_type, |
1123 | - 'company_id': lambda s,c,u,ctx: \ |
1124 | - s.pool.get('res.users').browse(c,u,u,context=ctx).company_id.id, |
1125 | + 'company_id': lambda s, c, u, ctx: \ |
1126 | + s.pool.get('res.users').browse(c, u, u, context=ctx).company_id.id, |
1127 | } |
1128 | |
1129 | _sql_constraints = [ |
1130 | - ('period_type_company_uniq', 'unique (period_id,type,company_id)', |
1131 | + ('period_type_company_uniq', 'unique (period_id,type,company_id)', |
1132 | 'The period and type combination must be unique!'), |
1133 | ] |
1134 | |
1135 | #~ action methods |
1136 | |
1137 | def button_update_book_invoices(self, cr, uid, ids, context=None): |
1138 | - """ It take the instance of fiscal book and do the update of invoices. """ |
1139 | + """ It take the instance of fiscal book and do the update of invoices. |
1140 | + """ |
1141 | context = context or {} |
1142 | self.update_book_invoices(cr, uid, ids[0], context=context) |
1143 | self.update_book_taxes_amount_fields(cr, uid, ids[0], context=context) |
1144 | return True |
1145 | |
1146 | def button_update_book_issue_invoices(self, cr, uid, ids, context=None): |
1147 | - """ Take the instance of fiscal book and do the update of issue invoices. """ |
1148 | + """ Take the instance of fiscal book and do the update of issue |
1149 | + invoices. """ |
1150 | context = context or {} |
1151 | self.update_book_issue_invoices(cr, uid, ids[0], context=context) |
1152 | return True |
1153 | |
1154 | def button_update_book_wh_iva_lines(self, cr, uid, ids, context=None): |
1155 | - """ Take the instance of fiscal book and do the update of wh iva lines. """ |
1156 | + """ Take the instance of fiscal book and do the update of wh iva lines. |
1157 | + """ |
1158 | context = context or {} |
1159 | self.update_book_wh_iva_lines(cr, uid, ids[0], context=context) |
1160 | return True |
1161 | @@ -352,14 +517,16 @@ |
1162 | return inv_ids |
1163 | |
1164 | def update_book(self, cr, uid, ids, context=None): |
1165 | - """ It generate and fill book data with invoices, wh iva lines and taxes. """ |
1166 | + """ It generate and fill book data with invoices, wh iva lines and |
1167 | + taxes. """ |
1168 | context = context or {} |
1169 | for fb_brw in self.browse(cr, uid, ids, context=context): |
1170 | self.update_book_invoices(cr, uid, fb_brw.id, context=context) |
1171 | self.update_book_wh_iva_lines(cr, uid, fb_brw.id, context=context) |
1172 | self.update_book_lines(cr, uid, fb_brw.id, context=context) |
1173 | - fbl_ids = [ fbl.id for fbl in fb_brw.fbl_ids ] |
1174 | - self.update_book_issue_invoices(cr, uid, fb_brw.id, context=context) |
1175 | + fbl_ids = [fbl.id for fbl in fb_brw.fbl_ids] |
1176 | + self.update_book_issue_invoices(cr, uid, fb_brw.id, |
1177 | + context=context) |
1178 | return True |
1179 | |
1180 | def update_book_invoices(self, cr, uid, fb_id, context=None): |
1181 | @@ -379,7 +546,7 @@ |
1182 | #~ have change its period) |
1183 | all_inv_ids = inv_obj.search(cr, uid, [('fb_id', '=', fb_id)], |
1184 | context=context) |
1185 | - for inv_id_to_check in all_inv_ids: |
1186 | + for inv_id_to_check in all_inv_ids: |
1187 | if inv_id_to_check not in inv_ids: |
1188 | inv_obj.write(cr, uid, inv_id_to_check, {'fb_id': False}, |
1189 | context=context) |
1190 | @@ -398,9 +565,10 @@ |
1191 | or ['in_invoice', 'in_refund'] |
1192 | inv_state = ['paid', 'open'] |
1193 | #~ pull invoice data |
1194 | - issue_inv_ids = inv_obj.search(cr, uid, |
1195 | + issue_inv_ids = inv_obj.search( |
1196 | + cr, uid, |
1197 | ['|', |
1198 | - '&', ('fb_id', '=', fb_brw.id), ('period_id', '!=', fb_brw.period_id.id), |
1199 | + '&', ('fb_id', '=', fb_brw.id), ('period_id', '!=', fb_brw.period_id.id), |
1200 | '&', '&', ('period_id', '=', fb_brw.period_id.id), ('type', 'in', inv_type), |
1201 | ('state', 'not in', inv_state)], |
1202 | order='date_invoice asc', context=context) |
1203 | @@ -409,14 +577,16 @@ |
1204 | |
1205 | def update_book_issue_invoices(self, cr, uid, fb_id, context=None): |
1206 | """ It relate the issue invoices to the fiscal book. That criterion is: |
1207 | - - Invoices of the period in state different form open or paid state. |
1208 | - - Invoices already related to the book but it have a period change. |
1209 | + - Invoices of the period in state different form open or paid state. |
1210 | + - Invoices already related to the book but it have a period change. |
1211 | @param fb_id: fiscal book id |
1212 | """ |
1213 | context = context or {} |
1214 | inv_obj = self.pool.get('account.invoice') |
1215 | - issue_inv_ids = self._get_issue_invoice_ids(cr, uid, fb_id, context=context) |
1216 | - inv_obj.write(cr, uid, issue_inv_ids, {'issue_fb_id': fb_id}, context=context) |
1217 | + issue_inv_ids = self._get_issue_invoice_ids(cr, uid, fb_id, |
1218 | + context=context) |
1219 | + inv_obj.write(cr, uid, issue_inv_ids, {'issue_fb_id': fb_id}, |
1220 | + context=context) |
1221 | return issue_inv_ids |
1222 | |
1223 | def _get_wh_iva_line_ids(self, cr, uid, fb_id, context=None): |
1224 | @@ -440,7 +610,8 @@ |
1225 | context=context) |
1226 | for awi_id in awi_ids: |
1227 | list_ids = awil_obj.search(cr, uid, |
1228 | - [('retention_id', '=', awi_id)], context=context) |
1229 | + [('retention_id', '=', awi_id)], |
1230 | + context=context) |
1231 | awil_ids.extend(list_ids) |
1232 | return awil_ids or False |
1233 | |
1234 | @@ -461,18 +632,20 @@ |
1235 | for iwdl_id_to_check in all_iwdl_ids: |
1236 | if iwdl_id_to_check not in iwdl_ids: |
1237 | iwdl_obj.write(cr, uid, iwdl_id_to_check, {'fb_id': False}, |
1238 | - context=context) |
1239 | + context=context) |
1240 | return True |
1241 | |
1242 | def _get_book_taxes_ids(self, cr, uid, fb_id, context=None): |
1243 | - """ It returns account invoice taxes IDSs from the fiscal book invoices. |
1244 | + """ It returns account invoice taxes IDSs from the fiscal book |
1245 | + invoices. |
1246 | @param fb_id: fiscal book id |
1247 | """ |
1248 | context = context or {} |
1249 | inv_obj = self.pool.get('account.invoice') |
1250 | ait_ids = [] |
1251 | - for inv_brw in self.browse(cr, uid, fb_id, context=context).invoice_ids: |
1252 | - ait_ids += [ ait.id for ait in inv_brw.tax_line ] |
1253 | + for inv_brw in self.browse(cr, uid, fb_id, |
1254 | + context=context).invoice_ids: |
1255 | + ait_ids += [ait.id for ait in inv_brw.tax_line] |
1256 | return ait_ids |
1257 | |
1258 | def update_book_taxes(self, cr, uid, fb_id, context=None): |
1259 | @@ -483,18 +656,18 @@ |
1260 | fbt_obj = self.pool.get('fiscal.book.taxes') |
1261 | fb_brw = self.browse(cr, uid, fb_id, context=context) |
1262 | ait_ids = self._get_book_taxes_ids(cr, uid, fb_id, context=context) |
1263 | - fbt_ids = fbt_obj.search(cr, uid, [('fb_id', '=', fb_id )], |
1264 | + fbt_ids = fbt_obj.search(cr, uid, [('fb_id', '=', fb_id)], |
1265 | context=context) |
1266 | #~ Unrelate taxes |
1267 | fbt_obj.unlink(cr, uid, fbt_ids, context=context) |
1268 | #~ Relate taxes |
1269 | data = map(lambda x: (0, 0, {'ait_id': x}), ait_ids) |
1270 | - self.write(cr, uid, fb_id, {'fbt_ids' : data}, context=context) |
1271 | + self.write(cr, uid, fb_id, {'fbt_ids': data}, context=context) |
1272 | return True |
1273 | |
1274 | def _get_invoice_iwdl_id(self, cr, uid, fb_id, inv_id, context=None): |
1275 | - """ It check if the invoice have wh iva lines asociated and if its |
1276 | - check if it is at the same period. Return the wh iva line ID or False |
1277 | + """ It check if the invoice have wh iva lines asociated and if its |
1278 | + check if it is at the same period. Return the wh iva line ID or False |
1279 | instead. |
1280 | @param fb_id: fiscal book id. |
1281 | @param inv_id: invoice id to get wh line. |
1282 | @@ -518,24 +691,32 @@ |
1283 | """ |
1284 | context = context or {} |
1285 | iwdl_obj = self.pool.get('account.wh.iva.line') |
1286 | - inv_ids = [ inv_brw.id for inv_brw in self.browse(cr, uid, fb_id, context=context).invoice_ids ] |
1287 | - inv_wh_ids = [ iwdl_brw.invoice_id.id \ |
1288 | - for iwdl_brw in self.browse(cr, uid, fb_id, context=context).iwdl_ids] |
1289 | + inv_ids = [inv_brw.id for inv_brw in self.browse(cr, uid, fb_id, context=context).invoice_ids] |
1290 | + inv_wh_ids = \ |
1291 | + [iwdl_brw.invoice_id.id for iwdl_brw in self.browse( |
1292 | + cr, uid, fb_id, context=context).iwdl_ids] |
1293 | orphan_inv_ids = set(inv_wh_ids) - set(inv_ids) |
1294 | orphan_inv_ids = list(orphan_inv_ids) |
1295 | - return orphan_inv_ids and iwdl_obj.search(cr, uid, [('invoice_id', 'in', orphan_inv_ids)], context=context) or [] |
1296 | + return orphan_inv_ids and iwdl_obj.search( |
1297 | + cr, uid, [('invoice_id', 'in', orphan_inv_ids)], |
1298 | + context=context) or [] |
1299 | |
1300 | def order_book_lines(self, cr, uid, fb_id, context=None): |
1301 | - """ It order the fiscal book lines chronologically by emission date. |
1302 | + """ It order the fiscal book lines chronologically acs by a date. |
1303 | + If fiscal book type is purchase then is order by emission date. |
1304 | @param fb_id: fiscal book id. |
1305 | """ |
1306 | context = context or {} |
1307 | fbl_obj = self.pool.get('fiscal.book.lines') |
1308 | - fbl_ids = [ fbl_brw.id for fbl_brw in self.browse(cr, uid, fb_id, context=context).fbl_ids ] |
1309 | - ordered_fbl_ids = fbl_obj.search(cr, uid, [ ('id', 'in', fbl_ids) ], |
1310 | - order='get_accounting_date asc', |
1311 | - context=context) |
1312 | - #~ TODO: this date could change with the improve of the fiscal.book.line model |
1313 | + order_date = {'purchase': 'emission_date', |
1314 | + 'sale': 'accounting_date'} |
1315 | + fbl_ids = [fbl_brw.id for fbl_brw in self.browse( |
1316 | + cr, uid, fb_id, context=context).fbl_ids] |
1317 | + ordered_fbl_ids = fbl_obj.search( |
1318 | + cr, uid, [('id', 'in', fbl_ids)], |
1319 | + order=order_date[self.browse(cr, uid, fb_id, context=context).type] + ' asc', |
1320 | + context=context) |
1321 | + #~ TODO: this date could change with the improve of the fbl model |
1322 | for rank, fbl_id in enumerate(ordered_fbl_ids, 1): |
1323 | fbl_obj.write(cr, uid, fbl_id, {'rank': rank}, context=context) |
1324 | return True |
1325 | @@ -549,32 +730,16 @@ |
1326 | context = context or {} |
1327 | iwdl_obj = self.pool.get('account.wh.iva.line') |
1328 | res = [] |
1329 | - for inv_brw in self.browse(cr, uid, fb_id, context=context).invoice_ids: |
1330 | + for inv_brw in self.browse(cr, uid, fb_id, |
1331 | + context=context).invoice_ids: |
1332 | iwdl_id = self._get_invoice_iwdl_id(cr, uid, fb_id, inv_brw.id, |
1333 | context=context) |
1334 | if iwdl_id: |
1335 | if inv_brw.date_invoice != \ |
1336 | - iwdl_obj.browse(cr, uid, iwdl_id, context=context).date_ret: |
1337 | + iwdl_obj.browse(cr, uid, iwdl_id, context=context).date_ret: |
1338 | res.append(iwdl_id) |
1339 | return res |
1340 | |
1341 | - #~ TODO: understand this method |
1342 | - def get_doc(self, cr, uid, inv_brw, context=None): |
1343 | - """ It returns the invoice document type |
1344 | - @param inv_brw: invoice browseable. |
1345 | - """ |
1346 | - context = context or {} |
1347 | - doc_type = False |
1348 | - if inv_brw.type in ["in_invoice", "out_invoice"] and inv_brw.parent_id: |
1349 | - doc_type = "ND" |
1350 | - elif inv_brw.type in ["in_invoice", "in_refund"] and inv_brw.expedient: |
1351 | - doc_type="E" |
1352 | - elif inv_brw.type in ['in_refund', 'out_refund']: |
1353 | - doc_type = "NC" |
1354 | - elif inv_brw.type in ["in_invoice", "out_invoice"]: |
1355 | - doc_type = "F" |
1356 | - return doc_type |
1357 | - |
1358 | def update_book_lines(self, cr, uid, fb_id, context=None): |
1359 | """ It updates the fiscal book lines values. |
1360 | @param fb_id: fiscal book id |
1361 | @@ -585,83 +750,96 @@ |
1362 | iwdl_obj = self.pool.get('account.wh.iva.line') |
1363 | fbl_obj = self.pool.get('fiscal.book.lines') |
1364 | #~ delete book lines |
1365 | - fbl_ids = [ fbl_brw.id for fbl_brw in self.browse(cr, uid, fb_id, context=context).fbl_ids ] |
1366 | + fbl_ids = [fbl_brw.id for fbl_brw in self.browse( |
1367 | + cr, uid, fb_id, context=context).fbl_ids] |
1368 | fbl_obj.unlink(cr, uid, fbl_ids, context=context) |
1369 | |
1370 | #~ add book lines for withholding iva lines |
1371 | if self.browse(cr, uid, fb_id, context=context).iwdl_ids: |
1372 | orphan_iwdl_ids = self._get_orphan_iwdl_ids(cr, uid, fb_id, |
1373 | context=context) |
1374 | - no_match_dt_iwdl_ids = self._get_no_match_date_iwdl_ids(cr, uid, |
1375 | - fb_id, |
1376 | - context=context) |
1377 | + no_match_dt_iwdl_ids = \ |
1378 | + self._get_no_match_date_iwdl_ids(cr, uid, fb_id, |
1379 | + context=context) |
1380 | iwdl_ids = orphan_iwdl_ids + no_match_dt_iwdl_ids |
1381 | - for iwdl_brw in iwdl_obj.browse(cr, uid, iwdl_ids, context=context): |
1382 | + for iwdl_brw in iwdl_obj.browse(cr, uid, iwdl_ids, |
1383 | + context=context): |
1384 | values = { |
1385 | 'iwdl_id': iwdl_brw.id, |
1386 | 'rank': my_rank, |
1387 | - 'get_accounting_date': iwdl_brw.date_ret or False, |
1388 | - 'get_emission_date': iwdl_brw.date or False, |
1389 | - 'get_t_doc': self.get_doc_type(cr, uid, iwdl_id=iwdl_brw.id, |
1390 | - context=context), |
1391 | - 'get_number': iwdl_brw.retention_id.number or False, |
1392 | - #~ TODO: check what fields needs to be add that refer to the book line and the wh iva line. |
1393 | + 'accounting_date': iwdl_brw.date_ret or False, |
1394 | + 'emission_date': iwdl_brw.date or iwdl_brw.date_ret or False, |
1395 | + 'doc_type': self.get_doc_type(cr, uid, iwdl_id=iwdl_brw.id, |
1396 | + context=context), |
1397 | + 'wh_number': iwdl_brw.retention_id.number or False, |
1398 | + 'partner_name': iwdl_brw.retention_id.partner_id.name or False, |
1399 | + 'affected_invoice_date': iwdl_brw.invoice_id.date_document \ |
1400 | + or iwdl_brw.invoice_id.date_invoice, |
1401 | + 'wh_rate': iwdl_brw.wh_iva_rate, |
1402 | } |
1403 | my_rank += 1 |
1404 | data.append((0, 0, values)) |
1405 | |
1406 | #~ add book lines for invoices |
1407 | - for inv_brw in self.browse(cr, uid, fb_id, context=context).invoice_ids: |
1408 | - imex_invoice = self.is_invoice_imex(cr, uid, inv_brw.id, context=context) |
1409 | + for inv_brw in self.browse(cr, uid, fb_id, |
1410 | + context=context).invoice_ids: |
1411 | + imex_invoice = self.is_invoice_imex(cr, uid, inv_brw.id, |
1412 | + context=context) |
1413 | + iwdl_id = self._get_invoice_iwdl_id(cr, uid, fb_id, inv_brw.id, |
1414 | + context=context) |
1415 | + doc_type = self.get_doc_type(cr, uid, inv_id=inv_brw.id, |
1416 | + context=context) |
1417 | values = { |
1418 | 'invoice_id': inv_brw.id, |
1419 | 'rank': my_rank, |
1420 | - 'get_emission_date': (not imex_invoice) and \ |
1421 | - inv_brw.date_document or False, |
1422 | - 'get_accounting_date': (not imex_invoice) and \ |
1423 | - inv_brw.date_invoice or False, |
1424 | - 'get_imex_date': imex_invoice and inv_brw.get_date_invoice or False, |
1425 | - 'get_debit_affected': inv_brw.parent_id \ |
1426 | - and inv_brw.parent_id.type in ['in_invoice', 'out_invoice'] \ |
1427 | - and inv_brw.parent_id.parent_id \ |
1428 | - and inv_brw.parent_id.number or False, |
1429 | - 'get_credit_affected': inv_brw.parent_id and \ |
1430 | - inv_brw.parent_id.type in ['in_refund', 'out_refund'] \ |
1431 | - and inv_brw.parent_id.number or False, |
1432 | - 'get_doc': self.get_doc(cr, uid, inv_brw, context=context), |
1433 | - 'get_number': inv_brw.nro_ctrl or False, |
1434 | - 'get_parent': inv_brw.parent_id and inv_brw.parent_id.number or False, |
1435 | - 'get_partner_name': inv_brw.partner_id.name or False, |
1436 | - 'get_partner_vat': inv_brw.partner_id.vat \ |
1437 | - and inv_brw.partner_id.vat[2:] or 'N/A', |
1438 | - 'get_reference': inv_brw.reference or False, |
1439 | - 'get_t_doc': self.get_doc_type(cr, uid, inv_id=inv_brw.id, |
1440 | - context=context), |
1441 | - 'get_papel_anulado': inv_brw.name and \ |
1442 | - (inv_brw.name.find('PAPELANULADO')>=0 \ |
1443 | - and '03-ANU' or '01-REG') \ |
1444 | - or '01-REG', |
1445 | - 'get_import_form': self.get_invoice_import_form(cr, uid, inv_brw.id, context=context), |
1446 | - 'get_fiscal_printer': inv_brw.fiscal_printer or False, |
1447 | - 'get_invoice_printer': inv_brw.invoice_printer or False, |
1448 | - 'get_import_spreadsheets': self.get_invoice_import_spreadsheets(cr, uid, inv_brw.id, context=context), |
1449 | - 'get_nro_import_form': hasattr(inv_brw, 'num_import_form') and inv_brw.num_import_form and inv_brw.num_import_form or False, |
1450 | - 'get_nro_import_expe': hasattr(inv_brw, 'num_import_expe') and inv_brw.num_import_expe and inv_brw.nro_inport_expe or False, |
1451 | - 'iwdl_id': self._get_invoice_iwdl_id(cr, uid, fb_id, |
1452 | - inv_brw.id, |
1453 | - context=context) |
1454 | + 'emission_date': (not imex_invoice) \ |
1455 | + and (inv_brw.date_document or inv_brw.date_invoice) \ |
1456 | + or False, |
1457 | + 'accounting_date': (not imex_invoice) and \ |
1458 | + inv_brw.date_invoice or False, |
1459 | + 'imex_date': imex_invoice and inv_brw.num_import_form_id.date_liq or False, |
1460 | + 'invoice_is_imported': imex_invoice, |
1461 | + 'debit_affected': inv_brw.parent_id \ |
1462 | + and inv_brw.parent_id.type in ['in_invoice', 'out_invoice'] \ |
1463 | + and inv_brw.parent_id.parent_id \ |
1464 | + and inv_brw.parent_id.number or False, |
1465 | + 'credit_affected': inv_brw.parent_id and \ |
1466 | + inv_brw.parent_id.type in ['in_refund', 'out_refund'] \ |
1467 | + and inv_brw.parent_id.number or False, |
1468 | + 'ctrl_number': inv_brw.nro_ctrl or False, |
1469 | + 'invoice_parent': (doc_type == "N/DE" or doc_type == "N/CR") \ |
1470 | + and (inv_brw.parent_id and inv_brw.parent_id.number or False) \ |
1471 | + or False, |
1472 | + 'partner_name': inv_brw.partner_id.name or False, |
1473 | + 'partner_vat': inv_brw.partner_id.vat \ |
1474 | + and inv_brw.partner_id.vat[2:] or 'N/A', |
1475 | + 'invoice_number': inv_brw.reference or False, |
1476 | + 'doc_type': doc_type, |
1477 | + 'void_form': inv_brw.name and \ |
1478 | + (inv_brw.name.find('PAPELANULADO') >= 0 \ |
1479 | + and '03-ANU' or '01-REG') \ |
1480 | + or '01-REG', |
1481 | + 'fiscal_printer': inv_brw.fiscal_printer or False, |
1482 | + 'invoice_printer': inv_brw.invoice_printer or False, |
1483 | + 'custom_statement': inv_brw.num_import_form_id.name or False, |
1484 | + 'iwdl_id': (iwdl_id and iwdl_id not in no_match_dt_iwdl_ids) \ |
1485 | + and iwdl_id or False, |
1486 | + 'wh_number': (iwdl_id and iwdl_id not in no_match_dt_iwdl_ids) \ |
1487 | + and iwdl_obj.browse(cr, uid, iwdl_id, |
1488 | + context=context).retention_id.number or False, |
1489 | } |
1490 | my_rank += 1 |
1491 | data.append((0, 0, values)) |
1492 | |
1493 | if data: |
1494 | - self.write(cr, uid, fb_id, {'fbl_ids' : data}, context=context) |
1495 | + self.write(cr, uid, fb_id, {'fbl_ids': data}, context=context) |
1496 | self.order_book_lines(cr, uid, fb_id, context=context) |
1497 | self.link_book_lines_and_taxes(cr, uid, fb_id, context=context) |
1498 | |
1499 | return True |
1500 | |
1501 | - #~ TODO: Optimization. This method could be transform in a method for function field fbts tax y base sum. |
1502 | + #~ TODO: Optimization. This method could be transform in a method for |
1503 | + #~ function field fbts tax y base sum. |
1504 | def update_book_taxes_summary(self, cr, uid, fb_id, context=None): |
1505 | """ It update the summaroty of taxes by type for this book. |
1506 | @param fb_id: fiscal book id |
1507 | @@ -669,16 +847,30 @@ |
1508 | context = context or {} |
1509 | self.clear_book_taxes_summary(cr, uid, fb_id, context=context) |
1510 | tax_types = ['exento', 'sdcf', 'reducido', 'general', 'adicional'] |
1511 | - base_sum = {}.fromkeys(tax_types, 0.0) |
1512 | - tax_sum = {}.fromkeys(tax_types, 0.0) |
1513 | + n_base_sum = {}.fromkeys(tax_types, 0.0) |
1514 | + n_tax_sum = {}.fromkeys(tax_types, 0.0) |
1515 | + i_base_sum = {}.fromkeys(tax_types, 0.0) |
1516 | + i_tax_sum = {}.fromkeys(tax_types, 0.0) |
1517 | for fbl in self.browse(cr, uid, fb_id, context=context).fbl_ids: |
1518 | if fbl.invoice_id: |
1519 | for ait in fbl.invoice_id.tax_line: |
1520 | if ait.tax_id.appl_type: |
1521 | - base_sum[ait.tax_id.appl_type] += ait.base_amount |
1522 | - tax_sum[ait.tax_id.appl_type] += ait.tax_amount |
1523 | - data = [ (0, 0, {'tax_type': ttype, 'base_amount_sum': base_sum[ttype], 'tax_amount_sum': tax_sum[ttype]}) for ttype in tax_types ] |
1524 | - return data and self.write(cr, uid, fb_id, {'fbts_ids': data}, context=context) |
1525 | + if fbl.invoice_is_imported: |
1526 | + i_base_sum[ait.tax_id.appl_type] += ait.base_amount |
1527 | + i_tax_sum[ait.tax_id.appl_type] += ait.tax_amount |
1528 | + else: |
1529 | + n_base_sum[ait.tax_id.appl_type] += ait.base_amount |
1530 | + n_tax_sum[ait.tax_id.appl_type] += ait.tax_amount |
1531 | + data = [(0, 0, {'tax_type': ttype, |
1532 | + 'base_amount_sum': n_base_sum[ttype], |
1533 | + 'tax_amount_sum': n_tax_sum[ttype], |
1534 | + 'international': False}) for ttype in tax_types] |
1535 | + data.extend([(0, 0, {'tax_type': ttype, |
1536 | + 'base_amount_sum': i_base_sum[ttype], |
1537 | + 'tax_amount_sum': i_tax_sum[ttype], |
1538 | + 'international': True}) for ttype in tax_types]) |
1539 | + return data and self.write(cr, uid, fb_id, {'fbts_ids': data}, |
1540 | + context=context) |
1541 | |
1542 | #~ TODO: test this method (with presice amounts) |
1543 | def update_book_taxes_amount_fields(self, cr, uid, fb_id, context=None): |
1544 | @@ -694,10 +886,13 @@ |
1545 | base_amount = base_amount + ait.base_amount |
1546 | if ait.tax_id.ret: |
1547 | tax_amount = tax_amount + ait.tax_amount |
1548 | - return self.write(cr, uid, fb_id, {'tax_amount': tax_amount, 'base_amount': base_amount}, context=context) |
1549 | + return self.write(cr, uid, fb_id, |
1550 | + {'tax_amount': tax_amount, |
1551 | + 'base_amount': base_amount}, |
1552 | + context=context) |
1553 | |
1554 | def link_book_lines_and_taxes(self, cr, uid, fb_id, context=None): |
1555 | - """ It updates the fiscal book taxes. Link the tax with the corresponding |
1556 | + """ Updates the fiscal book taxes. Link the tax with the corresponding |
1557 | book line and update the fields of sum taxes in the book. |
1558 | @param fb_id: the id of the current fiscal book """ |
1559 | context = context or {} |
1560 | @@ -711,36 +906,64 @@ |
1561 | data = [] |
1562 | for fbl in self.browse(cr, uid, fb_id, context=context).fbl_ids: |
1563 | if fbl.invoice_id: |
1564 | - ret_tax_amount = sdcf_tax_amount = exent_tax_amount = amount_withheld = 0.0 |
1565 | + ret_tax_amount = sdcf_tax_amount = exent_tax_amount = \ |
1566 | + amount_withheld = 0.0 |
1567 | for ait in fbl.invoice_id.tax_line: |
1568 | if ait.tax_id: |
1569 | - data.append((0, 0, {'fb_id': fb_id, 'fbl_id': fbl.id, 'ait_id': ait.id})) |
1570 | + data.append((0, 0, {'fb_id': fb_id, |
1571 | + 'fbl_id': fbl.id, |
1572 | + 'ait_id': ait.id})) |
1573 | if ait.tax_id.ret: |
1574 | - ret_tax_amount = ret_tax_amount + ait.base_amount + ait.tax_amount |
1575 | - |
1576 | - #~ TODO: check that this logic is ok |
1577 | - if ait.invoice_id.type in ['in_refund', 'out_refund']: |
1578 | - amount_withheld = amount_withheld + (ait.tax_amount*(-1.0)) |
1579 | - else: |
1580 | - amount_withheld = amount_withheld + ait.tax_amount |
1581 | + ret_tax_amount += ait.base_amount + ait.tax_amount |
1582 | else: |
1583 | if ait.tax_id.appl_type == 'sdcf': |
1584 | - sdcf_tax_amount = sdcf_tax_amount + ait.base_amount |
1585 | + sdcf_tax_amount += ait.base_amount |
1586 | if ait.tax_id.appl_type == 'exento': |
1587 | - exent_tax_amount = exent_tax_amount + ait.base_amount |
1588 | + exent_tax_amount += ait.base_amount |
1589 | else: |
1590 | - data.append((0,0,{'fb_id': fb_id, 'fbl_id': False, 'ait_id': ait.id})) |
1591 | - fbl_obj.write(cr, uid, fbl.id, {'get_total_with_iva': ret_tax_amount}, context=context) |
1592 | - fbl_obj.write(cr, uid, fbl.id, {'get_vat_sdcf': sdcf_tax_amount}, context=context) |
1593 | - fbl_obj.write(cr, uid, fbl.id, {'get_vat_exempt': exent_tax_amount}, context=context) |
1594 | - fbl_obj.write(cr, uid, fbl.id, {'get_withheld': amount_withheld}, context=context) |
1595 | + data.append((0, 0, {'fb_id': |
1596 | + fb_id, 'fbl_id': False, 'ait_id': ait.id})) |
1597 | + fbl_obj.write( |
1598 | + cr, uid, fbl.id, {'total_with_iva': ret_tax_amount}, |
1599 | + context=context) |
1600 | + fbl_obj.write( |
1601 | + cr, uid, fbl.id, {'vat_sdcf': sdcf_tax_amount}, |
1602 | + context=context) |
1603 | + fbl_obj.write( |
1604 | + cr, uid, fbl.id, {'vat_exempt': exent_tax_amount}, |
1605 | + context=context) |
1606 | |
1607 | if data: |
1608 | self.write(cr, uid, fb_id, {'fbt_ids': data}, context=context) |
1609 | self.update_book_taxes_summary(cr, uid, fb_id, context=context) |
1610 | + self.update_book_lines_taxes_fields(cr, uid, fb_id, context=context) |
1611 | self.update_book_taxes_amount_fields(cr, uid, fb_id, context=context) |
1612 | return True |
1613 | |
1614 | + def update_book_lines_taxes_fields(self, cr, uid, fb_id, context=None): |
1615 | + """ Update taxes data for every line in the fiscal book given, |
1616 | + extrating de data from the fiscal book taxes associated. |
1617 | + @param fb_id: fiscal book line id. |
1618 | + """ |
1619 | + context = context or {} |
1620 | + fbl_obj = self.pool.get('fiscal.book.lines') |
1621 | + field_names = ['vat_reduced_base', 'vat_reduced_tax', |
1622 | + 'vat_general_base', 'vat_general_tax', |
1623 | + 'vat_additional_base', 'vat_additional_tax'] |
1624 | + tax_type = {'reduced': 'reducido', 'general': 'general', |
1625 | + 'additional': 'adicional'} |
1626 | + for fbl_brw in self.browse(cr, uid, fb_id, context=context).fbl_ids: |
1627 | + data = {}.fromkeys(field_names, 0.0) |
1628 | + for fbt_brw in fbl_brw.fbt_ids: |
1629 | + for field_name in field_names: |
1630 | + field_tax, field_amount = field_name[4:].split('_') |
1631 | + if fbt_brw.ait_id.tax_id.appl_type == tax_type[field_tax]: |
1632 | + data[field_name] += field_amount == 'base' \ |
1633 | + and fbt_brw.base_amount \ |
1634 | + or fbt_brw.tax_amount |
1635 | + fbl_obj.write(cr, uid, fbl_brw.id, data, context=context) |
1636 | + return True |
1637 | + |
1638 | #~ clear book methods |
1639 | |
1640 | def clear_book(self, cr, uid, fb_id, context=None): |
1641 | @@ -766,9 +989,10 @@ |
1642 | fbl_obj = self.pool.get("fiscal.book.lines") |
1643 | for fb_id in ids: |
1644 | fbl_brws = self.browse(cr, uid, fb_id, context=context).fbl_ids |
1645 | - fbl_ids = [ fbl.id for fbl in fbl_brws ] |
1646 | + fbl_ids = [fbl.id for fbl in fbl_brws] |
1647 | fbl_obj.unlink(cr, uid, fbl_ids, context=context) |
1648 | - self.clear_book_taxes_amount_fields(cr, uid, fb_id, context=context) |
1649 | + self.clear_book_taxes_amount_fields(cr, uid, fb_id, |
1650 | + context=context) |
1651 | return True |
1652 | |
1653 | def clear_book_taxes(self, cr, uid, ids, context=None): |
1654 | @@ -777,9 +1001,10 @@ |
1655 | fbt_obj = self.pool.get("fiscal.book.taxes") |
1656 | for fb_id in ids: |
1657 | fbt_brws = self.browse(cr, uid, fb_id, context=context).fbt_ids |
1658 | - fbt_ids = [ fbt.id for fbt in fbt_brws ] |
1659 | + fbt_ids = [fbt.id for fbt in fbt_brws] |
1660 | fbt_obj.unlink(cr, uid, fbt_ids, context=context) |
1661 | - self.clear_book_taxes_amount_fields(cr, uid, fb_id, context=context) |
1662 | + self.clear_book_taxes_amount_fields(cr, uid, fb_id, |
1663 | + context=context) |
1664 | return True |
1665 | |
1666 | def clear_book_taxes_summary(self, cr, uid, fb_id, context=None): |
1667 | @@ -794,7 +1019,9 @@ |
1668 | def clear_book_taxes_amount_fields(self, cr, uid, fb_id, context=None): |
1669 | """ Clean amount taxes fields in fiscal book """ |
1670 | context = context or {} |
1671 | - return self.write(cr, uid, fb_id, {'tax_amount': 0.0, 'base_amount': 0.0}, context=context) |
1672 | + return self.write(cr, uid, fb_id, |
1673 | + {'tax_amount': 0.0, 'base_amount': 0.0}, |
1674 | + context=context) |
1675 | |
1676 | def clear_book_invoices(self, cr, uid, ids, context=None): |
1677 | """ Unrelate all invoices of the book. And delete fiscal book taxes """ |
1678 | @@ -803,7 +1030,7 @@ |
1679 | for fb_id in ids: |
1680 | self.clear_book_taxes(cr, uid, [fb_id], context=context) |
1681 | inv_brws = self.browse(cr, uid, fb_id, context=context).invoice_ids |
1682 | - inv_ids = [ inv.id for inv in inv_brws ] |
1683 | + inv_ids = [inv.id for inv in inv_brws] |
1684 | inv_obj.write(cr, uid, inv_ids, {'fb_id': False}, context=context) |
1685 | return True |
1686 | |
1687 | @@ -812,9 +1039,11 @@ |
1688 | context = context or {} |
1689 | inv_obj = self.pool.get("account.invoice") |
1690 | for fb_id in ids: |
1691 | - inv_brws = self.browse(cr, uid, fb_id, context=context).issue_invoice_ids |
1692 | - inv_ids = [ inv.id for inv in inv_brws ] |
1693 | - inv_obj.write(cr, uid, inv_ids, {'issue_fb_id': False}, context=context) |
1694 | + inv_brws = self.browse( |
1695 | + cr, uid, fb_id, context=context).issue_invoice_ids |
1696 | + inv_ids = [inv.id for inv in inv_brws] |
1697 | + inv_obj.write(cr, uid, inv_ids, {'issue_fb_id': False}, |
1698 | + context=context) |
1699 | return True |
1700 | |
1701 | def clear_book_iwdl_ids(self, cr, uid, ids, context=None): |
1702 | @@ -823,15 +1052,16 @@ |
1703 | iwdl_obj = self.pool.get("account.wh.iva.line") |
1704 | for fb_id in ids: |
1705 | iwdl_brws = self.browse(cr, uid, fb_id, context=context).iwdl_ids |
1706 | - iwdl_ids = [ iwdl.id for iwdl in iwdl_brws ] |
1707 | - iwdl_obj.write(cr, uid, iwdl_ids, {'fb_id': False}, context=context) |
1708 | + iwdl_ids = [iwdl.id for iwdl in iwdl_brws] |
1709 | + iwdl_obj.write( |
1710 | + cr, uid, iwdl_ids, {'fb_id': False}, context=context) |
1711 | return True |
1712 | |
1713 | def get_doc_type(self, cr, uid, inv_id=None, iwdl_id=None, context=None): |
1714 | """ Returns a string that indicates de document type. For withholding |
1715 | returns 'RET' and for invoice docuemnts returns different values |
1716 | depending of the invoice type: Debit Note 'N/DE', Credit Note 'N/CR', |
1717 | - Invoice 'FACT', (¿?) 'E' |
1718 | + Invoice 'FACT'. |
1719 | @param inv_id : invoice id |
1720 | @param iwdl_id: wh iva line id |
1721 | """ |
1722 | @@ -840,17 +1070,22 @@ |
1723 | if inv_id: |
1724 | inv_obj = self.pool.get('account.invoice') |
1725 | inv_brw = inv_obj.browse(cr, uid, inv_id, context=context) |
1726 | - if inv_brw.type in ["in_invoice", "out_invoice"] and inv_brw.parent_id: |
1727 | + if (inv_brw.type in ["in_invoice"] and inv_brw.parent_id) \ |
1728 | + or inv_brw.type in ["in_refund"]: |
1729 | res = "N/DE" |
1730 | - elif inv_brw.type in ["in_invoice", "in_refund"] and inv_brw.expedient: |
1731 | - res = "E" |
1732 | - elif inv_brw.type in ["in_refund", "out_refund"]: |
1733 | + elif (inv_brw.type in ["out_invoice"] and inv_brw.parent_id) or \ |
1734 | + inv_brw.type in ["out_refund"]: |
1735 | res = "N/CR" |
1736 | elif inv_brw.type in ["in_invoice", "out_invoice"]: |
1737 | res = "FACT" |
1738 | - return res |
1739 | + |
1740 | + assert res, str(inv_brw) + ": Error in the definition \ |
1741 | + of the document type. \n There is not type category definied for \ |
1742 | + your invoice." |
1743 | elif iwdl_id: |
1744 | - return 'RET' |
1745 | + res = 'RET' |
1746 | + |
1747 | + return res |
1748 | |
1749 | def get_invoice_import_form(self, cr, uid, inv_id, context=None): |
1750 | """ Returns the Invoice reference |
1751 | @@ -869,138 +1104,155 @@ |
1752 | inv_obj = self.pool.get('account.invoice') |
1753 | inv_brw = inv_obj.browse(cr, uid, inv_id, context=context) |
1754 | return inv_brw.company_id.partner_id.country_id.id != \ |
1755 | - inv_brw.partner_id.country_id.id and True or False |
1756 | - |
1757 | - #~ TODO: verify the logic of this function |
1758 | - def get_invoice_import_spreadsheets(self, cr, uid, inv_id, context=None): |
1759 | - """ Get Import spreadsheets (list of invoice ids) |
1760 | - @param inv_id: invoice id |
1761 | - """ |
1762 | - context = context or {} |
1763 | - inv_obj = self.pool.get('account.invoice') |
1764 | - return inv_obj.search(cr, uid, [('affected_invoice', '=', inv_id), ('state', 'in',[ 'done', 'paid', 'open']) ]) or False |
1765 | + inv_brw.partner_id.country_id.id and True or False |
1766 | |
1767 | |
1768 | class fiscal_book_lines(orm.Model): |
1769 | |
1770 | - def _get_vat_amount(self, cr, uid, ids, field_name, arg, context=None): |
1771 | - """ |
1772 | - For a given book line it returns the a vat amount value corresponding. |
1773 | + def _get_wh_vat(self, cr, uid, ids, field_name, arg, context=None): |
1774 | + """ For a given book line it returns the withholding vat amount. |
1775 | (This is a method used in functional fields). |
1776 | - @param field_name: the name of the field that which value return [get_vat_reduced_base, get_vat_general_base, get_vat_additional_base, get_vat_reduced_tax, get_vat_general_tax, get_vat_additional_tax]. |
1777 | - """ |
1778 | - context = context or {} |
1779 | - res = {}.fromkeys(ids, 0.0) |
1780 | - tax_type = { 'reduced': 'reducido', 'general': 'general', |
1781 | - 'additional': 'adicional' } |
1782 | - field_tax, field_amount = field_name[8:].split('_') |
1783 | - for fbl_id in ids: |
1784 | - for fbt_brw in self.browse(cr, uid, fbl_id, context=context).fbt_ids: |
1785 | - if fbt_brw.ait_id.tax_id.appl_type == tax_type[field_tax]: |
1786 | - res[fbl_id] += field_amount == 'base' \ |
1787 | - and fbt_brw.base_amount \ |
1788 | - or fbt_brw.tax_amount |
1789 | + @param field_name: ['get_wh_vat']. |
1790 | + """ |
1791 | + context = context or {} |
1792 | + res = {}.fromkeys(ids, 0.0) |
1793 | + for fbl_brw in self.browse(cr, uid, ids, context=context): |
1794 | + if fbl_brw.iwdl_id: |
1795 | + res[fbl_brw.id] = fbl_brw.iwdl_id.amount_tax_ret |
1796 | + return res |
1797 | + |
1798 | + def _get_based_tax_debit(self, cr, uid, ids, field_name, arg, |
1799 | + context=None): |
1800 | + """ It Returns the sum of all tax amount for the taxes realeted to the |
1801 | + wh iva line. |
1802 | + @param field_name: ['get_based_tax_debit']. |
1803 | + """ |
1804 | + #~ TODO: for all taxes realted? only a tax type group? |
1805 | + context = context or {} |
1806 | + res = {}.fromkeys(ids, 0.0) |
1807 | + awilt_obj = self.pool.get("account.wh.iva.line.tax") |
1808 | + for fbl_brw in self.browse(cr, uid, ids, context=context): |
1809 | + if fbl_brw.iwdl_id: |
1810 | + for tax in fbl_brw.iwdl_id.tax_line: |
1811 | + res[fbl_brw.id] += tax.amount |
1812 | return res |
1813 | |
1814 | _description = "Venezuela's Sale & Purchase Fiscal Book Lines" |
1815 | - _name='fiscal.book.lines' |
1816 | - _rec_name='rank' |
1817 | + _name = 'fiscal.book.lines' |
1818 | + _rec_name = 'rank' |
1819 | _order = 'rank' |
1820 | - _columns={ |
1821 | - 'rank':fields.integer('Line Position', required=True), |
1822 | - 'fb_id':fields.many2one('fiscal.book','Fiscal Book', |
1823 | - help='Fiscal Book that owns this book line'), |
1824 | - 'fbt_ids': fields.one2many('fiscal.book.taxes', 'fbl_id', |
1825 | - string='Tax Lines', |
1826 | - help='Tax Lines being recorded in a Fiscal Book'), |
1827 | - 'invoice_id':fields.many2one('account.invoice','Invoice', |
1828 | - help='Invoice related to this book line'), |
1829 | - 'iwdl_id':fields.many2one('account.wh.iva.line','Vat Withholding', |
1830 | - help='Withholding iva line related to this book line'), |
1831 | - 'get_number': fields.char(string='Control number', size=64, help=''), |
1832 | - 'get_emission_date': fields.date(string='Emission Date', |
1833 | - help='[(invoice, get_date_document), (wh iva line, date)]'), |
1834 | - 'get_accounting_date': fields.date(string='Accounting Date', |
1835 | - help='The day of the accounting record [(invoice, date_invoice), (wh iva line, date_ret)]'), |
1836 | - 'get_t_doc': fields.char(size=8, string='Doc. Type', help='Document Type'), |
1837 | - 'get_partner_name': fields.char(size=128, string='Partner Name', help=''), |
1838 | - 'get_partner_vat': fields.char(size=128, string='Partner TIN', |
1839 | - help=''), |
1840 | - 'get_withheld': fields.float('Withheld Amount'), |
1841 | + _columns = { |
1842 | + |
1843 | + 'fb_id': fields.many2one('fiscal.book', 'Fiscal Book', |
1844 | + help='Fiscal Book that owns this book line'), |
1845 | + 'fbt_ids': fields.one2many('fiscal.book.taxes', 'fbl_id', |
1846 | + string='Tax Lines', help='Tax Lines being \ |
1847 | + recorded in a Fiscal Book'), |
1848 | + 'invoice_id': fields.many2one('account.invoice', 'Invoice', |
1849 | + help='Invoice related to this book \ |
1850 | + line'), |
1851 | + 'iwdl_id': fields.many2one('account.wh.iva.line', 'Vat Withholding', |
1852 | + help='Withholding iva line related to this \ |
1853 | + book line'), |
1854 | + |
1855 | + #~ Invoice and/or Document Data |
1856 | + 'rank': fields.integer("Line", required=True, help="Line Position"), |
1857 | + 'emission_date': fields.date( |
1858 | + string='Emission Date', |
1859 | + help='Invoice Document Date / Wh IVA Line Voucher Date'), |
1860 | + 'accounting_date': fields.date( |
1861 | + string='Accounting Date', |
1862 | + help='The day of the accounting record [(invoice, date_invoice), \ |
1863 | + (wh iva line, date_ret)]'), |
1864 | + 'doc_type': fields.char('Doc. Type', size=8, help='Document Type'), |
1865 | + 'partner_name': fields.char(size=128, string='Partner Name', help=''), |
1866 | + 'partner_vat': fields.char(size=128, string='Partner TIN', help=''), |
1867 | + |
1868 | + #~ Apply for wh iva lines |
1869 | + 'get_wh_vat': fields.function(_get_wh_vat, |
1870 | + type="float", method=True, store=True, |
1871 | + string="Withholding VAT", |
1872 | + help="Withholding VAT"), |
1873 | + 'wh_number': fields.char(string='Withholding number', size=64, |
1874 | + help=''), |
1875 | + 'affected_invoice_date': fields.date(string="Affected Invoice Date", |
1876 | + help=""), |
1877 | + 'wh_rate': fields.float(string="Withholding percentage", |
1878 | + help=""), |
1879 | + 'get_wh_debit_credit': fields.function( |
1880 | + _get_based_tax_debit, |
1881 | + type="float", method=True, store=True, |
1882 | + string="Based Tax Debit", |
1883 | + help="Sum of all tax amount for the taxes realeted to the \ |
1884 | + wh iva line."), |
1885 | |
1886 | #~ Apply for invoice lines |
1887 | - 'get_reference': fields.char(string='Invoice number', size=64, |
1888 | - help=''), |
1889 | - 'get_doc': fields.char(string='Trans. Type', |
1890 | - help='Transaction Type'), |
1891 | - 'get_parent': fields.char(string='Affected Document', |
1892 | - help='Parent Invoice'), |
1893 | - 'get_imex_date': fields.date(string='Invoice IMEX Date', |
1894 | - help='Invoice Importation/Exportation date'), |
1895 | - 'get_debit_affected': fields.char(string='Affected Debit Notes', |
1896 | - help='Debit notes affected'), |
1897 | - 'get_credit_affected': fields.char(string='Affected Credit Notes', |
1898 | - help='Credit notes affected'), |
1899 | - #~ TODO: 'get_import_form' field needs to be in imex module |
1900 | - 'get_import_form': fields.char(string="Kind of document", |
1901 | - help="Get Invoice reference"), |
1902 | - 'get_is_imported': fields.boolean(string='Is an import'), |
1903 | - 'get_papel_anulado': fields.char(string='Transaction type', size=192, |
1904 | - help="Operation Type"), |
1905 | - 'get_fiscal_printer': fields.char(string='Fiscal machine number', |
1906 | - size=192, help=""), |
1907 | - 'get_invoice_printer': fields.char(string='Fiscal printer invoice number', |
1908 | - size=192, help=""), |
1909 | - 'get_import_spreadsheets': fields.date(string='Import spreadsheets', |
1910 | - help=""), |
1911 | - 'get_nro_import_form': fields.char(string='Import form number', |
1912 | - size=192, help=""), |
1913 | - 'get_nro_import_expe': fields.char(string='Import file number', |
1914 | - sizr=192, help=""), |
1915 | - 'get_total_with_iva': fields.float('Total with IVA'), |
1916 | - 'get_vat_sdcf': fields.float('SDCF'), |
1917 | - 'get_vat_exempt': fields.float('Exent'), |
1918 | - 'get_vat_reduced_base': fields.function(_get_vat_amount, |
1919 | - type="float", method=True, store=True, |
1920 | - string="8% Base", |
1921 | - help="Vat Reduced Base Amount"), |
1922 | - 'get_vat_general_base': fields.function(_get_vat_amount, |
1923 | - type="float", method=True, store=True, |
1924 | - string="12% Base", |
1925 | - help="Vat General Base Amount"), |
1926 | - 'get_vat_additional_base': fields.function(_get_vat_amount, |
1927 | - type="float", method=True, store=True, |
1928 | - string="22% Base", |
1929 | - help="Vat Generald plus Additional Base Amount"), |
1930 | - 'get_vat_reduced_tax': fields.function(_get_vat_amount, |
1931 | - type="float", method=True, store=True, |
1932 | - string="8% Tax", |
1933 | - help="Vat Reduced Tax Amount"), |
1934 | - 'get_vat_general_tax': fields.function(_get_vat_amount, |
1935 | - type="float", method=True, store=True, |
1936 | - string="12% Tax", |
1937 | - help="Vat General Tax Amount"), |
1938 | - 'get_vat_additional_tax': fields.function(_get_vat_amount, |
1939 | - type="float", method=True, store=True, |
1940 | - string="22% Tax", |
1941 | - help="Vat General plus Additional Tax Amount"), |
1942 | - |
1943 | + 'ctrl_number': fields.char(string='Invoice Control number', size=64, |
1944 | + help=''), |
1945 | + 'invoice_number': fields.char(string='Invoice number', size=64, |
1946 | + help=''), |
1947 | + 'invoice_parent': fields.char( |
1948 | + string='Affected Invoice', |
1949 | + help='Parent Invoice for invoices that are ND or DC type'), |
1950 | + 'imex_date': fields.date(string='Imex Date', |
1951 | + help='Invoice Importation/Exportation Date'), |
1952 | + 'debit_affected': fields.char(string='Affected Debit Notes', |
1953 | + help='Debit notes affected'), |
1954 | + 'credit_affected': fields.char(string='Affected Credit Notes', |
1955 | + help='Credit notes affected'), |
1956 | + 'invoice_is_imported': fields.boolean(string='Is an import'), |
1957 | + |
1958 | + 'void_form': fields.char(string='Transaction type', size=192, |
1959 | + help="Operation Type"), |
1960 | + |
1961 | + 'fiscal_printer': fields.char(string='Fiscal machine number', |
1962 | + size=192, help=""), |
1963 | + 'invoice_printer': fields.char(string='Fiscal printer invoice number', |
1964 | + size=192, help=""), |
1965 | + 'custom_statement': fields.char(string="Custom Statement", |
1966 | + size=192, help=""), |
1967 | + |
1968 | + 'total_with_iva': fields.float('Total with IVA'), |
1969 | + 'vat_sdcf': fields.float('SDCF'), |
1970 | + 'vat_exempt': fields.float('Exent'), |
1971 | + 'vat_reduced_base': fields.float( |
1972 | + string="8% Base", |
1973 | + help="Vat Reduced Base Amount"), |
1974 | + 'vat_general_base': fields.float( |
1975 | + string="12% Base", |
1976 | + help="Vat General Base Amount"), |
1977 | + 'vat_additional_base': fields.float( |
1978 | + string="22% Base", |
1979 | + help="Vat Generald plus Additional Base Amount"), |
1980 | + 'vat_reduced_tax': fields.float( |
1981 | + string="8% Tax", |
1982 | + help="Vat Reduced Tax Amount"), |
1983 | + 'vat_general_tax': fields.float( |
1984 | + string="12% Tax", |
1985 | + help="Vat General Tax Amount"), |
1986 | + 'vat_additional_tax': fields.float( |
1987 | + string="22% Tax", |
1988 | + help="Vat General plus Additional Tax Amount"), |
1989 | } |
1990 | |
1991 | + |
1992 | class fiscal_book_taxes(orm.Model): |
1993 | |
1994 | _description = "Venezuela's Sale & Purchase Fiscal Book Taxes" |
1995 | - _name='fiscal.book.taxes' |
1996 | - _rec_name='ait_id' |
1997 | - _columns={ |
1998 | - 'name':fields.related('ait_id', 'name', relation="account.invoice.tax", |
1999 | - type="char", string='Description', store=True), |
2000 | - 'fb_id':fields.many2one('fiscal.book','Fiscal Book', |
2001 | + _name = 'fiscal.book.taxes' |
2002 | + _rec_name = 'ait_id' |
2003 | + _columns = { |
2004 | + 'name': fields.related('ait_id', 'name', |
2005 | + relation="account.invoice.tax", type="char", |
2006 | + string='Description', store=True), |
2007 | + 'fb_id': fields.many2one( |
2008 | + 'fiscal.book', 'Fiscal Book', |
2009 | help='Fiscal Book where this tax is related to'), |
2010 | - 'fbl_id':fields.many2one('fiscal.book.lines','Fiscal Book Lines', |
2011 | + 'fbl_id': fields.many2one( |
2012 | + 'fiscal.book.lines', 'Fiscal Book Lines', |
2013 | help='Fiscal Book Lines where this tax is related to'), |
2014 | 'base_amount': fields.related('ait_id', 'base_amount', |
2015 | - relation="account.invoice.tax", |
2016 | + relation="account.invoice.tax", |
2017 | type="float", string='Taxable Amount', |
2018 | help='Amount used as Taxing Base', |
2019 | store=True), |
2020 | @@ -1009,82 +1261,103 @@ |
2021 | type="float", string='Taxed Amount', |
2022 | help='Taxed Amount on Taxing Base', |
2023 | store=True), |
2024 | - 'ait_id': fields.many2one('account.invoice.tax','Tax', |
2025 | + 'ait_id': fields.many2one( |
2026 | + 'account.invoice.tax', 'Tax', |
2027 | help='Tax where is related to'), |
2028 | } |
2029 | |
2030 | + |
2031 | class fiscal_book_taxes_summary(orm.Model): |
2032 | |
2033 | _description = "Venezuela's Sale & Purchase Fiscal Book Taxes Summary" |
2034 | - _name='fiscal.book.taxes.summary' |
2035 | + _name = 'fiscal.book.taxes.summary' |
2036 | |
2037 | - _columns={ |
2038 | - 'fb_id':fields.many2one('fiscal.book','Fiscal Book'), |
2039 | - 'tax_type': fields.selection([('exento', '0% Exento'), |
2040 | - ('sdcf', 'Not entitled to tax credit'), |
2041 | - ('general', 'General Aliquot'), |
2042 | - ('reducido', 'Reducted Aliquot'), |
2043 | - ('adicional', 'General Aliquot + Additional')], |
2044 | - 'Tax Type'), |
2045 | + _columns = { |
2046 | + 'fb_id': fields.many2one('fiscal.book', 'Fiscal Book'), |
2047 | + 'tax_type': fields.selection( |
2048 | + [('exento', '0% Exento'), |
2049 | + ('sdcf', 'Not entitled to tax credit'), |
2050 | + ('general', 'General Aliquot'), |
2051 | + ('reducido', 'Reducted Aliquot'), |
2052 | + ('adicional', 'General Aliquot + Additional')], |
2053 | + 'Tax Type'), |
2054 | 'base_amount_sum': fields.float('Taxable Amount Sum'), |
2055 | 'tax_amount_sum': fields.float('Taxed Amount Sum'), |
2056 | 'international': fields.boolean('International'), |
2057 | } |
2058 | |
2059 | + |
2060 | class adjustment_book_line(orm.Model): |
2061 | - |
2062 | - _name='adjustment.book.line' |
2063 | - _columns={ |
2064 | - 'date_accounting': fields.date('Date Accounting', required=True, |
2065 | + |
2066 | + _name = 'adjustment.book.line' |
2067 | + _columns = { |
2068 | + 'date_accounting': fields.date( |
2069 | + 'Date Accounting', required=True, |
2070 | help="Date accounting for adjustment book"), |
2071 | - 'date_admin': fields.date('Date Administrative',required=True, |
2072 | + 'date_admin': fields.date( |
2073 | + 'Date Administrative', required=True, |
2074 | help="Date administrative for adjustment book"), |
2075 | - 'vat':fields.char('Vat', size=10,required=True, |
2076 | + 'vat': fields.char( |
2077 | + 'Vat', size=10, required=True, |
2078 | help="Vat of partner for adjustment book"), |
2079 | - 'partner':fields.char('Partner', size=256,required=True, |
2080 | + 'partner': fields.char( |
2081 | + 'Partner', size=256, required=True, |
2082 | help="Partner for adjustment book"), |
2083 | - 'invoice_number':fields.char('Invoice Number', size=256,required=True, |
2084 | + 'invoice_number': fields.char( |
2085 | + 'Invoice Number', size=256, required=True, |
2086 | help="Invoice number for adjustment book"), |
2087 | - 'control_number':fields.char('Invoice Control', size=256,required=True, |
2088 | - help="Invoice control for adjustment book"), |
2089 | - 'amount':fields.float('Amount Document at Withholding VAT', |
2090 | - digits_compute=dp.get_precision('Account'),required=True, |
2091 | + 'control_number': fields.char( |
2092 | + 'Invoice Control', size=256, required=True, |
2093 | + help="Invoice control for adjustment book"), |
2094 | + 'amount': fields.float( |
2095 | + 'Amount Document at Withholding VAT', |
2096 | + digits_compute=dp.get_precision('Account'), required=True, |
2097 | help="Amount document for adjustment book"), |
2098 | 'type_doc': fields.selection([ |
2099 | - ('F','Invoice'),('ND', 'Debit Note'),('NC', 'Credit Note'),], |
2100 | - 'Document Type', select=True, required=True, |
2101 | - help="Type of Document for adjustment book: "\ |
2102 | - " -Invoice(F),-Debit Note(dn),-Credit Note(cn)"), |
2103 | - 'doc_affected':fields.char('Affected Document', size=256,required=True, |
2104 | + ('F', 'Invoice'), ('ND', 'Debit Note'), ('NC', 'Credit Note'), ], |
2105 | + 'Document Type', select=True, required=True, |
2106 | + help="Type of Document for adjustment book: \ |
2107 | + -Invoice(F),-Debit Note(dn),-Credit Note(cn)"), |
2108 | + 'doc_affected': fields.char( |
2109 | + 'Affected Document', size=256, required=True, |
2110 | help="Affected Document for adjustment book"), |
2111 | - 'uncredit_fiscal':fields.float('Sin derecho a Credito Fiscal', |
2112 | - digits_compute=dp.get_precision('Account'),required=True, |
2113 | + 'uncredit_fiscal': fields.float( |
2114 | + 'Sin derecho a Credito Fiscal', |
2115 | + digits_compute=dp.get_precision('Account'), required=True, |
2116 | help="Sin derechoa credito fiscal"), |
2117 | - 'amount_untaxed_n': fields.float('Amount Untaxed', |
2118 | - digits_compute=dp.get_precision('Account'),required=True, |
2119 | + 'amount_untaxed_n': fields.float( |
2120 | + 'Amount Untaxed', |
2121 | + digits_compute=dp.get_precision('Account'), required=True, |
2122 | help="Amount untaxed for national operations"), |
2123 | - 'percent_with_vat_n': fields.float('% Withholding VAT', |
2124 | - digits_compute=dp.get_precision('Account'),required=True, |
2125 | - help="Percent(%) VAT for national operations"), |
2126 | - 'amount_with_vat_n': fields.float('Amount Withholding VAT', |
2127 | - digits_compute=dp.get_precision('Account'),required=True, |
2128 | - help="Percent(%) VAT for national operations"), |
2129 | - 'amount_untaxed_i': fields.float('Amount Untaxed', |
2130 | - digits_compute=dp.get_precision('Account'),required=True, |
2131 | + 'percent_with_vat_n': fields.float( |
2132 | + '% Withholding VAT', |
2133 | + digits_compute=dp.get_precision('Account'), required=True, |
2134 | + help="Percent(%) VAT for national operations"), |
2135 | + 'amount_with_vat_n': fields.float( |
2136 | + 'Amount Withholding VAT', |
2137 | + digits_compute=dp.get_precision('Account'), required=True, |
2138 | + help="Percent(%) VAT for national operations"), |
2139 | + 'amount_untaxed_i': fields.float( |
2140 | + 'Amount Untaxed', |
2141 | + digits_compute=dp.get_precision('Account'), required=True, |
2142 | help="Amount untaxed for international operations"), |
2143 | - 'percent_with_vat_i': fields.float('% Withholding VAT', |
2144 | - digits_compute=dp.get_precision('Account'),required=True, |
2145 | + 'percent_with_vat_i': fields.float( |
2146 | + '% Withholding VAT', |
2147 | + digits_compute=dp.get_precision('Account'), required=True, |
2148 | help="Percent(%) VAT for international operations"), |
2149 | - 'amount_with_vat_i': fields.float('Amount Withholding VAT', |
2150 | - digits_compute=dp.get_precision('Account'),required=True, |
2151 | + 'amount_with_vat_i': fields.float( |
2152 | + 'Amount Withholding VAT', |
2153 | + digits_compute=dp.get_precision('Account'), required=True, |
2154 | help="Amount withholding VAT for international operations"), |
2155 | - 'amount_with_vat': fields.float('Amount Withholding VAT Total', |
2156 | - digits_compute=dp.get_precision('Account'),required=True, |
2157 | + 'amount_with_vat': fields.float( |
2158 | + 'Amount Withholding VAT Total', |
2159 | + digits_compute=dp.get_precision('Account'), required=True, |
2160 | help="Amount withheld VAT total"), |
2161 | - 'voucher': fields.char('Voucher Withholding VAT', size=256, |
2162 | - required=True,help="Voucher Withholding VAT"), |
2163 | - 'fb_id':fields.many2one('fiscal.book','Fiscal Book', |
2164 | + 'voucher': fields.char( |
2165 | + 'Voucher Withholding VAT', size=256, |
2166 | + required=True, help="Voucher Withholding VAT"), |
2167 | + 'fb_id': fields.many2one( |
2168 | + 'fiscal.book', 'Fiscal Book', |
2169 | help='Fiscal Book where this line is related to'), |
2170 | } |
2171 | _rec_rame = 'partner' |
2172 | - |
2173 | |
2174 | === modified file 'l10n_ve_fiscal_book/model/invoice.py' |
2175 | --- l10n_ve_fiscal_book/model/invoice.py 2013-04-16 16:01:03 +0000 |
2176 | +++ l10n_ve_fiscal_book/model/invoice.py 2013-04-25 19:45:35 +0000 |
2177 | @@ -1,14 +1,15 @@ |
2178 | #!/usr/bin/python |
2179 | # -*- encoding: utf-8 -*- |
2180 | -########################################################################### |
2181 | +############################################################################### |
2182 | # Module Writen to OpenERP, Open Source Management Solution |
2183 | # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
2184 | # All Rights Reserved |
2185 | -###############Credits###################################################### |
2186 | +################ Credits ###################################################### |
2187 | # Coded by: Luis Escobar <luis@vauxoo.com> |
2188 | # Tulio Ruiz <tulio@vauxoo.com> |
2189 | +# Katherine Zsoral <katherine.zaoral@vauxoo.com> |
2190 | # Planified by: Nhomar Hernandez |
2191 | -############################################################################# |
2192 | +############################################################################### |
2193 | # This program is free software: you can redistribute it and/or modify |
2194 | # it under the terms of the GNU General Public License as published by |
2195 | # the Free Software Foundation, either version 3 of the License, or |
2196 | @@ -21,7 +22,7 @@ |
2197 | # |
2198 | # You should have received a copy of the GNU General Public License |
2199 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
2200 | -############################################################################## |
2201 | +############################################################################### |
2202 | from openerp.osv import osv, fields |
2203 | |
2204 | |
2205 | @@ -29,21 +30,18 @@ |
2206 | _inherit = "account.invoice" |
2207 | |
2208 | _columns = { |
2209 | - 'fb_id':fields.many2one('fiscal.book','Fiscal Book', |
2210 | - help='Fiscal Book where this line is related to'), |
2211 | - #TODO: THIS FIELD TO BE CHANGED TO A STORABLE FUNCTIONAL FIELD |
2212 | - #CHANGE EVEN FROM boolean to selection |
2213 | - 'issue_fb_id':fields.many2one('fiscal.book','Fiscal Book', |
2214 | - help='Fiscal Book where this invoice needs to be add'), |
2215 | - 'fb_submitted':fields.boolean('Fiscal Book Submitted?', |
2216 | - help='Indicates if this invoice is in a Fiscal Book which has'\ |
2217 | - ' being already submitted to the statutory institute'), |
2218 | - |
2219 | - #~ TODO: This two fields are not set, check its use or remove (check Imex) |
2220 | - 'num_import_expe': fields.char('Import File number', 15, |
2221 | - help="Import the file number for this invoice"), |
2222 | - 'num_import_form': fields.char('Import Form number', 15, |
2223 | - help="Import the form number for this invoice"), |
2224 | - } |
2225 | + 'fb_id': fields.many2one('fiscal.book', 'Fiscal Book', |
2226 | + help='Fiscal Book where this line is \ |
2227 | + related to'), |
2228 | + 'issue_fb_id': fields.many2one('fiscal.book', 'Fiscal Book', |
2229 | + help='Fiscal Book where this invoice \ |
2230 | + needs to be add'), |
2231 | + # TODO: THIS FIELD TO BE CHANGED TO A STORABLE FUNCTIONAL FIELD |
2232 | + # CHANGE EVEN FROM boolean to selection |
2233 | + 'fb_submitted': fields.boolean('Fiscal Book Submitted?', |
2234 | + help='Indicates if this invoice is in \ |
2235 | + a Fiscal Book which has being already \ |
2236 | + submitted to the statutory institute'), |
2237 | + } |
2238 | |
2239 | inherited_invoice() |
2240 | |
2241 | === modified file 'l10n_ve_fiscal_book/report/fiscal_book_parser.py' |
2242 | --- l10n_ve_fiscal_book/report/fiscal_book_parser.py 2013-04-16 00:03:28 +0000 |
2243 | +++ l10n_ve_fiscal_book/report/fiscal_book_parser.py 2013-04-25 19:45:35 +0000 |
2244 | @@ -32,69 +32,61 @@ |
2245 | #~ _description = '''Fiscal Book for Venezuela''' |
2246 | |
2247 | _tax_types = ['8%', '12%', '22%'] |
2248 | - _taxes_cols_list = [ |
2249 | + _impuestos_cols = [ |
2250 | 'base-imponible', |
2251 | '%iva', |
2252 | - 'monto-impuesto', |
2253 | - ] |
2254 | - |
2255 | - _purchase_cols_list = [ |
2256 | + 'monto-impuesto' |
2257 | + ] |
2258 | + |
2259 | + _purchase_macro_cols_list = [ |
2260 | + 'datos-factura-documento', |
2261 | + 'importaciones', |
2262 | + 'compras-internas', |
2263 | + ] |
2264 | + |
2265 | + _datos_factura_documento_cols = [ |
2266 | 'linea', |
2267 | + 't-doc', |
2268 | 'fecha-doc', |
2269 | - 'fecha-importada', |
2270 | - 't-doc', |
2271 | - 'rif', |
2272 | - 'razon-social', |
2273 | - 'comprobante', |
2274 | - 'planilla-importacion', |
2275 | - 'expediente-importacion', |
2276 | + 'numero-control', |
2277 | 'numero-facutra', |
2278 | - 'numero-control', |
2279 | - 't-trans', |
2280 | - 'nota-de-debito-afectada', |
2281 | - 'nota-de-credito-afectada', |
2282 | 'documento-afectado', |
2283 | - #~ IMPORTACIONES |
2284 | - 'total-con-iva', |
2285 | - 'sdcf', |
2286 | - 'exento', |
2287 | - #~ '_vat-reduced', |
2288 | - 'base-imponible', |
2289 | - '%iva', |
2290 | - 'monto-impuesto', |
2291 | - #~ '_vat-general', |
2292 | - 'base-imponible', |
2293 | - '%iva', |
2294 | - 'monto-impuesto', |
2295 | - #~ '_vat-additional', |
2296 | - 'base-imponible', |
2297 | - '%iva', |
2298 | - 'monto-impuesto', |
2299 | - #~ COMPRAS INTERNAS |
2300 | - 'total-con-iva', |
2301 | - 'sdcf', |
2302 | - 'exento', |
2303 | - #~ '_vat-reduced', |
2304 | - 'base-imponible', |
2305 | - '%iva', |
2306 | - 'monto-impuesto', |
2307 | - #~ '_vat-general', |
2308 | - 'base-imponible', |
2309 | - '%iva', |
2310 | - 'monto-impuesto', |
2311 | - #~ '_vat-additional', |
2312 | - 'base-imponible', |
2313 | - '%iva', |
2314 | - 'monto-impuesto', |
2315 | - 'retencion-iva', |
2316 | - ] |
2317 | - |
2318 | - _purchase_macro_cols_list = [ |
2319 | - 'importaciones', |
2320 | - 'compras-internas', |
2321 | - '_first-macro-cols', |
2322 | - '_last-macro-cols', |
2323 | - ] |
2324 | + 'razon-social', |
2325 | + 'rif', |
2326 | + 'fecha-importada', |
2327 | + 'total-con-iva', |
2328 | + ] |
2329 | + |
2330 | + _importaciones_cols = [ |
2331 | + 'sdcf', |
2332 | + 'exento', |
2333 | + ] |
2334 | + _importaciones_cols.extend(_impuestos_cols) #~ '_vat-general' |
2335 | + _importaciones_cols.extend(_impuestos_cols) #~ '_vat-reduced' |
2336 | + _importaciones_cols.extend(_impuestos_cols) #~ '_vat-additional' |
2337 | + |
2338 | + _compras_internas_cols = [ |
2339 | + 'sdcf', |
2340 | + 'exento', |
2341 | + ] |
2342 | + _compras_internas_cols.extend(_impuestos_cols) #~ '_vat-general' |
2343 | + _compras_internas_cols.extend(_impuestos_cols) #~ '_vat-reduced' |
2344 | + _compras_internas_cols.extend(_impuestos_cols) #~ '_vat-additional' |
2345 | + |
2346 | + _retenciones_cols = [ |
2347 | + 'ret-fecha-factura-afectada', |
2348 | + 'ret-number', |
2349 | + 'debito-fiscal-base', |
2350 | + 'ret-percent', |
2351 | + 'ret-monto-retenido', |
2352 | + ] |
2353 | + |
2354 | + _compras_internas_cols.extend(_retenciones_cols) |
2355 | + |
2356 | + _purchase_cols_list = list() |
2357 | + _purchase_cols_list.extend(_datos_factura_documento_cols) |
2358 | + _purchase_cols_list.extend(_importaciones_cols) |
2359 | + _purchase_cols_list.extend(_compras_internas_cols) |
2360 | |
2361 | _cols_depending_on_import = ['total-con-iva', 'sdcf', 'exento', \ |
2362 | 'base-imponible', '%iva', 'monto-impuesto'] |
2363 | @@ -111,31 +103,31 @@ |
2364 | 'fecha-doc': { |
2365 | 'name': 'Fecha Doc.', |
2366 | 'width': 23.0, |
2367 | - 'value': lambda fbl: fbl.get_accounting_date, |
2368 | + 'value': lambda fbl: fbl.accounting_date, |
2369 | 'total': lambda fb: '', |
2370 | 'help': '' }, |
2371 | 'fecha-importada': { |
2372 | 'name': 'Fecha Importada', |
2373 | 'width': 23.0, |
2374 | - 'value': lambda fbl: fbl.get_emission_date, |
2375 | + 'value': lambda fbl: fbl.emission_date, |
2376 | 'total': lambda fb: '', |
2377 | 'help': '' }, |
2378 | 't-doc': { |
2379 | 'name': 'T. Doc.', |
2380 | 'width': 15.0, |
2381 | - 'value': lambda fbl: fbl.get_t_doc, |
2382 | + 'value': lambda fbl: fbl.doc_type, |
2383 | 'total': lambda fb: '', |
2384 | 'help': '' }, |
2385 | 'rif': { |
2386 | 'name': 'RIF', |
2387 | 'width': 25.0, |
2388 | - 'value': lambda fbl: fbl.get_partner_vat, |
2389 | + 'value': lambda fbl: fbl.partner_vat, |
2390 | 'total': lambda fb: '', |
2391 | 'help': '' }, |
2392 | 'razon-social': { |
2393 | 'name': 'Razon Social', |
2394 | 'width': 160.0, |
2395 | - 'value': lambda fbl: fbl.get_partner_name, |
2396 | + 'value': lambda fbl: fbl.partner_name, |
2397 | 'total': lambda fb: '', |
2398 | 'help': '' }, |
2399 | 'comprobante': { |
2400 | @@ -148,75 +140,69 @@ |
2401 | 'planilla-importacion': { |
2402 | 'name': 'Planilla de Importación', |
2403 | 'width': 30.0, |
2404 | - 'value': lambda fbl: fbl.get_import_form, |
2405 | + 'value': lambda fbl: 'TODO', |
2406 | 'total': lambda fb: '', |
2407 | 'help': '' }, |
2408 | 'expediente-importacion': { |
2409 | 'name': 'Expediente de Importacion', |
2410 | 'width': 36.0, |
2411 | - 'value': lambda fbl: fbl.invoice_id.import_spreadsheet_name, |
2412 | + 'value': lambda fbl: 'TODO', |
2413 | 'total': lambda fb: '', |
2414 | 'help': '' }, |
2415 | 'numero-facutra': { |
2416 | 'name': 'Número de Facutra', |
2417 | 'width': 36.0, |
2418 | - 'value': lambda fbl: fbl.get_reference, |
2419 | + 'value': lambda fbl: fbl.invoice_number, |
2420 | 'total': lambda fb: '', |
2421 | 'help': '' }, |
2422 | 'numero-control': { |
2423 | 'name': 'Número Control', |
2424 | 'width': 36.0, |
2425 | - 'value': lambda fbl: fbl.get_number, |
2426 | + 'value': lambda fbl: fbl.ctrl_number, |
2427 | 'total': lambda fb: '', |
2428 | 'help': '' }, |
2429 | 't-trans': { |
2430 | 'name': 'T. Trans.', |
2431 | 'width': 18.0, |
2432 | - 'value': lambda fbl: fbl.get_papel_anulado, |
2433 | + 'value': lambda fbl: fbl.void_form, |
2434 | 'total': lambda fb: '', |
2435 | 'help': '' }, |
2436 | 'nota-de-debito-afectada': { |
2437 | 'name': 'Nota de Debito Afectada', |
2438 | 'width': 33.0, |
2439 | - 'value': lambda fbl: fbl.get_debit_affected, |
2440 | + 'value': lambda fbl: fbl.debit_affected, |
2441 | 'total': lambda fb: '', |
2442 | 'help': '' }, |
2443 | 'nota-de-credito-afectada': { |
2444 | 'name': 'Nota de Credito Afectada', |
2445 | 'width': 33.0, |
2446 | - 'value': lambda fbl: fbl.get_credit_affected, |
2447 | + 'value': lambda fbl: fbl.credit_affected, |
2448 | 'total': lambda fb: '', |
2449 | 'help': '' }, |
2450 | 'documento-afectado': { |
2451 | 'name': 'Documento Afectado', |
2452 | 'width': 33.0, |
2453 | - 'value': lambda fbl: fbl.get_parent, |
2454 | + 'value': lambda fbl: fbl.invoice_parent, |
2455 | 'total': lambda fb: '', |
2456 | 'help': '' }, |
2457 | 'total-con-iva': { |
2458 | 'name': 'Total con Iva', |
2459 | 'width': 37.0, |
2460 | - 'value': lambda fbl, is_imported: is_imported and fbl.get_total_with_iva or 0.0, |
2461 | + 'value': lambda fbl, is_imported: is_imported and fbl.total_with_iva or 0.0, |
2462 | 'total': lambda fb: 'TODO', |
2463 | 'help': '' }, |
2464 | 'sdcf': { |
2465 | 'name': 'SDCF', |
2466 | 'width': 29.0, |
2467 | - 'value': lambda fbl, is_imported: is_imported and fbl.get_vat_sdcf or 0.0, |
2468 | + 'value': lambda fbl, is_imported: is_imported and fbl.vat_sdcf or 0.0, |
2469 | 'total': lambda fb: 'TODO', |
2470 | 'help': '' }, |
2471 | 'exento': { |
2472 | 'name': 'Exento', |
2473 | 'width': 29.0, |
2474 | - 'value': lambda fbl, is_imported: is_imported and fbl.get_vat_exempt or 0.0, |
2475 | + 'value': lambda fbl, is_imported: is_imported and fbl.vat_exempt or 0.0, |
2476 | 'total': lambda fb: 'TODO', |
2477 | 'help': '' }, |
2478 | - 'retencion-iva': { |
2479 | - 'name': 'Retencion IVA', |
2480 | - 'width': 40.0, |
2481 | - 'value': lambda fbl: fbl.get_withheld, |
2482 | - 'total': lambda fb: '', |
2483 | - 'help': '' }, |
2484 | |
2485 | #~ taxes columns |
2486 | 'base-imponible': { |
2487 | @@ -256,25 +242,53 @@ |
2488 | 'total': lambda fb: '', |
2489 | 'help': '' }, |
2490 | |
2491 | + #~ WITHHOLDING COLUMS |
2492 | + 'ret-fecha-factura-afectada': { |
2493 | + 'name': 'Fecha de Factura afectada', |
2494 | + 'width': 35.0, |
2495 | + 'value': lambda fbl: 'TODO', |
2496 | + 'total': lambda fb: '', |
2497 | + 'help': '' }, |
2498 | + 'ret-number': { |
2499 | + 'name': 'Nro Retención', |
2500 | + 'width': 35.0, |
2501 | + 'value': lambda fbl: 'TODO', |
2502 | + 'total': lambda fb: '', |
2503 | + 'help': '' }, |
2504 | + 'debito-fiscal-base': { |
2505 | + 'name': 'Débito Fiscal Base', |
2506 | + 'width': 35.0, |
2507 | + 'value': lambda fbl: 'TODO', |
2508 | + 'total': lambda fb: '', |
2509 | + 'help': '' }, |
2510 | + 'ret-percent': { |
2511 | + 'name': 'Retención %', |
2512 | + 'width': 35.0, |
2513 | + 'value': lambda fbl: 'TODO', |
2514 | + 'total': lambda fb: '', |
2515 | + 'help': '' }, |
2516 | + 'ret-monto-retenido': { |
2517 | + 'name': 'Monto Retenido', |
2518 | + 'width': 35.0, |
2519 | + 'value': lambda fbl: fbl.get_wh_vat, |
2520 | + 'total': lambda fb: '', |
2521 | + 'help': '' }, |
2522 | + |
2523 | #~ MACRO COLS |
2524 | 'importaciones': { |
2525 | - 'name': 'IMPORTACIONES', |
2526 | + 'name': 'OPERACIONES DE IMPORTACIONES', |
2527 | 'width': None, |
2528 | 'value': lambda fbl: '', |
2529 | 'total': lambda fb: '', |
2530 | 'help': '' }, |
2531 | 'compras-internas': { |
2532 | - 'name': 'COMPRAS INTERNAS', |
2533 | - 'width': None, |
2534 | - 'value': lambda fbl: '', |
2535 | - 'total': lambda fb: '', |
2536 | - 'help': '' }, |
2537 | - '_first-macro-cols': { |
2538 | - 'width': None, |
2539 | - 'value': lambda fbl: '', |
2540 | - 'total': lambda fb: '', |
2541 | - 'help': '' }, |
2542 | - '_last-macro-cols': { |
2543 | + 'name': 'OPERACIONES EN EL MERCADO INTERNO', |
2544 | + 'width': None, |
2545 | + 'value': lambda fbl: '', |
2546 | + 'total': lambda fb: '', |
2547 | + 'help': '' }, |
2548 | + 'datos-factura-documento': { |
2549 | + 'name': 'DATOS DE LA FACTURA O/Y DOCUMENTO', |
2550 | 'width': None, |
2551 | 'value': lambda fbl: '', |
2552 | 'total': lambda fb: '', |
2553 | @@ -298,6 +312,7 @@ |
2554 | 'get_col_width': self._get_col_width, |
2555 | 'get_col_total': self._get_col_total, |
2556 | 'add_total_string': self._add_total_string, |
2557 | + 'set_macro_cols_width': self._set_macro_cols_width, |
2558 | |
2559 | #~ TODO: use this function after the bug for repeatIn arg3 is solve. |
2560 | 'get_cols': self._get_cols, |
2561 | @@ -318,6 +333,12 @@ |
2562 | print ' ', col_num, '\t', self._get_col_width(col_tag), '\t', self._cols[col_tag]['name'] |
2563 | print '-----------------------------\n' |
2564 | |
2565 | + self._set_macro_cols_width() |
2566 | + print 'importaciones', 'compras-internas', 'datos-factura-documento', \ |
2567 | + '"', self._cols['datos-factura-documento']['width'], ', ', \ |
2568 | + self._cols['importaciones']['width'], ', ', \ |
2569 | + self._cols['compras-internas']['width'], '"' |
2570 | + |
2571 | def _get_month(self, fb): |
2572 | """ |
2573 | Return an array with the year and month of the fiscal book period. |
2574 | @@ -366,7 +387,7 @@ |
2575 | col_tag = self._purchase_cols_list[col_number-1] |
2576 | if col_tag in self._cols_depending_on_import: |
2577 | if fbl_brw.invoice_id: |
2578 | - is_imported = fbl_brw.get_is_imported \ |
2579 | + is_imported = fbl_brw.invoice_is_imported \ |
2580 | and col_number < 27 and True or False \ |
2581 | or col_number > 27 and True or False |
2582 | my_args.append(is_imported) |
2583 | @@ -374,14 +395,14 @@ |
2584 | if col_tag in self._cols_depending_on_tax_type: |
2585 | #~ TODO: hacer como debe ser con el nombre de los campos.. |
2586 | if col_tag is 'base-imponible': |
2587 | - #~ 'fbl_brw.get_vat_reduced_base' |
2588 | - #~ 'fbl_brw.get_vat_general_base' |
2589 | + #~ 'fbl_brw.vat_reduced_base' |
2590 | + #~ 'fbl_brw.vat_general_base' |
2591 | #~ 'fbl_brw.get_vat_general_add_base' |
2592 | print col_number, 'soy columna base imponible' |
2593 | elif col_tag is 'monto-imponible': |
2594 | - #~ 'fbl_brw.get_vat_reduced_tax' |
2595 | - #~ 'fbl_brw.get_vat_general_tax' |
2596 | - #~ 'fbl_brw.get_vat_general_tax' |
2597 | + #~ 'fbl_brw.vat_reduced_tax' |
2598 | + #~ 'fbl_brw.vat_general_tax' |
2599 | + #~ 'fbl_brw.vat_general_tax' |
2600 | print col_number, 'soy columna monto imponible' |
2601 | elif col_tag is '%iva': |
2602 | print col_number, 'soy columna %iva' |
2603 | @@ -422,7 +443,7 @@ |
2604 | """ It returns the tax columns group width.""" |
2605 | context = context or {} |
2606 | return sum( [ self._get_col_width(col_name) \ |
2607 | - for col_name in self._taxes_cols_list ] ) |
2608 | + for col_name in self._impuestos_cols ] ) |
2609 | |
2610 | def _add_total_string(self, context=None): |
2611 | """ Set the column where de TOTAL tag will be print """ |
2612 | @@ -430,6 +451,23 @@ |
2613 | self._cols['razon-social']['total'] = lambda x: 'TOTALES' |
2614 | return True |
2615 | |
2616 | + def _set_macro_cols_width(self, context=None): |
2617 | + """ Returns the list of cols widht for every marco column. """ |
2618 | + context = context or {} |
2619 | + self._cols['datos-factura-documento']['width'] = \ |
2620 | + sum( [ self._get_col_width(col_name) \ |
2621 | + for col_name in self._datos_factura_documento_cols ] ) |
2622 | + |
2623 | + self._cols['importaciones']['width'] = \ |
2624 | + sum( [ self._get_col_width(col_name) \ |
2625 | + for col_name in self._importaciones_cols ] ) |
2626 | + |
2627 | + self._cols['compras-internas']['width'] = \ |
2628 | + sum( [ self._get_col_width(col_name) \ |
2629 | + for col_name in self._compras_internas_cols ] ) |
2630 | + |
2631 | + return True |
2632 | + |
2633 | report_sxw.report_sxw( |
2634 | 'report.fiscal.book.sale', |
2635 | 'fiscal.book', |
2636 | |
2637 | === modified file 'l10n_ve_fiscal_book/report/fiscal_book_purchase_report.rml' |
2638 | --- l10n_ve_fiscal_book/report/fiscal_book_purchase_report.rml 2013-04-16 00:03:28 +0000 |
2639 | +++ l10n_ve_fiscal_book/report/fiscal_book_purchase_report.rml 2013-04-25 19:45:35 +0000 |
2640 | @@ -6,7 +6,7 @@ |
2641 | A2 Size ( 420 x 594 mm - 16.5 x 23.4 inches ) |
2642 | A3 Size ( 297 x 420 mm - 11.7 x 16.5 inches ) |
2643 | --> |
2644 | - <template pageSize="(25in,20in)" title="Test" author="Martin Simon" allowSplitting="20" showBoundary="0"> |
2645 | + <template pageSize="(25in,20in)" title="Test" author="Katherine Zaoral" allowSplitting="20" showBoundary="0"> |
2646 | <!-- |
2647 | <template>[[ setTag('template', 'template', { 'pageSize': "(25in,20in)", 'title': "Test", 'author': "Katherine Zaoral", 'allowSplitting': "20", 'showBoundary': "0" } ) ]] |
2648 | --> |
2649 | @@ -56,8 +56,7 @@ |
2650 | <blockBackground colorName="#e5e2e5" start="1,1" stop="-1,1"/> |
2651 | </blockTableStyle> |
2652 | <blockTableStyle id="ENCANBEZADO_SINCOLUM_2"> |
2653 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,0" stop="2,0"/> |
2654 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,1" stop="-1,-1"/> |
2655 | + <lineStyle kind="GRID" colorName="black" thickness="1"/> |
2656 | <blockBackground colorName="#e5e2e5" start="1,1" stop="-1,1"/> |
2657 | </blockTableStyle> |
2658 | <blockTableStyle id="TOTALS_TABLE"> |
2659 | @@ -110,13 +109,6 @@ |
2660 | <paraStyle name="P5" fontName="Times-Roman" fontSize="7.0" leading="8"/> |
2661 | <paraStyle name="TITULO_AJUSTE" fontName="Times-Roman" fontSize="10.0" alignment="CENTER"/> |
2662 | <paraStyle name="CONTENIDO" fontName="Times-Roman" fontSize="4.5" leading="4.7" alignment="CENTER" topPadding="0.5" bottomPadding="0.7"/> |
2663 | - |
2664 | -<!-- |
2665 | - TODO: INFO: new style |
2666 | ---> |
2667 | - <paraStyle name="CONTENIDO_GEN" fontName="Times-Roman" fontSize="4.5" leading="4" alignment="CENTER" topPadding="0.1" bottomPadding="0.1"/> |
2668 | - |
2669 | - |
2670 | <paraStyle name="CONTENIDOINT" fontName="Times-Roman" fontSize="4.5" leading="5.0" alignment="RIGHT" topPadding="0.5" bottomPadding="0.7"/> |
2671 | <paraStyle name="CONTENIDOLEFT" fontName="Times-Roman" fontSize="4.5" leading="4.7" alignment="LEFT"/> |
2672 | <paraStyle name="OBSERVACIONES" fontName="Times-Roman" fontSize="9.0" alignment="LEFT"/> |
2673 | @@ -135,6 +127,26 @@ |
2674 | <paraStyle name="Table Contents" fontName="Times-Roman"/> |
2675 | <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/> |
2676 | |
2677 | + <blockTableStyle id="NEW-HEADER"> |
2678 | + <lineStyle kind="GRID" colorName="black"/> |
2679 | + <blockLeading lenght="0"/> |
2680 | + <blockLeftPadding lenght="0"/> |
2681 | + <blockRightPadding lenght="0"/> |
2682 | + <blockTopPadding lenght="0"/> |
2683 | + <blockBottomPadding lenght="0"/> |
2684 | + </blockTableStyle> |
2685 | + |
2686 | + <blockTableStyle id="NEW-CONTENIDOTABLE-LINES"> |
2687 | + <blockAlignment value="LEFT"/> |
2688 | + <blockValign value="MIDDLE"/> |
2689 | + <lineStyle kind="GRID" colorName="black" thickness="0.5"/> |
2690 | + <blockLeading lenght="0"/> |
2691 | + <blockLeftPadding lenght="0"/> |
2692 | + <blockRightPadding lenght="0"/> |
2693 | + <blockTopPadding lenght="0"/> |
2694 | + <blockBottomPadding lenght="0"/> |
2695 | + </blockTableStyle> |
2696 | + |
2697 | </stylesheet> |
2698 | <images/> |
2699 | |
2700 | @@ -165,497 +177,367 @@ |
2701 | </blockTable> |
2702 | <spacer length="2mm"/> |
2703 | |
2704 | - <!-- Dynamic Version --> |
2705 | - <section> |
2706 | - <para> Dinamyc Version </para> |
2707 | - |
2708 | - <!-- PURCHASE BOOK HEADERS --> |
2709 | - <section> |
2710 | - <blockTable colWidths="517.0,180.0,180.0" style="ENCANBEZADO_SINCOLUM_2" blockAlignment="LEFT"> |
2711 | - <tr> |
2712 | - <td></td> |
2713 | - <td vAlign="MIDDLE"><para style="HEADER">IMPORTACIONES</para></td> |
2714 | - <td vAlign="MIDDLE"><para style="HEADER">COMPRAS INTERNAS</para></td> |
2715 | - </tr> |
2716 | - </blockTable> |
2717 | - </section> |
2718 | - <section> |
2719 | - <blockTable> [[ setTag('blockTable', 'blockTable', {'colWidths' : get_attr_col_widths(), 'style' : "ENCANBEZADO_SINCOLUM", 'repeatRows' : "1" } ) ]] |
2720 | - <!-- |
2721 | - <tr> |
2722 | - [[ repeatIn( get_cols() ,'col_name') ]] |
2723 | - <td><para style="HEADER">[[ col_name ]]</para></td> |
2724 | - </tr> |
2725 | - --> |
2726 | - <tr> |
2727 | - <td></td> |
2728 | - <td><para style="HEADER">[[ get_col_name( 1 ) ]]</para></td> |
2729 | - <td><para style="HEADER">[[ get_col_name( 2 ) ]]</para></td> |
2730 | - <td><para style="HEADER">[[ get_col_name( 3 ) ]]</para></td> |
2731 | - <td><para style="HEADER">[[ get_col_name( 4 ) ]]</para></td> |
2732 | - <td><para style="HEADER">[[ get_col_name( 5 ) ]]</para></td> |
2733 | - <td><para style="HEADER">[[ get_col_name( 6 ) ]]</para></td> |
2734 | - <td><para style="HEADER">[[ get_col_name( 7 ) ]]</para></td> |
2735 | - <td><para style="HEADER">[[ get_col_name( 8 ) ]]</para></td> |
2736 | - <td><para style="HEADER">[[ get_col_name( 9 ) ]]</para></td> |
2737 | - <td><para style="HEADER">[[ get_col_name( 10 ) ]]</para></td> |
2738 | - <td><para style="HEADER">[[ get_col_name( 11 ) ]]</para></td> |
2739 | - <td><para style="HEADER">[[ get_col_name( 12 ) ]]</para></td> |
2740 | - <td><para style="HEADER">[[ get_col_name( 13 ) ]]</para></td> |
2741 | - <td><para style="HEADER">[[ get_col_name( 14 ) ]]</para></td> |
2742 | - <td><para style="HEADER">[[ get_col_name( 15 ) ]]</para></td> |
2743 | - <td><para style="HEADER">[[ get_col_name( 16 ) ]]</para></td> |
2744 | - <td><para style="HEADER">[[ get_col_name( 17 ) ]]</para></td> |
2745 | - <td><para style="HEADER">[[ get_col_name( 18 ) ]]</para></td> |
2746 | - <td><para style="HEADER">[[ get_col_name( 19 ) ]]</para></td> |
2747 | - <td><para style="HEADER">[[ get_col_name( 20 ) ]]</para></td> |
2748 | - <td><para style="HEADER">[[ get_col_name( 21 ) ]]</para></td> |
2749 | - <td><para style="HEADER">[[ get_col_name( 22 ) ]]</para></td> |
2750 | - <td><para style="HEADER">[[ get_col_name( 23 ) ]]</para></td> |
2751 | - <td><para style="HEADER">[[ get_col_name( 24 ) ]]</para></td> |
2752 | - <td><para style="HEADER">[[ get_col_name( 25 ) ]]</para></td> |
2753 | - <td><para style="HEADER">[[ get_col_name( 26 ) ]]</para></td> |
2754 | - <td><para style="HEADER">[[ get_col_name( 27 ) ]]</para></td> |
2755 | - <td><para style="HEADER">[[ get_col_name( 28 ) ]]</para></td> |
2756 | - <td><para style="HEADER">[[ get_col_name( 29 ) ]]</para></td> |
2757 | - <td><para style="HEADER">[[ get_col_name( 30 ) ]]</para></td> |
2758 | - <td><para style="HEADER">[[ get_col_name( 31 ) ]]</para></td> |
2759 | - <td><para style="HEADER">[[ get_col_name( 32 ) ]]</para></td> |
2760 | - <td><para style="HEADER">[[ get_col_name( 33 ) ]]</para></td> |
2761 | - <td><para style="HEADER">[[ get_col_name( 34 ) ]]</para></td> |
2762 | - <td><para style="HEADER">[[ get_col_name( 35 ) ]]</para></td> |
2763 | - <td><para style="HEADER">[[ get_col_name( 36 ) ]]</para></td> |
2764 | - <td><para style="HEADER">[[ get_col_name( 37 ) ]]</para></td> |
2765 | - <td><para style="HEADER">[[ get_col_name( 38 ) ]]</para></td> |
2766 | - <td><para style="HEADER">[[ get_col_name( 39 ) ]]</para></td> |
2767 | - <td><para style="HEADER">[[ get_col_name( 40 ) ]]</para></td> |
2768 | - </tr> |
2769 | - </blockTable> |
2770 | - </section> |
2771 | - |
2772 | - <!-- PURCHASE BOOK LINES --> |
2773 | - <section> |
2774 | - <para>[[repeatIn( my_fb.fbl_ids,'my_fbl')]]</para> |
2775 | - <blockTable> [[ setTag('blockTable', 'blockTable', {'colWidths' : get_attr_col_widths(), 'style' : "CONTENIDOTABLE_LINES", 'rowHeights': '8'} ) ]] |
2776 | - <tr> |
2777 | - [[ setLang(my_fbl.ai_id.company_id.partner_id.lang) ]] |
2778 | - <td></td> |
2779 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 1, my_fbl ) ]]</para></td> |
2780 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 2, my_fbl ) ]]</para></td> |
2781 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 3, my_fbl ) ]]</para></td> |
2782 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 4, my_fbl ) ]]</para></td> |
2783 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 5, my_fbl ) ]]</para></td> |
2784 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 6, my_fbl ) ]]</para></td> |
2785 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 7, my_fbl ) ]]</para></td> |
2786 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 8, my_fbl ) ]]</para></td> |
2787 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 9, my_fbl ) ]]</para></td> |
2788 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 10, my_fbl ) ]]</para></td> |
2789 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 11, my_fbl ) ]]</para></td> |
2790 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 12, my_fbl ) ]]</para></td> |
2791 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 13, my_fbl ) ]]</para></td> |
2792 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 14, my_fbl ) ]]</para></td> |
2793 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 15, my_fbl ) ]]</para></td> |
2794 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 16, my_fbl ) ]]</para></td> |
2795 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 17, my_fbl ) ]]</para></td> |
2796 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 18, my_fbl ) ]]</para></td> |
2797 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 19, my_fbl ) ]]</para></td> |
2798 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 20, my_fbl ) ]]</para></td> |
2799 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 21, my_fbl ) ]]</para></td> |
2800 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 22, my_fbl ) ]]</para></td> |
2801 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 23, my_fbl ) ]]</para></td> |
2802 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 24, my_fbl ) ]]</para></td> |
2803 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 25, my_fbl ) ]]</para></td> |
2804 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 26, my_fbl ) ]]</para></td> |
2805 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 27, my_fbl ) ]]</para></td> |
2806 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 28, my_fbl ) ]]</para></td> |
2807 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 29, my_fbl ) ]]</para></td> |
2808 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 30, my_fbl ) ]]</para></td> |
2809 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 31, my_fbl ) ]]</para></td> |
2810 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 32, my_fbl ) ]]</para></td> |
2811 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 33, my_fbl ) ]]</para></td> |
2812 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 34, my_fbl ) ]]</para></td> |
2813 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 35, my_fbl ) ]]</para></td> |
2814 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 36, my_fbl ) ]]</para></td> |
2815 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 37, my_fbl ) ]]</para></td> |
2816 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 38, my_fbl ) ]]</para></td> |
2817 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 39, my_fbl ) ]]</para></td> |
2818 | - <td><para style="CONTENIDO_GEN">[[ get_col_value( 40, my_fbl ) ]]</para></td> |
2819 | - </tr> |
2820 | - </blockTable> |
2821 | - </section> |
2822 | - |
2823 | - <!-- TOTALS PURCHASE PARCIALES --> |
2824 | - <section> |
2825 | - <blockTable> [[ setTag('blockTable', 'blockTable', {'colWidths' : get_attr_col_widths(), 'style' : "CONTENIDOTABLE_LINES" } ) ]] |
2826 | - <tr> |
2827 | - [[ setLang(my_fbl.ai_id.company_id.partner_id.lang) ]] |
2828 | - <td></td> |
2829 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 1, my_fb ) ]]</para></td> |
2830 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 2, my_fb ) ]]</para></td> |
2831 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 3, my_fb ) ]]</para></td> |
2832 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 4, my_fb ) ]]</para></td> |
2833 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 5, my_fb ) ]]</para></td> |
2834 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 6, my_fb ) ]]</para></td> |
2835 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 7, my_fb ) ]]</para></td> |
2836 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 8, my_fb ) ]]</para></td> |
2837 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 9, my_fb ) ]]</para></td> |
2838 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 10, my_fb ) ]]</para></td> |
2839 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 11, my_fb ) ]]</para></td> |
2840 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 12, my_fb ) ]]</para></td> |
2841 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 13, my_fb ) ]]</para></td> |
2842 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 14, my_fb ) ]]</para></td> |
2843 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 15, my_fb ) ]]</para></td> |
2844 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 16, my_fb ) ]]</para></td> |
2845 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 17, my_fb ) ]]</para></td> |
2846 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 18, my_fb ) ]]</para></td> |
2847 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 19, my_fb ) ]]</para></td> |
2848 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 20, my_fb ) ]]</para></td> |
2849 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 21, my_fb ) ]]</para></td> |
2850 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 22, my_fb ) ]]</para></td> |
2851 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 23, my_fb ) ]]</para></td> |
2852 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 24, my_fb ) ]]</para></td> |
2853 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 25, my_fb ) ]]</para></td> |
2854 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 26, my_fb ) ]]</para></td> |
2855 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 27, my_fb ) ]]</para></td> |
2856 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 28, my_fb ) ]]</para></td> |
2857 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 29, my_fb ) ]]</para></td> |
2858 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 30, my_fb ) ]]</para></td> |
2859 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 31, my_fb ) ]]</para></td> |
2860 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 32, my_fb ) ]]</para></td> |
2861 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 33, my_fb ) ]]</para></td> |
2862 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 34, my_fb ) ]]</para></td> |
2863 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 35, my_fb ) ]]</para></td> |
2864 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 36, my_fb ) ]]</para></td> |
2865 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 37, my_fb ) ]]</para></td> |
2866 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 38, my_fb ) ]]</para></td> |
2867 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 39, my_fb ) ]]</para></td> |
2868 | - <td><para style="CONTENIDO_GEN">[[ get_col_total( 40, my_fb ) ]]</para></td> |
2869 | - </tr> |
2870 | - </blockTable> |
2871 | - </section> |
2872 | - |
2873 | - </section> |
2874 | - |
2875 | - <spacer length='5mm'/> |
2876 | - |
2877 | - <!-- Static Version --> |
2878 | - <section> |
2879 | - <para> Static Version </para> |
2880 | - |
2881 | - <!-- PURCHASE BOOK HEADERS --> |
2882 | - <section> |
2883 | - <blockTable colWidths="517.0, 350.0, 350.0" style="ENCANBEZADO_SINCOLUM_2" blockAlignment="LEFT"> |
2884 | - <tr> |
2885 | - <td></td> |
2886 | - <td vAlign="MIDDLE"><para style="HEADER">IMPORTACIONES</para></td> |
2887 | - <td vAlign="MIDDLE"><para style="HEADER">COMPRAS INTERNAS</para></td> |
2888 | - </tr> |
2889 | - </blockTable> |
2890 | - </section> |
2891 | - <section> |
2892 | - <blockTable colWidths="1.0,15.0,23.0,23.0,15.0,25.0,160.0,40.0,30.0,36.0,36.0,36.0,18.0,33.0,33.0,33.0,37.0,29.0,29.0,255.0,37.0,29.0,29.0,255.0,40.0" style="ENCANBEZADO_SINCOLUM" repeatRows="1"> |
2893 | - <tr> |
2894 | - <td><para style="HEADER"></para></td> |
2895 | - <td><para style="HEADER">Linea</para></td> |
2896 | - <td><para style="HEADER">Fecha Doc.</para></td> |
2897 | - <td><para style="HEADER">Fecha Importada</para></td> |
2898 | - <td><para style="HEADER">T. Doc.</para></td> |
2899 | - <td><para style="HEADER">RIF</para></td> |
2900 | - <td><para style="HEADER">Razon Social</para></td> |
2901 | - <td><para style="HEADER">Comprobante</para></td> |
2902 | - <td><para style="HEADER">Planilla Importacion</para></td> |
2903 | - <td><para style="HEADER">Expediente Importacion</para></td> |
2904 | - <td><para style="HEADER">Numero de Factura</para></td> |
2905 | - <td><para style="HEADER">Numero Control</para></td> |
2906 | - <td><para style="HEADER">T. Trans.</para></td> |
2907 | - <td><para style="HEADER">Nota de Debito Afectada</para></td> |
2908 | - <td><para style="HEADER">Nota de Credito Afectada</para></td> |
2909 | - <td><para style="HEADER">Documento Afectado</para></td> |
2910 | - <td><para style="HEADER">Total con IVA</para></td> |
2911 | - <td><para style="HEADER">SDCF</para></td> |
2912 | - <td><para style="HEADER">Exento</para></td> |
2913 | - <td> <!-- Impuestos Importaciones --> |
2914 | - <section><blockTable colWidths="85.0, 85.0, 85.0"><tr> |
2915 | - <td><blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
2916 | - <td><para style="HEADER">Base Imponible</para></td> |
2917 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
2918 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
2919 | - </tr></blockTable></td> |
2920 | - <td><blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
2921 | - <td><para style="HEADER">Base Imponible</para></td> |
2922 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
2923 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
2924 | - </tr></blockTable></td> |
2925 | - <td><blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
2926 | - <td><para style="HEADER">Base Imponible</para></td> |
2927 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
2928 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
2929 | - </tr></blockTable></td> |
2930 | - </tr></blockTable></section> |
2931 | - </td> |
2932 | - <td><para style="HEADER">Total con IVA</para></td> |
2933 | - <td><para style="HEADER">SDCF</para></td> |
2934 | - <td><para style="HEADER">Exento</para></td> |
2935 | - <td> <!-- Impuestos Compras Internas --> |
2936 | - <section><blockTable colWidths="85.0, 85.0, 85.0"><tr> |
2937 | - <td><blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
2938 | - <td><para style="HEADER">Base Imponible</para></td> |
2939 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
2940 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
2941 | - </tr></blockTable></td> |
2942 | - <td><blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
2943 | - <td><para style="HEADER">Base Imponible</para></td> |
2944 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
2945 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
2946 | - </tr></blockTable></td> |
2947 | - <td><blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
2948 | - <td><para style="HEADER">Base Imponible</para></td> |
2949 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
2950 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
2951 | - </tr></blockTable></td> |
2952 | - </tr></blockTable></section> |
2953 | - </td> |
2954 | - <td><para style="HEADER">Retencion Iva</para></td> |
2955 | - </tr> |
2956 | - </blockTable> |
2957 | - </section> |
2958 | - |
2959 | - <!-- PURCHASE BOOK LINES --> |
2960 | - <section> |
2961 | - <para>[[repeatIn( my_fb.fbl_ids,'my_fbl')]]</para> |
2962 | - <blockTable rowHeights="8.0" colWidths="1.0,15.0,23.0,23.0,15.0,25.0,160.0,40.0,30.0,36.0,36.0,36.0,18.0,33.0,33.0,33.0,37.0,29.0,29.0,255.0,37.0,29.0,29.0,255.0,40.0" style="CONTENIDOTABLE_LINES" repeatRows="1"> |
2963 | - <tr> |
2964 | - [[ setLang(my_fbl.ai_id.company_id.partner_id.lang) ]] |
2965 | - <td vAlign="MIDDLE"></td> |
2966 | - |
2967 | - <!-- Linea --> |
2968 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.rank ]]</para></td> |
2969 | - <!-- Fecha Doc --> |
2970 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_accounting_date ]]</para></td> |
2971 | - <!-- Fecha Importada --> |
2972 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_imex_date ]]</para></td> |
2973 | - <!-- T. Doc. --> |
2974 | - <td><para style="CONTENIDO">[[ my_fbl.get_t_doc ]]</para></td> |
2975 | - <!-- RIF --> |
2976 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_partner_vat ]]</para></td> |
2977 | - <!-- Razon Social --> |
2978 | - <td vAlign="MIDDLE" leftPadding="0"><para style="CONTENIDOLEFT">[[ my_fbl.get_partner_name ]]</para></td> |
2979 | - <!-- Comprobante --> |
2980 | - <td vAlign="MIDDLE"><para style="CONTENIDO"> [[ (my_fbl.invoice_id and my_fbl.iwdl_id) and my_fbl.iwdl_id.retention_id.number or "NONE" ]]</para></td> |
2981 | - <!-- Planilla Importacion --> |
2982 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_import_form ]]</para></td> |
2983 | - <!-- Expediente Importacion --> |
2984 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.invoice_id.import_spreadsheet_name ]]</para></td> |
2985 | - <!-- Numero de Factura --> |
2986 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_reference]]</para></td> |
2987 | - <!-- Numero Control --> |
2988 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_number]]</para></td> |
2989 | - <!-- T. Trans. --> |
2990 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_papel_anulado ]]</para></td> |
2991 | - <!-- Nota de Debito Afectada --> |
2992 | - <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.get_debit_affected ]]</para></td> |
2993 | - <!-- Nota de Crétido Afectada --> |
2994 | - <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.get_credit_affected ]]</para></td> |
2995 | - <!-- Documento Afectado --> |
2996 | - <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.get_parent ]]</para></td> |
2997 | - |
2998 | - <!-- Imex > Total con IVA --> |
2999 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang( my_fbl.get_is_imported and my_fbl.get_total_with_iva or 0.0) ]]</para></td> |
3000 | - <!-- Imex > sdcf --> |
3001 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang( my_fbl.get_is_imported and my_fbl.get_vat_sdcf or 0.0) ]]</para></td> |
3002 | - <!-- Imex > Exento --> |
3003 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(my_fbl.get_is_imported and my_fbl.get_vat_exempt or 0.0) ]]</para> |
3004 | - </td> |
3005 | - <td> <!-- Withholding Taxes --> |
3006 | - <section><blockTable colWidths="85.0, 85.0, 85.0"><tr> |
3007 | - <td> <!-- Reduced Tax --> |
3008 | - <blockTable colWidths="35.0, 15.0, 35.0" style="TAXESTABLE"><tr> |
3009 | - <!-- Imex > 8% > Base Imponible --> |
3010 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(my_fbl.get_is_imported and my_fbl.get_vat_reduced_base or 0.0) ]]</para></td> |
3011 | - <!-- Imex > 8% > % Iva --> |
3012 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(8) ]]</para></td> |
3013 | - <!-- Imex > 8% > Monto Imponible --> |
3014 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(my_fbl.get_is_imported and my_fbl.get_vat_reduced_tax or 0.0) ]]</para></td> |
3015 | - </tr></blockTable> |
3016 | - </td> |
3017 | - <td> <!-- General Tax --> |
3018 | - <blockTable colWidths="35.0, 15.0, 35.0" style="TAXESTABLE"><tr> |
3019 | - <!-- Imex > 8% > Base Imponible --> |
3020 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(my_fbl.get_is_imported and my_fbl.get_vat_general_base or 0.0) ]]</para></td> |
3021 | - <!-- Imex > 8% > % Iva --> |
3022 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(12) ]]</para></td> |
3023 | - <!-- Imex > 8% > Monto Imponible --> |
3024 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(my_fbl.get_is_imported and my_fbl.get_vat_general_tax or 0.0) ]]</para></td> |
3025 | - </tr></blockTable> |
3026 | - </td> |
3027 | - <td> <!-- Additional Tax --> |
3028 | - <blockTable colWidths="35.0, 15.0, 35.0" style="TAXESTABLE"><tr> |
3029 | - <!-- Imex > 22% > Base Imponible --> |
3030 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(my_fbl.get_is_imported and my_fbl.get_vat_additional_base or 0.0) ]]</para></td> |
3031 | - <!-- Imex > 22% > % Iva --> |
3032 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(22) ]]</para></td> |
3033 | - <!-- Imex > 22% > Monto Imponible --> |
3034 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(my_fbl.get_is_imported and my_fbl.get_vat_additional_tax or 0.0) ]]</para></td> |
3035 | - </tr></blockTable> |
3036 | - </td> |
3037 | - </tr></blockTable></section> |
3038 | - </td> |
3039 | - |
3040 | - <!-- Domestic > Total con IVA --> |
3041 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not my_fbl.get_is_imported) and my_fbl.get_total_with_iva or 0.0) ]]</para></td> |
3042 | - <!-- Domestic > SDCF --> |
3043 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not my_fbl.get_is_imported) and my_fbl.get_vat_sdcf or 0.0) ]]</para></td> |
3044 | - <!-- Domestic > Exento --> |
3045 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang((not my_fbl.get_is_imported) and my_fbl.get_vat_exempt or 0.0) ]]</para></td> |
3046 | - <td> <!-- Withholding Taxes --> |
3047 | - <section><blockTable colWidths="85.0, 85.0, 85.0"><tr> |
3048 | - <td> <!-- Reduced Tax --> |
3049 | - <blockTable colWidths="35.0, 15.0, 35.0" style="TAXESTABLE"><tr> |
3050 | - <!-- Domestic > 8% > Base Imponible --> |
3051 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang((not my_fbl.get_is_imported) and my_fbl.get_vat_reduced_base or 0.0) ]]</para></td> |
3052 | - <!-- Domestic > 8% > % Iva --> |
3053 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(8) ]]</para></td> |
3054 | - <!-- Domestic > 8% > Monto Imponible --> |
3055 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang((not my_fbl.get_is_imported) and my_fbl.get_vat_reduced_tax or 0.0) ]]</para></td> |
3056 | - </tr></blockTable> |
3057 | - </td> |
3058 | - <td> <!-- General Tax --> |
3059 | - <blockTable colWidths="35.0, 15.0, 35.0" style="TAXESTABLE"><tr> |
3060 | - <!-- Domestic > 8% > Base Imponible --> |
3061 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang((not my_fbl.get_is_imported) and my_fbl.get_vat_general_base or 0.0) ]]</para></td> |
3062 | - <!-- Domestic > 8% > % Iva --> |
3063 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(12) ]]</para></td> |
3064 | - <!-- Domestic > 8% > Monto Imponible --> |
3065 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang((not my_fbl.get_is_imported) and my_fbl.get_vat_general_tax or 0.0) ]]</para></td> |
3066 | - </tr></blockTable> |
3067 | - </td> |
3068 | - <td> <!-- Additional Tax --> |
3069 | - <blockTable colWidths="35.0, 15.0, 35.0" style="TAXESTABLE"><tr> |
3070 | - <!-- Domestic > 8% > Base Imponible --> |
3071 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang((not my_fbl.get_is_imported) and my_fbl.get_vat_additional_base or 0.0) ]]</para></td> |
3072 | - <!-- Domestic > 8% > % Iva --> |
3073 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(22) ]]</para></td> |
3074 | - <!-- Domestic > 8% > Monto Imponible --> |
3075 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang((not my_fbl.get_is_imported) and my_fbl.get_vat_additional_tax or 0.0) ]]</para></td> |
3076 | - </tr></blockTable> |
3077 | - </td> |
3078 | - </tr></blockTable></section> |
3079 | - </td> |
3080 | - |
3081 | - <!-- Retencion Iva --> |
3082 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(my_fbl.get_withheld) ]]</para></td> |
3083 | - </tr> |
3084 | - </blockTable> |
3085 | - </section> |
3086 | - |
3087 | - <!-- TOTALS PURCHASE PARCIALES --> |
3088 | - <section> |
3089 | - <blockTable rowHeights="16.0" colWidths="1.0,15.0,23.0,23.0,15.0,25.0,160.0,40.0,30.0,36.0,36.0,36.0,18.0,33.0,33.0,33.0,37.0,29.0,29.0,255.0,37.0,29.0,29.0,255.0,40.0" style="CONTENIDOTABLE_LINES" repeatRows="2"> |
3090 | - <tr> |
3091 | - [[ setLang(l.ai_id.company_id.partner_id.lang) ]] |
3092 | - <td></td> |
3093 | - <!-- Linea --> |
3094 | - <td></td> |
3095 | - <!-- Fecha Doc --> |
3096 | - <td></td> |
3097 | - <!-- Fecha Importada --> |
3098 | - <td></td> |
3099 | - <!-- T. Doc. --> |
3100 | - <td></td> |
3101 | - <!-- RIF --> |
3102 | - <td></td> |
3103 | - <!-- Razon Social --> |
3104 | - <td><para style="HEADER">TOTALES</para></td> |
3105 | - <!-- Comprobante --> |
3106 | - <td></td> |
3107 | - <!-- Planilla Importacion --> |
3108 | - <td></td> |
3109 | - <!-- Expediente Importacion --> |
3110 | - <td></td> |
3111 | - <!-- Numero de Factura --> |
3112 | - <td></td> |
3113 | - <!-- Numero Control --> |
3114 | - <td></td> |
3115 | - <!-- T. Trans. --> |
3116 | - <td></td> |
3117 | - <!-- Nota de Debito Afectada --> |
3118 | - <td></td> |
3119 | - <!-- Nota de Crétido Afectada --> |
3120 | - <td></td> |
3121 | - <!-- Documento Afectado --> |
3122 | - <td></td> |
3123 | - |
3124 | - <!-- Imex > Total con IVA --> |
3125 | - <td><para style="HEADER">[[ formatLang(my_fb.get_total_with_iva_i_sum or 0.0) ]]</para></td> |
3126 | - <!-- Imex > sdcf --> |
3127 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_sdcf_i_sum or 0.0) ]]</para></td> |
3128 | - <!-- Imex > Exento --> |
3129 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_exempt_i_sum or 0.0) ]]</para></td> |
3130 | - <td> <!-- Imex Taxes --> |
3131 | - <section><blockTable colWidths="85.0, 85.0, 85.0" style="INTERNALTABLE"><tr> |
3132 | - <td> <!-- Reduced Tax --> |
3133 | - <blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
3134 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_reduced_i_base_sum or 0.0) ]]</para></td> |
3135 | - <td></td> |
3136 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_reduced_i_tax_sum or 0.0) ]]</para></td> |
3137 | - </tr></blockTable> |
3138 | - </td> |
3139 | - <td> <!-- General Tax --> |
3140 | - <blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
3141 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_general_i_base_sum or 0.0) ]]</para></td> |
3142 | - <td></td> |
3143 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_general_i_tax_sum or 0.0) ]]</para></td> |
3144 | - </tr></blockTable> |
3145 | - </td> |
3146 | - <td> <!-- Additional Tax --> |
3147 | - <blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
3148 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_additional_i_base_sum or 0.0) ]]</para></td> |
3149 | - <td></td> |
3150 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_additional_i_tax_sum or 0.0) ]]</para></td> |
3151 | - </tr></blockTable> |
3152 | - </td> |
3153 | - </tr></blockTable></section> |
3154 | - </td> |
3155 | - |
3156 | - <!-- Domestic > Total con IVA --> |
3157 | - <td><para style="HEADER">[[ formatLang(my_fb.get_total_with_iva_n_sum or 0.0) ]]</para></td> |
3158 | - <!-- Domestic > SDCF -->s |
3159 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_sdcf_n_sum or 0.0) ]]</para></td> |
3160 | - <!-- Domestic > Exento --> |
3161 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_exempt_n_sum or 0.0) ]]</para></td> |
3162 | - <td> <!-- Domestic Taxes --> |
3163 | - <section><blockTable colWidths="85.0, 85.0, 85.0" style="INTERNALTABLE"><tr> |
3164 | - <td> <!-- Reduced Tax --> |
3165 | - <blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
3166 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_reduced_n_base_sum or 0.0) ]]</para></td> |
3167 | - <td></td> |
3168 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_reduced_n_tax_sum or 0.0) ]]</para></td> |
3169 | - </tr></blockTable> |
3170 | - </td> |
3171 | - <td> <!-- General Tax --> |
3172 | - <blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
3173 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_general_n_base_sum or 0.0) ]]</para></td> |
3174 | - <td></td> |
3175 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_general_n_tax_sum or 0.0) ]]</para></td> |
3176 | - </tr></blockTable> |
3177 | - </td> |
3178 | - <td> <!-- Additional Tax --> |
3179 | - <blockTable colWidths="35.0, 15.0, 35.0" style="INTERNALTABLE"><tr> |
3180 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_additional_n_base_sum or 0.0) ]]</para></td> |
3181 | - <td></td> |
3182 | - <td><para style="HEADER">[[ formatLang(my_fb.get_vat_additional_n_tax_sum or 0.0) ]]</para></td> |
3183 | - </tr></blockTable> |
3184 | - </td> |
3185 | - </tr></blockTable></section> |
3186 | - </td> |
3187 | - |
3188 | - <!-- Retencion Iva --> |
3189 | - <td><para style="HEADER">[[ 'TODO' ]]</para></td> |
3190 | - </tr> |
3191 | - </blockTable> |
3192 | - </section> |
3193 | - |
3194 | - </section> |
3195 | + <!-- PURCHASE BOOK HEADERS --> |
3196 | + <section> |
3197 | + <blockTable colWidths="421.0, 37.0, 310.0, 485.0" style="NEW-HEADER" blockAlignment="LEFT"> |
3198 | + <tr> |
3199 | + <td> |
3200 | + <blockTable colWidths="421.0" style="NEW-HEADER"> |
3201 | + <tr> |
3202 | + <td vAlign="MIDDLE"><para style="HEADER">DATOS DE LA FACTURA O/Y DOCUMENTO</para></td> |
3203 | + </tr> |
3204 | + <tr> |
3205 | + <td> |
3206 | + <blockTable colWidths="15.0, 15.0, 23.0, 36.0, 36.0, 36.0, 160.0, 25.0, 75.0" style="NEW-HEADER"> |
3207 | + <tr> |
3208 | + <td vAlign="MIDDLE"><para style="HEADER">Linea</para></td> |
3209 | + <td vAlign="MIDDLE"><para style="HEADER">T. Doc.</para></td> |
3210 | + <td vAlign="MIDDLE"><para style="HEADER">Fecha Doc.</para></td> |
3211 | + <td vAlign="MIDDLE"><para style="HEADER">Numero Control</para></td> |
3212 | + <td vAlign="MIDDLE"><para style="HEADER">Numero de Documento</para></td> |
3213 | + <td vAlign="MIDDLE"><para style="HEADER">Factura Afectada</para></td> |
3214 | + <td vAlign="MIDDLE"><para style="HEADER">Razon Social</para></td> |
3215 | + <td vAlign="MIDDLE"><para style="HEADER">RIF</para></td> |
3216 | + <td vAlign="MIDDLE"><para style="HEADER">Liquidación de Aduana</para> |
3217 | + <section> |
3218 | + <blockTable colWidths="35.0, 40.0" style="NEW-HEADER"> |
3219 | + <tr> |
3220 | + <td><para style="HEADER">Fecha de Nac.</para></td> |
3221 | + <td><para style="HEADER">Declaracion</para></td> |
3222 | + </tr> |
3223 | + </blockTable> |
3224 | + </section> |
3225 | + </td> |
3226 | + </tr> |
3227 | + </blockTable> |
3228 | + </td> |
3229 | + </tr> |
3230 | + </blockTable> |
3231 | + </td> |
3232 | + <td> |
3233 | + <blockTable colWidths="37.0" style="NEW-HEADER"> |
3234 | + <tr> |
3235 | + <td vAlign="MIDDLE"><para style="HEADER">TOTALES</para></td> |
3236 | + </tr> |
3237 | + <tr> |
3238 | + <td> |
3239 | + <blockTable colWidths="37.0" style="NEW-HEADER"> |
3240 | + <tr> |
3241 | + <td vAlign="MIDDLE"><para style="HEADER">Total con IVA</para></td> |
3242 | + </tr> |
3243 | + </blockTable> |
3244 | + </td> |
3245 | + </tr> |
3246 | + </blockTable> |
3247 | + </td> |
3248 | + <td> |
3249 | + <blockTable colWidths="310.0" style="NEW-HEADER"> |
3250 | + <tr> |
3251 | + <td vAlign="MIDDLE"><para style="HEADER">OPERACIONES DE IMPORTACIONES</para></td> |
3252 | + </tr> |
3253 | + <tr> |
3254 | + <td> |
3255 | + <blockTable colWidths="40.0, 90.0, 90.0, 90.0" style="NEW-HEADER"> |
3256 | + <tr> |
3257 | + <td> |
3258 | + <blockTable colWidths="40.0" style="NEW-HEADER"> |
3259 | + <tr> |
3260 | + <td><para style="HEADER">No Gravado</para></td> |
3261 | + </tr> |
3262 | + <tr> |
3263 | + <td> |
3264 | + <blockTable colWidths="20.0, 20.0" style="NEW-HEADER"> |
3265 | + <tr> |
3266 | + <td><para style="HEADER">SDCF</para></td> |
3267 | + <td><para style="HEADER">Exento</para></td> |
3268 | + </tr> |
3269 | + </blockTable> |
3270 | + </td> |
3271 | + </tr> |
3272 | + </blockTable> |
3273 | + </td> |
3274 | + <td> |
3275 | + <blockTable colWidths="90.0" style="NEW-HEADER"> |
3276 | + <tr> |
3277 | + <td><para style="HEADER">Compras o Servicios Gravados Alicuota General</para></td> |
3278 | + </tr> |
3279 | + <tr> |
3280 | + <td> |
3281 | + <blockTable colWidths="35.0, 20.0, 35.0" style="NEW-HEADER"> |
3282 | + <tr> |
3283 | + <td><para style="HEADER">Base Imponible</para></td> |
3284 | + <td><para style="HEADER">Alicuota</para></td> |
3285 | + <td><para style="HEADER">Débito Fiscal</para></td> |
3286 | + </tr> |
3287 | + </blockTable> |
3288 | + </td> |
3289 | + </tr> |
3290 | + </blockTable> |
3291 | + </td> |
3292 | + <td> |
3293 | + <blockTable colWidths="90.0" style="NEW-HEADER"> |
3294 | + <tr> |
3295 | + <td><para style="HEADER">Compras o Servicios Gravados Alicuota Reducida</para></td> |
3296 | + </tr> |
3297 | + <tr> |
3298 | + <td> |
3299 | + <blockTable colWidths="35.0, 20.0, 35.0" style="NEW-HEADER"> |
3300 | + <tr> |
3301 | + <td><para style="HEADER">Base Imponible</para></td> |
3302 | + <td><para style="HEADER">Alicuota</para></td> |
3303 | + <td><para style="HEADER">Débito Fiscal</para></td> |
3304 | + </tr> |
3305 | + </blockTable> |
3306 | + </td> |
3307 | + </tr> |
3308 | + </blockTable> |
3309 | + </td> |
3310 | + <td> |
3311 | + <blockTable colWidths="90.0" style="NEW-HEADER"> |
3312 | + <tr> |
3313 | + <td><para style="HEADER">Compras o Servicios Gravados Alicuota Adicional</para></td> |
3314 | + </tr> |
3315 | + <tr> |
3316 | + <td> |
3317 | + <blockTable colWidths="35.0, 20.0, 35.0" style="NEW-HEADER"> |
3318 | + <tr> |
3319 | + <td><para style="HEADER">Base Imponible</para></td> |
3320 | + <td><para style="HEADER">Alicuota</para></td> |
3321 | + <td><para style="HEADER">Débito Fiscal</para></td> |
3322 | + </tr> |
3323 | + </blockTable> |
3324 | + </td> |
3325 | + </tr> |
3326 | + </blockTable> |
3327 | + </td> |
3328 | + </tr> |
3329 | + </blockTable> |
3330 | + </td> |
3331 | + </tr> |
3332 | + </blockTable> |
3333 | + </td> |
3334 | + <td> |
3335 | + <blockTable colWidths="485.0" style="NEW-HEADER"> |
3336 | + <tr> |
3337 | + <td vAlign="MIDDLE"><para style="HEADER">OPERACIONES EN EL MERCADO INTERNO</para></td> |
3338 | + </tr> |
3339 | + <tr> |
3340 | + <td> |
3341 | + <blockTable colWidths="40.0, 90.0, 90.0, 90.0, 175.0" style="NEW-HEADER"> |
3342 | + <tr> |
3343 | + <td> |
3344 | + <blockTable colWidths="40.0" style="NEW-HEADER"> |
3345 | + <tr> |
3346 | + <td><para style="HEADER">No Gravado</para></td> |
3347 | + </tr> |
3348 | + <tr> |
3349 | + <td> |
3350 | + <blockTable colWidths="20.0, 20.0" style="NEW-HEADER"> |
3351 | + <tr> |
3352 | + <td><para style="HEADER">SDCF</para></td> |
3353 | + <td><para style="HEADER">Exento</para></td> |
3354 | + </tr> |
3355 | + </blockTable> |
3356 | + </td> |
3357 | + </tr> |
3358 | + </blockTable> |
3359 | + </td> |
3360 | + <td> |
3361 | + <blockTable colWidths="90.0" style="NEW-HEADER"> |
3362 | + <tr> |
3363 | + <td><para style="HEADER">Compras o Servicios Gravados Alicuota General</para></td> |
3364 | + </tr> |
3365 | + <tr> |
3366 | + <td> |
3367 | + <blockTable colWidths="35.0, 20.0, 35.0" style="NEW-HEADER"> |
3368 | + <tr> |
3369 | + <td><para style="HEADER">Base Imponible</para></td> |
3370 | + <td><para style="HEADER">Alicuota</para></td> |
3371 | + <td><para style="HEADER">Débito Fiscal</para></td> |
3372 | + </tr> |
3373 | + </blockTable> |
3374 | + </td> |
3375 | + </tr> |
3376 | + </blockTable> |
3377 | + </td> |
3378 | + <td> |
3379 | + <blockTable colWidths="90.0" style="NEW-HEADER"> |
3380 | + <tr> |
3381 | + <td><para style="HEADER">Compras o Servicios Gravados Alicuota Reducida</para></td> |
3382 | + </tr> |
3383 | + <tr> |
3384 | + <td> |
3385 | + <blockTable colWidths="35.0, 20.0, 35.0" style="NEW-HEADER"> |
3386 | + <tr> |
3387 | + <td><para style="HEADER">Base Imponible</para></td> |
3388 | + <td><para style="HEADER">Alicuota</para></td> |
3389 | + <td><para style="HEADER">Débito Fiscal</para></td> |
3390 | + </tr> |
3391 | + </blockTable> |
3392 | + </td> |
3393 | + </tr> |
3394 | + </blockTable> |
3395 | + </td> |
3396 | + <td> |
3397 | + <blockTable colWidths="90.0" style="NEW-HEADER"> |
3398 | + <tr> |
3399 | + <td><para style="HEADER">Compras o Servicios Gravados Alicuota Adicional</para></td> |
3400 | + </tr> |
3401 | + <tr> |
3402 | + <td> |
3403 | + <blockTable colWidths="35.0, 20.0, 35.0" style="NEW-HEADER"> |
3404 | + <tr> |
3405 | + <td><para style="HEADER">Base Imponible</para></td> |
3406 | + <td><para style="HEADER">Alicuota</para></td> |
3407 | + <td><para style="HEADER">Débito Fiscal</para></td> |
3408 | + </tr> |
3409 | + </blockTable> |
3410 | + </td> |
3411 | + </tr> |
3412 | + </blockTable> |
3413 | + </td> |
3414 | + <td> |
3415 | + <blockTable colWidths="175.0" style="NEW-HEADER"> |
3416 | + <tr> |
3417 | + <td><para style="HEADER">Retenciones</para></td> |
3418 | + </tr> |
3419 | + <tr> |
3420 | + <td> |
3421 | + <blockTable colWidths="35.0, 35.0, 35.0, 35.0, 35.0" style="NEW-HEADER"> |
3422 | + <tr> |
3423 | + <td><para style="HEADER">Fecha Factura Afect.</para></td> |
3424 | + <td><para style="HEADER">Nro Retención</para></td> |
3425 | + <td><para style="HEADER">Débito Fiscal Base</para></td> |
3426 | + <td><para style="HEADER">Retención %</para></td> |
3427 | + <td><para style="HEADER">Monto Retenido</para></td> |
3428 | + </tr> |
3429 | + </blockTable> |
3430 | + </td> |
3431 | + </tr> |
3432 | + </blockTable> |
3433 | + </td> |
3434 | + </tr> |
3435 | + </blockTable> |
3436 | + </td> |
3437 | + </tr> |
3438 | + </blockTable> |
3439 | + </td> |
3440 | + </tr> |
3441 | + </blockTable> |
3442 | + </section> |
3443 | + |
3444 | + <!-- PURCHASE BOOK LINES --> |
3445 | + <section> |
3446 | + <para>[[repeatIn( my_fb.fbl_ids,'my_fbl')]]</para> |
3447 | + <blockTable style="NEW-CONTENIDOTABLE-LINES" blockAlignment="LEFT" |
3448 | + colWidths="15.0, 15.0, 23.0, 36.0, 36.0, 36.0, 160.0, 25.0, 35.0, 40.0, |
3449 | + 37.0, |
3450 | + 20.0, 20.0, 35.0, 20.0, 35.0, 35.0, 20.0, 35.0, 35.0, 20.0, 35.0, |
3451 | + 20.0, 20.0, 35.0, 20.0, 35.0, 35.0, 20.0, 35.0, 35.0, 20.0, 35.0, |
3452 | + 35.0, 35.0, 35.0, 35.0, 35.0"> |
3453 | + <tr> |
3454 | + <!-- Datos de la factura y/o documento --> |
3455 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.rank # Linea ]]</para></td> |
3456 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.doc_type # T. Doc. ]]</para></td> |
3457 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.emission_date # Fecha Doc.]]</para></td> |
3458 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.ctrl_number # Numero Control ]]</para></td> |
3459 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.invoice_number # Numero de Doc ]]</para></td> |
3460 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.invoice_parent # Factura Afectada ]]</para></td> |
3461 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.partner_name # Razon Social ]]</para></td> |
3462 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.partner_vat # RIF ]]</para></td> |
3463 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.invoice_is_imported and my_fbl.imex_date # Fecha de Nac. ]]</para></td> |
3464 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.invoice_is_imported and my_fbl.custom_statement # Declaracion ]]</para></td> |
3465 | + <!-- Totales --> |
3466 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fbl.total_with_iva # Total con IVA ]]</para></td> |
3467 | + <!-- Importaciones --> |
3468 | + <td><para style="HEADER">[[ my_fbl.invoice_is_imported and my_fbl.vat_sdcf # SDCF ]]</para></td> |
3469 | + <td><para style="HEADER">[[ my_fbl.invoice_is_imported and my_fbl.vat_exempt # Exento ]]</para></td> |
3470 | + <td><para style="HEADER">[[ my_fbl.invoice_is_imported and my_fbl.vat_general_base # General | Base Imponible ]]</para></td> |
3471 | + <td><para style="HEADER">[[ my_fbl.invoice_is_imported and '12%' # General | Alicuota ]]</para></td> |
3472 | + <td><para style="HEADER">[[ my_fbl.invoice_is_imported and my_fbl.vat_general_tax # General | Débito Fiscal ]]</para></td> |
3473 | + <td><para style="HEADER">[[ my_fbl.invoice_is_imported and my_fbl.vat_reduced_base # Reducido | Base Imponible ]]</para></td> |
3474 | + <td><para style="HEADER">[[ my_fbl.invoice_is_imported and '8%' # Reducido | Alicuota ]]</para></td> |
3475 | + <td><para style="HEADER">[[ my_fbl.invoice_is_imported and my_fbl.vat_reduced_tax # Reducido | Débito Fiscal ]]</para></td> |
3476 | + <td><para style="HEADER">[[ my_fbl.invoice_is_imported and my_fbl.vat_additional_base # Adicional | Base Imponible ]]</para></td> |
3477 | + <td><para style="HEADER">[[ my_fbl.invoice_is_imported and '22%' # Adicional | Alicuota ]]</para></td> |
3478 | + <td><para style="HEADER">[[ my_fbl.invoice_is_imported and my_fbl.vat_additional_tax # Adicional | Débito Fiscal ]]</para></td> |
3479 | + <!-- Compras Internas --> |
3480 | + <td><para style="HEADER">[[ not my_fbl.invoice_is_imported and my_fbl.vat_sdcf # SDCF ]]</para></td> |
3481 | + <td><para style="HEADER">[[ not my_fbl.invoice_is_imported and my_fbl.vat_exempt # Exento ]]</para></td> |
3482 | + <td><para style="HEADER">[[ not my_fbl.invoice_is_imported and my_fbl.vat_general_base # General | Base Imponible ]]</para></td> |
3483 | + <td><para style="HEADER">[[ not my_fbl.invoice_is_imported and '12%' # General | Alicuota ]]</para></td> |
3484 | + <td><para style="HEADER">[[ not my_fbl.invoice_is_imported and my_fbl.vat_general_tax # General | Débito Fiscal ]]</para></td> |
3485 | + <td><para style="HEADER">[[ not my_fbl.invoice_is_imported and my_fbl.vat_reduced_base # Reducido | Base Imponible ]]</para></td> |
3486 | + <td><para style="HEADER">[[ not my_fbl.invoice_is_imported and '8%' # Reducido | Alicuota ]]</para></td> |
3487 | + <td><para style="HEADER">[[ not my_fbl.invoice_is_imported and my_fbl.vat_reduced_tax # Reducido | Débito Fiscal ]]</para></td> |
3488 | + <td><para style="HEADER">[[ not my_fbl.invoice_is_imported and my_fbl.vat_additional_base # Adicional | Base Imponible ]]</para></td> |
3489 | + <td><para style="HEADER">[[ not my_fbl.invoice_is_imported and '22%' # Adicional | Alicuota ]]</para></td> |
3490 | + <td><para style="HEADER">[[ not my_fbl.invoice_is_imported and my_fbl.vat_additional_tax # Adicional | Débito Fiscal ]]</para></td> |
3491 | + <!-- Compras Internas / Retenciones --> |
3492 | + <td><para style="HEADER">[[ my_fbl.iwdl_id and my_fbl.affected_invoice_date # Fecha Factura Afect. ]]</para></td> |
3493 | + <td><para style="HEADER">[[ my_fbl.iwdl_id and my_fbl.wh_number # Nro Retención ]]</para></td> |
3494 | + <td><para style="HEADER">[[ my_fbl.iwdl_id and my_fbl.get_wh_debit_credit # Débito Fiscal Base ]]</para></td> |
3495 | + <td><para style="HEADER">[[ my_fbl.iwdl_id and my_fbl.wh_rate # Retención % ]]</para></td> |
3496 | + <td><para style="HEADER">[[ my_fbl.iwdl_id and my_fbl.get_wh_vat # Monto Retenido ]]</para></td> |
3497 | + </tr> |
3498 | + </blockTable> |
3499 | + </section> |
3500 | + |
3501 | + <!-- TOTALS PURCHASE PARCIALES --> |
3502 | + <section> |
3503 | + <blockTable style="NEW-CONTENIDOTABLE-LINES" blockAlignment="LEFT" |
3504 | + colWidths="15.0, 15.0, 23.0, 36.0, 36.0, 36.0, 160.0, 25.0, 35.0, 40.0, |
3505 | + 37.0, |
3506 | + 20.0, 20.0, 35.0, 20.0, 35.0, 35.0, 20.0, 35.0, 35.0, 20.0, 35.0, |
3507 | + 20.0, 20.0, 35.0, 20.0, 35.0, 35.0, 20.0, 35.0, 35.0, 20.0, 35.0, |
3508 | + 35.0, 35.0, 35.0, 35.0, 35.0"> |
3509 | + <tr> |
3510 | + <!-- Datos de la factura y/o documento --> |
3511 | + <td vAlign="MIDDLE"><para style="HEADER">[[ '' # Linea ]]</para></td> |
3512 | + <td vAlign="MIDDLE"><para style="HEADER">[[ '' # T. Doc. ]]</para></td> |
3513 | + <td vAlign="MIDDLE"><para style="HEADER">[[ '' # Fecha Doc.]]</para></td> |
3514 | + <td vAlign="MIDDLE"><para style="HEADER">[[ '' # Numero Control ]]</para></td> |
3515 | + <td vAlign="MIDDLE"><para style="HEADER">[[ '' # Numero de Doc ]]</para></td> |
3516 | + <td vAlign="MIDDLE"><para style="HEADER">[[ '' # Factura Afectada ]]</para></td> |
3517 | + <td vAlign="MIDDLE"><para style="HEADER">[[ 'TOTALES' # Razon Social ]]</para></td> |
3518 | + <td vAlign="MIDDLE"><para style="HEADER">[[ '' # RIF ]]</para></td> |
3519 | + <td vAlign="MIDDLE"><para style="HEADER">[[ '' # Fecha de Nac. ]]</para></td> |
3520 | + <td vAlign="MIDDLE"><para style="HEADER">[[ '' # Declaracion ]]</para></td> |
3521 | + <!-- Totales --> |
3522 | + <td vAlign="MIDDLE"><para style="HEADER">[[ my_fb.get_total_with_iva_sum # Total con IVA ]]</para></td> |
3523 | + <!-- Importaciones --> |
3524 | + <td><para style="HEADER">[[ my_fb.get_vat_sdcf_i_sum # SDCF ]]</para></td> |
3525 | + <td><para style="HEADER">[[ my_fb.get_vat_exempt_i_sum # Exento ]]</para></td> |
3526 | + <td><para style="HEADER">[[ my_fb.get_vat_general_i_base_sum # General | Base Imponible ]]</para></td> |
3527 | + <td><para style="HEADER">[[ '' # General | Alicuota ]]</para></td> |
3528 | + <td><para style="HEADER">[[ my_fb.get_vat_general_i_tax_sum # General | Débito Fiscal ]]</para></td> |
3529 | + <td><para style="HEADER">[[ my_fb.get_vat_reduced_i_base_sum # Reducido | Base Imponible ]]</para></td> |
3530 | + <td><para style="HEADER">[[ '' # Reducido | Alicuota ]]</para></td> |
3531 | + <td><para style="HEADER">[[ my_fb.get_vat_reduced_i_tax_sum # Reducido | Débito Fiscal ]]</para></td> |
3532 | + <td><para style="HEADER">[[ my_fb.get_vat_additional_i_base_sum # Adicional | Base Imponible ]]</para></td> |
3533 | + <td><para style="HEADER">[[ '' # Adicional | Alicuota ]]</para></td> |
3534 | + <td><para style="HEADER">[[ my_fb.get_vat_additional_i_tax_sum # Adicional | Débito Fiscal ]]</para></td> |
3535 | + <!-- Compras Internas --> |
3536 | + <td><para style="HEADER">[[ my_fb.get_vat_sdcf_n_sum # SDCF ]]</para></td> |
3537 | + <td><para style="HEADER">[[ my_fb.get_vat_exempt_n_sum # Exento ]]</para></td> |
3538 | + <td><para style="HEADER">[[ my_fb.get_vat_general_n_base_sum # General | Base Imponible ]]</para></td> |
3539 | + <td><para style="HEADER">[[ '' # General | Alicuota ]]</para></td> |
3540 | + <td><para style="HEADER">[[ my_fb.get_vat_general_n_tax_sum # General | Débito Fiscal ]]</para></td> |
3541 | + <td><para style="HEADER">[[ my_fb.get_vat_reduced_n_base_sum # Reducido | Base Imponible ]]</para></td> |
3542 | + <td><para style="HEADER">[[ '' # Reducido | Alicuota ]]</para></td> |
3543 | + <td><para style="HEADER">[[ my_fb.get_vat_reduced_n_tax_sum # Reducido | Débito Fiscal ]]</para></td> |
3544 | + <td><para style="HEADER">[[ my_fb.get_vat_additional_n_base_sum # Adicional | Base Imponible ]]</para></td> |
3545 | + <td><para style="HEADER">[[ '' # Adicional | Alicuota ]]</para></td> |
3546 | + <td><para style="HEADER">[[ my_fb.get_vat_additional_n_tax_sum # Adicional | Débito Fiscal ]]</para></td> |
3547 | + <!-- Compras Internas / Retenciones --> |
3548 | + <td><para style="HEADER">[[ '' # Fecha Factura Afect. ]]</para></td> |
3549 | + <td><para style="HEADER">[[ '' # Nro Retención ]]</para></td> |
3550 | + <td><para style="HEADER">[[ my_fb.get_wh_debit_credit_sum # Débito Fiscal Base ]]</para></td> |
3551 | + <td><para style="HEADER">[[ '' # Retención % ]]</para></td> |
3552 | + <td><para style="HEADER">[[ my_fb.get_wh_sum # Monto Retenido ]]</para></td> |
3553 | + </tr> |
3554 | + </blockTable> |
3555 | + </section> |
3556 | |
3557 | <!-- ************ LEYENDA************ --> |
3558 | <section> |
3559 | @@ -668,7 +550,6 @@ |
3560 | <spacer length='5mm'/> |
3561 | |
3562 | <!-- ************ TOTALS WHITHHOLDING***********--> |
3563 | -<!-- |
3564 | <section> |
3565 | [['.']] |
3566 | <blockTable colWidths="70mm,40mm" style="TOTALS_TABLE" repeatRows="2"> |
3567 | @@ -678,20 +559,19 @@ |
3568 | </tr> |
3569 | <tr> |
3570 | <td><para style="CONTENIDOLEFT">[['RETENCIONES PERIODOS ANTERIORES']]</para></td> |
3571 | - <td><para style="CONTENIDO">[[ my_fb.get_total_wh - my_fb.get_wh_actual ]]</para></td> |
3572 | + <td><para style="CONTENIDO">[[ formatLang(my_fb.get_previous_wh_sum) ]]</para></td> |
3573 | </tr> |
3574 | <tr> |
3575 | <td><para style="CONTENIDOLEFT">[['RETENCIONES DEL PERIODO']]</para></td> |
3576 | - <td><para style="CONTENIDO">[[ formatLang(get_wh_actual(data['form'])) ]]</para></td> |
3577 | + <td><para style="CONTENIDO">[[ formatLang(my_fb.get_wh_sum) ]]</para></td> |
3578 | </tr> |
3579 | <tr> |
3580 | <td><para style="CONTENIDOLEFT_BOLD">[['TOTAL RETENCIONES']]</para></td> |
3581 | - <td><para style="CONTENIDO">[[ formatLang(get_total_wh(data['form'])) ]]</para></td> |
3582 | + <td><para style="CONTENIDO">[[ formatLang(my_fb.get_total_wh_sum) ]]</para></td> |
3583 | </tr> |
3584 | </blockTable> |
3585 | </section> |
3586 | <spacer length='5mm'/> |
3587 | ---> |
3588 | |
3589 | <!-- ************ TOTALS PURCHASE BOOK************--> |
3590 | <section> |
3591 | @@ -745,8 +625,8 @@ |
3592 | </tr> |
3593 | <tr> |
3594 | <td><para style="CONTENIDOLEFT_BOLD">TOTAL VENTAS Y DEBITOS FISCAL PARA EFECTOS DE DETERMINACION</para></td> |
3595 | - <td><para style="HEADER">[[ 'TODO' ]]</para></td> |
3596 | - <td><para style="HEADER">[[ 'TODO' ]]</para></td> |
3597 | + <td><para style="HEADER">[[ formatLang(my_fb.get_total_tax_credit_debit_base_sum or 0.0) ]]</para></td> |
3598 | + <td><para style="HEADER">[[ formatLang(my_fb.get_total_tax_credit_debit_tax_sum or 0.0) ]]</para></td> |
3599 | </tr> |
3600 | </blockTable> |
3601 | </section> |
3602 | |
3603 | === modified file 'l10n_ve_fiscal_book/report/fiscal_book_sale_report.rml' |
3604 | --- l10n_ve_fiscal_book/report/fiscal_book_sale_report.rml 2013-03-25 15:58:01 +0000 |
3605 | +++ l10n_ve_fiscal_book/report/fiscal_book_sale_report.rml 2013-04-25 19:45:35 +0000 |
3606 | @@ -217,7 +217,7 @@ |
3607 | <td><para style="CONTENIDO"></para></td> |
3608 | <td><para style="CONTENIDO">[[ get_id(data['form'],wh.id) ]]</para></td> |
3609 | <td><para style="CONTENIDO">[[ time.strftime('%d/%m/%Y', time.strptime(wh.ar_date_ret, '%Y-%m-%d'))]]</para></td> |
3610 | - <td><para style="CONTENIDO">[[ wh.get_t_doc ]]</para></td> |
3611 | + <td><para style="CONTENIDO">[[ wh.doc_type ]]</para></td> |
3612 | <td><para style="CONTENIDO">[[ get_rif(wh.rp_vat) ]]</para></td> |
3613 | <td><para style="CONTENIDOLEFT">[[ wh.rp_id.name ]]</para></td> |
3614 | <td><para style="CONTENIDO"> (- - - - -) </para></td> |
3615 | @@ -265,20 +265,20 @@ |
3616 | <td vAlign="MIDDLE"></td> |
3617 | <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.rank ]]</para></td> |
3618 | <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_date_invoiced and time.strftime('%d/%m/%Y',time.strptime(my_fbl.get_date_invoiced,'%Y-%m-%d')) ]]</para></td> |
3619 | - <td><para style="CONTENIDO">[[ my_fbl.get_t_doc ]]</para></td> |
3620 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_partner_vat ]]</para></td> |
3621 | - <td vAlign="MIDDLE"><para style="CONTENIDOLEFT">[[ my_fbl.get_partner_name ]]</para></td> |
3622 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_reference ]]</para></td> |
3623 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_number ]]</para></td> |
3624 | + <td><para style="CONTENIDO">[[ my_fbl.doc_type ]]</para></td> |
3625 | + <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.partner_vat ]]</para></td> |
3626 | + <td vAlign="MIDDLE"><para style="CONTENIDOLEFT">[[ my_fbl.partner_name ]]</para></td> |
3627 | + <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.invoice_number ]]</para></td> |
3628 | + <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.ctrl_number ]]</para></td> |
3629 | |
3630 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.invoice_id.get_invoice_printer ]]</para></td> |
3631 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.invoice_id.get_fiscal_printer ]]</para></td> |
3632 | + <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.invoice_id.invoice_printer ]]</para></td> |
3633 | + <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.invoice_id.fiscal_printer ]]</para></td> |
3634 | <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.invoice_id.get_nro_inport_form ]]</para></td> |
3635 | <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.invoice_id.get_nro_inport_expe ]]</para></td> |
3636 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.invoice_id.get_papel_anulado ]]</para></td> |
3637 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_debit_affected ]]</para></td> |
3638 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_credit_affected ]]</para></td> |
3639 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.get_parent ]]</para></td> |
3640 | + <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.invoice_id.void_form ]]</para></td> |
3641 | + <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.debit_affected ]]</para></td> |
3642 | + <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.credit_affected ]]</para></td> |
3643 | + <td vAlign="MIDDLE"><para style="CONTENIDO">[[ my_fbl.invoice_parent ]]</para></td> |
3644 | <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(my_fbl.invoice_id.get_total) ]]</para></td> |
3645 | |
3646 | <!-- |
3647 | @@ -319,7 +319,7 @@ |
3648 | </blockTable> |
3649 | </section> |
3650 | </td> |
3651 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(my_fbl.get_withheld) ]]</para></td> |
3652 | + <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang(my_fbl.get_wh_vat) ]]</para></td> |
3653 | <td vAlign="MIDDLE"><para style="CONTENIDO">[[ get_ret(my_fb,my_fbl) ]]</para></td> |
3654 | </tr> |
3655 | </blockTable> |
3656 | |
3657 | === removed file 'l10n_ve_fiscal_book/report/purchases_book.rml' |
3658 | --- l10n_ve_fiscal_book/report/purchases_book.rml 2013-04-16 16:53:35 +0000 |
3659 | +++ l10n_ve_fiscal_book/report/purchases_book.rml 1970-01-01 00:00:00 +0000 |
3660 | @@ -1,723 +0,0 @@ |
3661 | -<?xml version="1.0"?> |
3662 | -<document filename="test.pdf" invariant="1"> |
3663 | - <template pageSize="(35.56cm,21.59cm)" title="Test" author="Martin Simon" allowSplitting="20" showBoundary="0"> |
3664 | - <pageTemplate id="first"> |
3665 | - <pageGraphics> |
3666 | - <setFont name="Times-Roman" size="9"/> |
3667 | - <drawString x="1.3cm" y="0.5cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString> |
3668 | - <drawString x="25cm" y="0.5cm">Pagina <pageNumber/></drawString> |
3669 | - <lineMode width="0.7"/> |
3670 | - <lines>1.3cm 24.9cm 38.3cm 24.9cm</lines> |
3671 | - <setFont name="Times-Roman" size="8"/> |
3672 | - </pageGraphics> |
3673 | - <frame id="first" x1="5.0" y1="15.0" width="1000" height="580"/> |
3674 | - </pageTemplate> |
3675 | - |
3676 | - |
3677 | - </template> |
3678 | - <stylesheet> |
3679 | - <blockTableStyle id="HEADERTABLE"> |
3680 | - <blockAlignment value="LEFT"/> |
3681 | - <blockValign value="TOP"/> |
3682 | - <lineStyle kind="LINEBELOW" colorName="#000000" thickness="1" start="0,0" stop="14,0"/> |
3683 | - </blockTableStyle> |
3684 | - <blockTableStyle id="HEADERTABLE_AD"> |
3685 | - <blockAlignment value="LEFT"/> |
3686 | - <blockValign value="TOP"/> |
3687 | - <lineStyle kind="LINEBELOW" colorName="#000000" thickness="1" start="0,3" stop="14,3"/> |
3688 | - </blockTableStyle> |
3689 | - <blockTableStyle id="INTERNALTABLE"> |
3690 | - <blockAlignment value="LEFT"/> |
3691 | - <blockValign value="MIDDLE"/> |
3692 | - </blockTableStyle> |
3693 | - <blockTableStyle id="CONTENIDOTABLE"> |
3694 | - <blockAlignment value="LEFT"/> |
3695 | - <blockValign value="MIDDLE"/> |
3696 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,1" stop="-1,-1"/> |
3697 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="-5,0" stop="-4,0"/> |
3698 | - </blockTableStyle> |
3699 | - <blockTableStyle id="ENCANBEZADO"> |
3700 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="15,0" stop="17,0"/> |
3701 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="0,1" stop="-1,-1"/> |
3702 | - <blockBackground colorName="#e5e2e5" start="0,1" stop="-1,1"/> |
3703 | - </blockTableStyle> |
3704 | - <blockTableStyle id="ENCANBEZADO_SINCOLUM"> |
3705 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,0" stop="-1,-1"/> |
3706 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,1" stop="-1,-1"/> |
3707 | - <blockBackground colorName="#e5e2e5" start="1,1" stop="-1,1"/> |
3708 | - </blockTableStyle> |
3709 | - |
3710 | - <blockTableStyle id="ENCANBEZADO_SINCOLUM_2"> |
3711 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,0" stop="2,0"/> |
3712 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,1" stop="-1,-1"/> |
3713 | - <blockBackground colorName="#e5e2e5" start="1,1" stop="-1,1"/> |
3714 | - </blockTableStyle> |
3715 | - |
3716 | - <blockTableStyle id="TOTALS_TABLE"> |
3717 | - <blockValign value="MIDDLE"/> |
3718 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="0,0" stop="-1,-1"/> |
3719 | - <blockBackground colorName="#e5e2e5" start="0,0" stop="-1,0"/> |
3720 | - </blockTableStyle> |
3721 | - <blockTableStyle id="CONTENIDOTABLE_PUR"> |
3722 | - <blockValign value="MIDDLE"/> |
3723 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="0,1" stop="-1,-1"/> |
3724 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="-4,0" stop="-3,0"/> |
3725 | - </blockTableStyle> |
3726 | - <blockTableStyle id="CONTENIDOTABLE_TITULOS"> |
3727 | - <blockAlignment value="LEFT"/> |
3728 | - <blockValign value="MIDDLE"/> |
3729 | - <lineStyle kind="GRID" colorName="black" start="1,0" stop="-1,-1" thickness="0.5"/> |
3730 | - <blockBackground colorName="#e5e2e5" start="1,0" stop="-1,0"/> |
3731 | - </blockTableStyle> |
3732 | - <blockTableStyle id="CONTENIDOTABLE_TITULOS_PUR"> |
3733 | - <blockAlignment value="LEFT"/> |
3734 | - <blockValign value="MIDDLE"/> |
3735 | - <lineStyle kind="GRID" colorName="black" start="0,0" stop="-1,-1" thickness="0.5"/> |
3736 | - <blockBackground colorName="#e5e2e5" start="0,0" stop="-1,0"/> |
3737 | - </blockTableStyle> |
3738 | - <blockTableStyle id="CONTENIDOTABLE_LINES"> |
3739 | - <blockAlignment value="LEFT"/> |
3740 | - <blockValign value="MIDDLE"/> |
3741 | - <lineStyle kind="GRID" colorName="black" start="1,0" stop="-1,-1" thickness="0.5"/> |
3742 | - </blockTableStyle> |
3743 | - <blockTableStyle id="CONTENIDOTABLE_LINES_PUR"> |
3744 | - <blockAlignment value="LEFT"/> |
3745 | - <blockValign value="MIDDLE"/> |
3746 | - <lineStyle kind="GRID" colorName="black" start="0,0" stop="-1,-1" thickness="0.5"/> |
3747 | - </blockTableStyle> |
3748 | - |
3749 | - <initialize> |
3750 | - <alias id="style.normal" value="style.Normal"/> |
3751 | - </initialize> |
3752 | - <paraStyle name="P1" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER"/> |
3753 | - <paraStyle name="P2" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER"/> |
3754 | - <paraStyle name="P3" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER"/> |
3755 | - <paraStyle name="P4" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER" textColor="#ffffff"/> |
3756 | - <paraStyle name="P5" fontName="Times-Roman" fontSize="7.0" leading="8"/> |
3757 | - <paraStyle name="TITULO_AJUSTE" fontName="Times-Roman" fontSize="10.0" alignment="CENTER"/> |
3758 | - <paraStyle name="CONTENIDO" fontName="Times-Roman" fontSize="4.5" leading="4.7" alignment="CENTER" topPadding="0.5" bottomPadding="0.7"/> |
3759 | - <paraStyle name="CONTENIDOINT" fontName="Times-Roman" fontSize="4.5" leading="5.0" alignment="RIGHT" topPadding="0.5" bottomPadding="0.7"/> |
3760 | - <paraStyle name="CONTENIDOLEFT" fontName="Times-Roman" fontSize="4.5" leading="4.7" alignment="LEFT"/> |
3761 | - <paraStyle name="OBSERVACIONES" fontName="Times-Roman" fontSize="9.0" alignment="LEFT"/> |
3762 | - <paraStyle name="HEADERDOC" fontName="Times-Bold" fontSize="8.0" leading="8" alignment="JUSTIFY"/> |
3763 | - <paraStyle name="HEADER" fontName="Times-Roman" fontSize="4.0" leading="6" alignment="CENTER"/> |
3764 | - <paraStyle name="HEADERLEFT" fontName="Times-Roman" fontSize="4.0" leading="6" alignment="LEFT"/> |
3765 | - <paraStyle name="CONTENIDOLEFT_BOLD" fontName="Times-Bold" fontSize="7.0" leading="6" alignment="LEFT"/> |
3766 | - <paraStyle name="P7" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER"/> |
3767 | - <paraStyle name="P8" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER" textColor="#ffffff"/> |
3768 | - <paraStyle name="Standard" fontName="Times-Roman"/> |
3769 | - <paraStyle name="Heading" fontName="Times-Roman" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
3770 | - <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> |
3771 | - <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> |
3772 | - <paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
3773 | - <paraStyle name="Index" fontName="Times-Roman"/> |
3774 | - <paraStyle name="Table Contents" fontName="Times-Roman"/> |
3775 | - <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/> |
3776 | - </stylesheet> |
3777 | - <images/> |
3778 | - |
3779 | - <story> |
3780 | - <blockTable colWidths="499.0,190.0,260.0" style="HEADERTABLE"> |
3781 | - <tr> |
3782 | - [[ setLang(l.ai_id.company_id.partner_id.lang) ]] |
3783 | - <td> |
3784 | - <para style="HEADERDOC">[[ company.partner_id.name ]] [[ company.partner_id.vat[2:] ]]</para> |
3785 | - <para style="HEADERDOC">[[ get_partner_addr() ]]</para> |
3786 | - </td> |
3787 | - <td> |
3788 | - <para style="HEADERDOC">Libro: Compras </para> |
3789 | - <para style="HEADERDOC">Correspodiente al Mes de [[ get_month( data['form'] )[0] ]] del año [[ get_month( data['form'] )[1] ]]</para> |
3790 | - <para style="HEADERDOC">[[data['form'] and ('Desde: %s'%formatLang( data['form']['date_start'], date=True)) or '']]</para> |
3791 | - <para style="HEADERDOC">[[data['form'] and ('Hasta: %s'%formatLang( data['form']['date_end'], date=True)) or '']]</para> |
3792 | - </td> |
3793 | - <td> |
3794 | - <para style="HEADERDOC" fontName="Times-Roman">Según Articulo 76 del Reglamento de la Ley del IVA No. 5.363 del 12 de Julio de 1999</para> |
3795 | - </td> |
3796 | - </tr> |
3797 | - </blockTable> |
3798 | - <spacer length="2mm"/> |
3799 | - <!-- ****************************************--> |
3800 | - <!-- ********* PURCHASE BOOK *********--> |
3801 | - <!-- ****************************************--> |
3802 | - |
3803 | - <section> |
3804 | - <blockTable colWidths="517.0,180.0,180.0" style="ENCANBEZADO_SINCOLUM_2" blockAlignment="LEFT"> |
3805 | - <tr> |
3806 | - <td></td> |
3807 | - <td vAlign="MIDDLE"><para style="HEADER">IMPORTACIONES</para></td> |
3808 | - <td vAlign="MIDDLE"><para style="HEADER">COMPRAS INTERNAS</para></td> |
3809 | - </tr> |
3810 | - </blockTable> |
3811 | - </section> |
3812 | - <section> |
3813 | - <blockTable colWidths="1.0,15.0,23.0,23.0,15.0,25.0,160.0,40.0,30.0,36.0,36.0,36.0,18.0,33.0,33.0,33.0,37.0,29.0,114.0,37.0,29.0,114.0,40.0" style="ENCANBEZADO_SINCOLUM" repeatRows="1"> |
3814 | - <tr> |
3815 | - <td><para style="HEADER"></para></td> |
3816 | - <td><para style="HEADER">Linea</para></td> |
3817 | - <td><para style="HEADER">Fecha Doc.</para></td> |
3818 | - <td><para style="HEADER">Fecha Importada</para></td> |
3819 | - <td><para style="HEADER">T. Doc.</para></td> |
3820 | - <td><para style="HEADER">RIF</para></td> |
3821 | - <td><para style="HEADER">Razon Social</para></td> |
3822 | - <td><para style="HEADER">Comprobante</para></td> |
3823 | - <td><para style="HEADER">Planilla Importacion</para></td> |
3824 | - <td><para style="HEADER">Expediente Importacion</para></td> |
3825 | - <td><para style="HEADER">Numero de Factura</para></td> |
3826 | - <td><para style="HEADER">Numero Control</para></td> |
3827 | - <td><para style="HEADER">T. Trans.</para></td> |
3828 | - <td><para style="HEADER">Nota de Debito Afectada</para></td> |
3829 | - <td><para style="HEADER">Nota de Credito Afectada</para></td> |
3830 | - <td><para style="HEADER">Documento Afectado</para></td> |
3831 | - <td><para style="HEADER">Total con IVA</para></td> |
3832 | - <td><para style="HEADER">SDCF</para></td> |
3833 | - <td> |
3834 | - <section> |
3835 | - <blockTable colWidths="29.0,35.0,15.0,35.0" style="INTERNALTABLE"> |
3836 | - <tr> |
3837 | - <td><para style="HEADER">Exento</para></td> |
3838 | - <td><para style="HEADER">Base Imponible</para></td> |
3839 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
3840 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
3841 | - </tr> |
3842 | - </blockTable> |
3843 | - </section> |
3844 | - </td> |
3845 | - <td><para style="HEADER">Total con IVA</para></td> |
3846 | - <td><para style="HEADER">SDCF</para></td> |
3847 | - <td> |
3848 | - <blockTable colWidths="29.0,35.0,15.0,35.0" style="INTERNALTABLE"> |
3849 | - <tr> |
3850 | - <td><para style="HEADER">Exento</para></td> |
3851 | - <td><para style="HEADER">Base Imponible</para></td> |
3852 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
3853 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
3854 | - </tr> |
3855 | - </blockTable> |
3856 | - </td> |
3857 | - <td><para style="HEADER">Retencion Iva</para></td> |
3858 | - </tr> |
3859 | - </blockTable> |
3860 | - </section> |
3861 | - |
3862 | - <!-- ************ WITHHOLDING VAT BOOK LINES************--> |
3863 | - <section> |
3864 | - <para>[[repeatIn( get_data_wh(data['form']),'wh')]]</para> |
3865 | - <blockTable colWidths="1.0,18.0,36.0,39.0,155.0,47.0,42.0,38.0,15.0,37.0,187.0,187.0,44.0,60.0" style="CONTENIDOTABLE_LINES" repeatRows="2"> |
3866 | - <tr> |
3867 | - [[ setLang(company.partner_id.lang) ]] |
3868 | - <td><para style="CONTENIDO"></para></td> |
3869 | - <td><para style="CONTENIDO">[[ get_id(data['form'],wh.id) ]]</para></td> |
3870 | - <td><para style="CONTENIDO">[[ time.strftime('%d/%m/%Y', time.strptime(wh.ar_date_ret, '%Y-%m-%d'))]]</para></td> |
3871 | - <td><para style="CONTENIDO">[[ wh.get_t_doc ]]</para></td> |
3872 | - <td><para style="CONTENIDO">[[ get_rif(wh.rp_vat) ]]</para></td> |
3873 | - <td blockLeftPadding="0.5"><para style="CONTENIDOLEFT">[[ wh.rp_id.name ]]</para></td> |
3874 | - <td><para style="CONTENIDO">-----</para></td> |
3875 | - <td><para style="CONTENIDO">-----</para></td> |
3876 | - <td><para style="CONTENIDO">0.00</para></td> |
3877 | - <td><para style="CONTENIDO">-</para></td> |
3878 | - <td><para style="CONTENIDO">0.00</para></td> |
3879 | - <td><para style="CONTENIDO">SDCF</para></td> |
3880 | - <td> |
3881 | - <blockTable colWidths="29.0,35.0,15.0,35.0" style="INTERNALTABLE"> |
3882 | - <tr> |
3883 | - <td><para style="CONTENIDO">Exento</para></td> |
3884 | - <td><para style="CONTENIDO">0.00</para></td> |
3885 | - <td><para style="CONTENIDO">0.00</para></td> |
3886 | - <td><para style="CONTENIDO">0.00</para></td> |
3887 | - </tr> |
3888 | - </blockTable> |
3889 | - </td> |
3890 | - <td><para style="CONTENIDO">0.00</para></td> |
3891 | - <td><para style="CONTENIDO">SDCF</para></td> |
3892 | - <td> |
3893 | - <section> |
3894 | - <blockTable colWidths="29.0,35.0,15.0,35.0" style="INTERNALTABLE"> |
3895 | - <tr> |
3896 | - <td><para style="CONTENIDO">Exento</para></td> |
3897 | - <td><para style="CONTENIDO">0.00</para></td> |
3898 | - <td><para style="CONTENIDO">0.00</para></td> |
3899 | - <td><para style="CONTENIDO">0.00</para></td> |
3900 | - </tr> |
3901 | - </blockTable> |
3902 | - </section> |
3903 | - </td> |
3904 | - <td><para style="CONTENIDO">[[ formatLang(get_amount_withheld(wh.ar_line_id.id)) or '' ]]</para></td> |
3905 | - <td><para style="CONTENIDO">[[ wh.ar_id.number ]]</para></td> |
3906 | - </tr> |
3907 | - </blockTable> |
3908 | - </section> |
3909 | - |
3910 | - <!-- ************ PURCHASE BOOK LINES************--> |
3911 | - <section> |
3912 | - <para>[[repeatIn( get_data( data['form'] ),'l')]]</para> |
3913 | - <blockTable rowHeights="6.0" colWidths="1.0,15.0,23.0,23.0,15.0,25.0,160.0,40.0,30.0,36.0,36.0,36.0,18.0,33.0,33.0,33.0,37.0,29.0,114.0,37.0,29.0,114.0,40.0" style="CONTENIDOTABLE_LINES" repeatRows="1"> |
3914 | - <tr> |
3915 | - [[ setLang(l.ai_id.company_id.partner_id.lang) ]] |
3916 | - <td vAlign="MIDDLE"></td> |
3917 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ get_id(data['form'],l.id,'book') ]]</para></td> |
3918 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ time.strftime('%d/%m/%Y',time.strptime(l.get_date_invoiced,'%Y-%m-%d')) ]]</para></td> |
3919 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ time.strftime('%d/%m/%Y',time.strptime(l.get_date_imported,'%Y-%m-%d')) ]]</para></td> |
3920 | - <td><para style="CONTENIDO">[[ l.get_t_doc ]]</para></td> |
3921 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_partner_vat ]]</para></td> |
3922 | - <td vAlign="MIDDLE" leftPadding="0"><para style="CONTENIDOLEFT">[[ l.get_partner_name ]]</para></td> |
3923 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ get_ret(data['form'], l.id) ]]</para></td> |
3924 | - <td vAlign="MIDDLE"> |
3925 | - <section> |
3926 | - <blockTable colWidths="25" style="INTERNALTABLE" repeatRows="2"> |
3927 | - <para>[[ repeatIn(l.get_import_spreadsheets and l.get_import_spreadsheets or [],'ish')]]</para> |
3928 | - <tr> |
3929 | - <td vAlign="MIDDLE"> |
3930 | - <para style="CONTENIDO">[[ ish.get_import_form ]]</para> |
3931 | - </td> |
3932 | - </tr> |
3933 | - </blockTable> |
3934 | - </section> |
3935 | - </td> |
3936 | - <td vAlign="MIDDLE"> |
3937 | - <section> |
3938 | - <para>[[ repeatIn(l.get_import_spreadsheets and l.get_import_spreadsheets or [],'ish2')]]</para> |
3939 | - <blockTable colWidths="25" style="INTERNALTABLE"> |
3940 | - <tr> |
3941 | - <td vAlign="MIDDLE"> |
3942 | - <para style="CONTENIDO">[[ ish2.import_spreadsheet_name ]]</para> |
3943 | - </td> |
3944 | - </tr> |
3945 | - </blockTable> |
3946 | - </section> |
3947 | - </td> |
3948 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_reference]]</para></td> |
3949 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_number]]</para></td> |
3950 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_papel_anulado ]]</para></td> |
3951 | - <td vAlign="MIDDLE"><para style="HEADER">[[ l.get_debit_affected ]]</para></td> |
3952 | - <td vAlign="MIDDLE"><para style="HEADER">[[ l.get_credit_affected ]]</para></td> |
3953 | - <td vAlign="MIDDLE"><para style="HEADER">[[ l.get_parent ]]</para></td> |
3954 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang( l.get_is_imported and l.get_total or 0.0) ]]</para></td> |
3955 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang( l.get_is_imported and l.get_v_sdcf or 0.0) ]]</para></td> |
3956 | - <td> |
3957 | - <section> |
3958 | - <para>[[ repeatIn(l.get_taxes and l.get_taxes or [0.0],'s')]]</para> |
3959 | - <blockTable colWidths="29.0,35.0,15.0,35.0" style="INTERNALTABLE"> |
3960 | - <tr> |
3961 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(l.get_is_imported and l.get_v_exent or 0.0) ]]</para></td> |
3962 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(l.get_is_imported and get_tax_line(s) or 0.0) ]]</para></td> |
3963 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(l.get_is_imported and round(s.tax_amount/(s.base_amount and s.base_amount or 1)*100.0) or 0.0) ]]</para></td> |
3964 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(l.get_is_imported and s.tax_amount or 0.0) ]]</para></td> |
3965 | - </tr> |
3966 | - </blockTable> |
3967 | - </section> |
3968 | - </td> |
3969 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not l.get_is_imported) and l.get_total or 0.0) ]]</para></td> |
3970 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not l.get_is_imported) and l.get_v_sdcf or 0.0) ]]</para></td> |
3971 | - <td> |
3972 | - <section> |
3973 | - <para>[[ repeatIn(l.get_taxes and l.get_taxes or [0.0],'t')]]</para> |
3974 | - <blockTable colWidths="29.0,35.0,15.0,35.0" style="INTERNALTABLE"> |
3975 | - <tr> |
3976 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not l.get_is_imported) and l.get_v_exent or 0.0) ]]</para></td> |
3977 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not l.get_is_imported) and get_tax_line(s) or 0.0) ]]</para></td> |
3978 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not l.get_is_imported) and round(s.tax_amount/(s.base_amount and s.base_amount or 1)*100.0) or 0.0) ]]</para></td> |
3979 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not l.get_is_imported) and s.tax_amount or 0.0) ]]</para></td> |
3980 | - </tr> |
3981 | - </blockTable> |
3982 | - </section> |
3983 | - </td> |
3984 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang( get_amount_withheld(data['form'], l) ) ]]</para></td> |
3985 | - </tr> |
3986 | - </blockTable> |
3987 | - </section> |
3988 | - |
3989 | - |
3990 | - <!-- ************ TOTALS PURCHASE PARCIALES************--> |
3991 | - <section> |
3992 | - |
3993 | - <blockTable colWidths="1.0,15.0,23.0,23.0,15.0,25.0,160.0,40.0,30.0,36.0,36.0,36.0,18.0,33.0,33.0,33.0,37.0,29.0,114.0,37.0,29.0,114.0,40.0" style="CONTENIDOTABLE_LINES" repeatRows="2"> |
3994 | - <tr> |
3995 | - [[ setLang(l.ai_id.company_id.partner_id.lang) ]] |
3996 | - <td></td> |
3997 | - <td></td> |
3998 | - <td></td> |
3999 | - <td></td> |
4000 | - <td></td> |
4001 | - <td></td> |
4002 | - <td><para style="HEADER">TOTALES</para></td> |
4003 | - <td></td> |
4004 | - <td></td> |
4005 | - <td></td> |
4006 | - <td></td> |
4007 | - <td></td> |
4008 | - <td></td> |
4009 | - <td></td> |
4010 | - <td></td> |
4011 | - <td></td> |
4012 | - <td><para style="HEADER">[[ formatLang(get_total_iva(data['form'])) ]]</para></td> |
4013 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'SDCF','internacional')[0])]]</para></td> |
4014 | - <td> |
4015 | - <blockTable colWidths="29.0,35.0,15.0,35.0" style="INTERNALTABLE"> |
4016 | - <tr> |
4017 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'], 'EXENTO', 'internacional')[0]) ]]</para></td> |
4018 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12','internacional')[0]+get_amount_untaxed_tax(data['form'],'8','internacional')[0]+get_amount_untaxed_tax(data['form'],'EXONERADO','internacional')[0]) ]]</para></td> |
4019 | - <td></td> |
4020 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12','internacional')[1] +get_amount_untaxed_tax(data['form'],'8','internacional')[1]+get_amount_untaxed_tax(data['form'],'EXONERADO','internacional')[1]) ]]</para></td> |
4021 | - </tr> |
4022 | - </blockTable> |
4023 | - </td> |
4024 | - <td><para style="HEADER">[[ formatLang(get_total_iva(data['form'])) ]]</para></td> |
4025 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'SDCF','nacional')[0])]]</para></td> |
4026 | - <td> |
4027 | - <blockTable colWidths="29.0,35.0,15.0,35.0" style="INTERNALTABLE"> |
4028 | - <tr> |
4029 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'EXENTO','nacional')[0])]]</para></td> |
4030 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12','nacional')[0]+get_amount_untaxed_tax(data['form'],'8','nacional')[0]+get_amount_untaxed_tax(data['form'],'EXONERADO','nacional')[0]) ]]</para></td> |
4031 | - <td></td> |
4032 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12','nacional')[1] +get_amount_untaxed_tax(data['form'],'8','nacional')[1]+get_amount_untaxed_tax(data['form'],'EXONERADO','nacional')[1]) ]]</para></td> |
4033 | - </tr> |
4034 | - </blockTable> |
4035 | - </td> |
4036 | - <td><para style="HEADER">[[ formatLang(get_total_wh(data['form'])) ]]</para></td> |
4037 | - </tr> |
4038 | - </blockTable> |
4039 | - </section> |
4040 | - |
4041 | - <!-- ************ LEYENDA************--> |
4042 | - <section> |
4043 | - <blockTable colWidths="794.0"> |
4044 | - <tr> |
4045 | - <td><para style="CONTENIDOLEFT">LEYENDA. F:Factura, ND:Nota de Débito, NC:Nota de Crédito, E:Expediente, A:Documento Anulado.</para></td> |
4046 | - </tr> |
4047 | - </blockTable> |
4048 | - </section> |
4049 | - |
4050 | - <spacer length='5mm'/> |
4051 | - |
4052 | - <!-- ************ TOTALS WHITHHOLDING***********--> |
4053 | - |
4054 | - <section> |
4055 | - [['.']] |
4056 | - <blockTable colWidths="70mm,40mm" style="TOTALS_TABLE" repeatRows="2"> |
4057 | - <tr> |
4058 | - <td><para style="HEADER">RESUMEN RETENCIONES</para></td> |
4059 | - <td><para style="HEADER">RET. DEBITO FISCAL</para></td> |
4060 | - </tr> |
4061 | - <tr> |
4062 | - <td><para style="CONTENIDOLEFT">RETENCIONES PERIODOS ANTERIORES</para></td> |
4063 | - <td><para style="CONTENIDO">[[ formatLang(get_total_wh(data['form'])-get_wh_actual(data['form'])) ]]</para></td> |
4064 | - </tr> |
4065 | - <tr> |
4066 | - <td><para style="CONTENIDOLEFT">RETENCIONES DEL PERIODO</para></td> |
4067 | - <td><para style="CONTENIDO">[[ formatLang(get_wh_actual(data['form'])) ]]</para></td> |
4068 | - </tr> |
4069 | - <tr> |
4070 | - <td><para style="CONTENIDOLEFT_BOLD">TOTAL RETENCIONES</para></td> |
4071 | - <td><para style="CONTENIDO">[[ formatLang(get_total_wh(data['form'])) ]]</para></td> |
4072 | - </tr> |
4073 | - </blockTable> |
4074 | - </section> |
4075 | - <spacer length='5mm'/> |
4076 | - |
4077 | - <!-- ************ TOTALS PURCHASE BOOK************--> |
4078 | - |
4079 | - <section> |
4080 | - [[ setLang(l.ai_id.company_id.partner_id.lang) ]] |
4081 | - <blockTable colWidths="280.0,80.0,80.0" style="TOTALS_TABLE" repeatRows="2"> |
4082 | - <tr> |
4083 | - <td><para style="HEADER">RESUMEN</para></td> |
4084 | - <td><para style="HEADER">BASE IMPONIBLE</para></td> |
4085 | - <td><para style="HEADER">DEBITO FISCAL</para></td> |
4086 | - </tr> |
4087 | - <tr> |
4088 | - <td><para style="HEADERLEFT">IMPORTACIONES NO GRAVADAS Y/O SIN DERECHO A CREDITO FISCAL</para></td> |
4089 | - <td><para style="HEADER">[[ formatLang(+get_amount_untaxed_tax(data['form'],'SDCF', 'internacional')[0]+get_amount_untaxed_tax(data['form'],'EXONERADO', 'internacional')[0]+get_amount_untaxed_tax(data['form'],'EXENTO', 'internacional')[0]) ]]</para></td> |
4090 | - <td><para style="HEADER">0.0</para></td> |
4091 | - </tr> |
4092 | - <tr> |
4093 | - <td><para style="HEADERLEFT">IMPORTACIONES GRAVADAS POR ALICUOTA GENERAL</para></td> |
4094 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'12','internacional')[0])]]</para></td> |
4095 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'12','internacional')[1])]]</para></td> |
4096 | - </tr> |
4097 | - <tr> |
4098 | - <td><para style="HEADERLEFT">IMPORTACIONES GRAVADAS POR ALICUOTA GENERAL MAS ALICUOTA ADICIONAL</para></td> |
4099 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'22','internacional')[0])]]</para></td> |
4100 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'22','internacional')[1])]]</para></td> |
4101 | - </tr> |
4102 | - <tr> |
4103 | - <td><para style="HEADERLEFT">IMPORTACIONES GRAVADAS POR ALICUOTA REDUCIDA</para></td> |
4104 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'8','internacional')[0])]]</para></td> |
4105 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'8','internacional')[1])]]</para></td> |
4106 | - |
4107 | - </tr> |
4108 | - |
4109 | - <tr> |
4110 | - <td><para style="HEADERLEFT">COMPRAS NO GRAVADAS Y/O SIN DERECHO A CREDITO FISCAL</para></td> |
4111 | - <td><para style="HEADER">[[ formatLang(+get_amount_untaxed_tax(data['form'],'SDCF', 'nacional')[0]+get_amount_untaxed_tax(data['form'],'EXONERADO', 'nacional')[0]+get_amount_untaxed_tax(data['form'],'EXENTO', 'nacional')[0]) ]]</para></td> |
4112 | - <td><para style="HEADER">0.0</para></td> |
4113 | - </tr> |
4114 | - <tr> |
4115 | - <td><para style="HEADERLEFT">COMPRAS GRAVADAS POR ALICUOTA GENERAL</para></td> |
4116 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'12','nacional')[0])]]</para></td> |
4117 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'12','nacional')[1])]]</para></td> |
4118 | - </tr> |
4119 | - <tr> |
4120 | - <td><para style="HEADERLEFT">COMPRAS INTERNAS GRAVADAS POR ALICUOTA GENERAL MAS ALICUOTA ADICIONAL</para></td> |
4121 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'22','nacional')[0])]]</para></td> |
4122 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'22','nacional')[1])]]</para></td> |
4123 | - </tr> |
4124 | - <tr> |
4125 | - <td><para style="HEADERLEFT">COMPRAS INTERNAS GRAVADAS POR ALICUOTA REDUCIDA</para></td> |
4126 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'8','nacional')[0])]]</para></td> |
4127 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'8','nacional')[1])]]</para></td> |
4128 | - |
4129 | - </tr> |
4130 | - <tr> |
4131 | - <td><para style="CONTENIDOLEFT_BOLD">TOTAL VENTAS Y DEBITOS FISCAL PARA EFECTOS DE DETERMINACION</para></td> |
4132 | - <td><para style="HEADER"> |
4133 | -[[ formatLang(get_amount_untaxed_tax(data['form'],'SDCF','nacional')[0]+ |
4134 | -get_amount_untaxed_tax(data['form'],'SDCF')[0]+ |
4135 | -get_amount_untaxed_tax(data['form'],'EXONERADO')[0]+ |
4136 | -get_amount_untaxed_tax(data['form'],'12')[0]+ |
4137 | -get_amount_untaxed_tax(data['form'],'22')[0]+ |
4138 | -get_amount_untaxed_tax(data['form'],'8')[0])]] |
4139 | - </para></td> |
4140 | - <td><para style="HEADER"> |
4141 | -[[formatLang( |
4142 | -get_amount_untaxed_tax(data['form'],'12')[1]+ |
4143 | -get_amount_untaxed_tax(data['form'],'22')[1]+ |
4144 | -get_amount_untaxed_tax(data['form'],'8')[1] |
4145 | -)]] |
4146 | - </para></td> |
4147 | - </tr> |
4148 | - </blockTable> |
4149 | - </section> |
4150 | - |
4151 | -<blockTable colWidths="110.0" style="INTERNALTABLE"> |
4152 | - <tr><td vAlign="MIDDLE"><para>[[ validation(data['form']) and '.' or removeParentNode('blockTable') ]]</para><!-- <nextPage/> --></td></tr> |
4153 | -</blockTable> |
4154 | - |
4155 | - |
4156 | - <spacer length='5mm'/> |
4157 | - <!-- ****************************************--> |
4158 | - <!-- ************ AJUSTMENT BOOK ************--> |
4159 | - <!-- ****************************************--> |
4160 | - <section> |
4161 | - <blockTable colWidths="795.0" style="HEADERTABLE_AD"> |
4162 | - <tr><td><para></para></td></tr> |
4163 | - <tr><td><para></para></td></tr> |
4164 | - <tr> |
4165 | - <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4166 | - <td><para style="TITULO_AJUSTE">LIBRO DE AJUSTES</para></td></tr> |
4167 | - <tr><td><para></para></td></tr> |
4168 | - </blockTable> |
4169 | - </section> |
4170 | - |
4171 | - |
4172 | - <section> |
4173 | - <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4174 | - <blockTable colWidths="1.0,33.0,37.0,177.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0" style="ENCANBEZADO_SINCOLUM" repeatRows="2"> |
4175 | - <tr> |
4176 | - <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4177 | - <td></td> |
4178 | - <td></td> |
4179 | - <td></td> |
4180 | - <td></td> |
4181 | - <td></td> |
4182 | - <td></td> |
4183 | - <td></td> |
4184 | - <td></td> |
4185 | - <td></td> |
4186 | - <td></td> |
4187 | - <td> |
4188 | - <blockTable colWidths="110.0" style="INTERNALTABLE"> |
4189 | - <tr><td vAlign="MIDDLE"><para style="HEADER">Operaciones Nacionales</para></td></tr> |
4190 | - </blockTable> |
4191 | - </td> |
4192 | - <td> |
4193 | - <blockTable colWidths="110.0" style="INTERNALTABLE"> |
4194 | - <tr><td vAlign="MIDDLE"><para style="HEADER">Operaciones Internacionales</para></td></tr> |
4195 | - </blockTable> |
4196 | - </td> |
4197 | - <td></td><td></td> |
4198 | - </tr> |
4199 | - <tr> |
4200 | - <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4201 | - <td><para style="HEADER"></para></td> |
4202 | - <td><para style="HEADER">Fecha Cont.</para></td> |
4203 | - <td><para style="HEADER">RIF</para></td> |
4204 | - <td><para style="HEADER">Razon Social</para></td> |
4205 | - <td><para style="HEADER">Numero Doc.</para></td> |
4206 | - <td><para style="HEADER">Numero Control</para></td> |
4207 | - <td><para style="HEADER">Total con IVA</para></td> |
4208 | - <td><para style="HEADER">Tipo Doc.</para></td> |
4209 | - <td><para style="HEADER">Documento Afectado</para></td> |
4210 | - <td><para style="HEADER">Sin derecho a Credito Fiscal</para></td> |
4211 | - <td> |
4212 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4213 | - <tr> |
4214 | - <td><para style="HEADER">Base Imponible</para></td> |
4215 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
4216 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
4217 | - </tr> |
4218 | - </blockTable> |
4219 | - </td> |
4220 | - <td> |
4221 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4222 | - <tr> |
4223 | - <td><para style="HEADER">Base Imponible</para></td> |
4224 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
4225 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
4226 | - </tr> |
4227 | - </blockTable> |
4228 | - </td> |
4229 | - <td><para style="HEADER">Retencion IVA</para></td> |
4230 | - <td><para style="HEADER">Comprobante</para></td> |
4231 | - </tr> |
4232 | - </blockTable> |
4233 | - </section> |
4234 | - |
4235 | - <section> |
4236 | - <para>[[ repeatIn(validation(data['form']) and get_data_adjustment(data['form'])[1] or [],'a')]]</para> |
4237 | - <blockTable colWidths="1.0,33.0,37.0,177.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0" style="CONTENIDOTABLE_LINES" repeatRows="2"> |
4238 | - <tr> |
4239 | - <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4240 | - [[ setLang(l.ai_id.company_id.partner_id.lang) ]] |
4241 | - <td><para style="CONTENIDO"></para></td> |
4242 | - <td><para style="CONTENIDO">[[ time.strftime('%d/%m/%Y', time.strptime(a.date_accounting, '%Y-%m-%d'))]]</para></td> |
4243 | - <td><para style="CONTENIDO">[[ a.vat ]]</para></td> |
4244 | - <td><para style="CONTENIDOLEFT">[[ a.partner ]]</para></td> |
4245 | - <td><para style="CONTENIDO">[[ a.invoice_number ]]</para></td> |
4246 | - <td><para style="CONTENIDO">[[ a.control_number ]]</para></td> |
4247 | - <td><para style="CONTENIDO">[[ formatLang(a.amount) ]]</para></td> |
4248 | - <td><para style="CONTENIDO">[[ a.type_doc ]]</para></td> |
4249 | - <td><para style="CONTENIDO">[[ a.doc_affected ]]</para></td> |
4250 | - <td><para style="CONTENIDO">[[ a.uncredit_fiscal ]]</para></td> |
4251 | - <td> |
4252 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4253 | - <tr> |
4254 | - <td><para style="CONTENIDOINT">[[ formatLang(a.amount_untaxed_n) ]]</para></td> |
4255 | - <td><para style="CONTENIDOINT">[[ formatLang(a.percent_with_vat_n) ]]</para></td> |
4256 | - <td><para style="CONTENIDOINT">[[ formatLang(a.amount_with_vat_n) ]]</para></td> |
4257 | - </tr> |
4258 | - </blockTable> |
4259 | - </td> |
4260 | - <td> |
4261 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4262 | - <tr> |
4263 | - <td><para style="CONTENIDOINT">[[ formatLang(a.amount_untaxed_i) ]]</para></td> |
4264 | - <td><para style="CONTENIDOINT">[[ formatLang(a.percent_with_vat_i) ]]</para></td> |
4265 | - <td><para style="CONTENIDOINT">[[ formatLang(a.amount_with_vat_i) ]]</para></td> |
4266 | - </tr> |
4267 | - </blockTable> |
4268 | - </td> |
4269 | - <td><para style="CONTENIDO">[[ formatLang(a.amount_with_vat) ]]</para></td> |
4270 | - <td><para style="CONTENIDO">[[ a.voucher ]]</para></td> |
4271 | - </tr> |
4272 | - </blockTable> |
4273 | - </section> |
4274 | - |
4275 | - <section> |
4276 | - <para>[[repeatIn( get_data_adjustment( data['form'] )[0],'al')]]</para> |
4277 | - <blockTable colWidths="1.0,33.0,37.0,177.0,47.0,38.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0" style="CONTENIDOTABLE_LINES" repeatRows="2"> |
4278 | - <tr> |
4279 | - <para> |
4280 | - [[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4281 | - [[ setLang(company.partner_id.lang) ]] |
4282 | - <td></td><td></td><td></td> |
4283 | - <td></td><td></td><td></td> |
4284 | - <td><para style="CONTENIDOINT">[[ formatLang(al.amount_total) ]]</para></td> |
4285 | - <td></td><td></td> |
4286 | - <td><para style="CONTENIDOINT">[[ formatLang(al.uncredit_fiscal_total) ]]</para></td> |
4287 | - <td> |
4288 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4289 | - <tr> |
4290 | - <td><para style="CONTENIDOINT">[[ formatLang(al.amount_untaxed_n_total) ]]</para></td> |
4291 | - <td></td> |
4292 | - <td><para style="CONTENIDOINT">[[ formatLang(al.amount_with_vat_n_total) ]]</para></td> |
4293 | - </tr> |
4294 | - </blockTable> |
4295 | - </td> |
4296 | - <td> |
4297 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4298 | - <tr> |
4299 | - <td><para style="CONTENIDOINT">[[ formatLang(al.amount_untaxed_i_total) ]]</para></td> |
4300 | - <td></td> |
4301 | - <td><para style="CONTENIDOINT">[[ formatLang(al.amount_with_vat_i_total) ]]</para></td> |
4302 | - </tr> |
4303 | - </blockTable> |
4304 | - </td> |
4305 | - <td><para style="CONTENIDO">[[ formatLang(al.amount_with_vat_total) ]]</para></td> |
4306 | - <td></td> |
4307 | - </tr> |
4308 | - </blockTable> |
4309 | - </section> |
4310 | - |
4311 | - |
4312 | - <spacer length='5mm'/> |
4313 | - <!-- ************ TOTALES ADJUSTMENT BOOK************--> |
4314 | - <section> |
4315 | - <para>[[ repeatIn(validation(data['form']) and get_data_adjustment(data['form'])[0] or [],'to')]]</para> |
4316 | - <blockTable colWidths="280.0,80.0,80.0" style="TOTALS_TABLE" repeatRows="2"> |
4317 | - <tr> |
4318 | - <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4319 | - <td><para style="HEADER">CREDITOS FISCALES</para></td> |
4320 | - <td><para style="HEADER">BASE IMPONIBLE</para></td> |
4321 | - <td><para style="HEADER">CREDITO FISCAL</para></td> |
4322 | - </tr> |
4323 | - <tr> |
4324 | - <td><para style="CONTENIDOLEFT">VENTAS INTERNAS NO GRAVADAS</para></td> |
4325 | - <td><para style="CONTENIDO">[[formatLang(to.no_grav)]]</para></td> |
4326 | - <td><para style="CONTENIDO">0.00</para></td> |
4327 | - </tr> |
4328 | - <tr> |
4329 | - <td><para style="CONTENIDOLEFT">VENTAS INTERNAS GRAVADAS POR ALICUOTA GENERAL</para></td> |
4330 | - <td><para style="CONTENIDO">[[formatLang(to.vat_general_n)]]</para></td> |
4331 | - <td><para style="CONTENIDO">[[formatLang(to.vat_general_ncf)]]</para></td> |
4332 | - </tr> |
4333 | - <tr> |
4334 | - <td><para style="CONTENIDOLEFT">VENTAS INTERNAS GRAVADAS POR ALICUOTA GENERAL MAS ALICUOTA ADICIONAL</para></td> |
4335 | - <td><para style="CONTENIDO">[[formatLang(to.vat_general_add_n)]]</para></td> |
4336 | - <td><para style="CONTENIDO">[[formatLang(to.vat_general_add_ncf)]]</para></td> |
4337 | - </tr> |
4338 | - <tr> |
4339 | - <td><para style="CONTENIDOLEFT">VENTAS INTERNAS GRAVADAS POR ALICUOTA REDUCIDA</para></td> |
4340 | - <td><para style="CONTENIDO">[[formatLang(to.vat_reduced_n)]]</para></td> |
4341 | - <td><para style="CONTENIDO">[[formatLang(to.vat_reduced_ncf)]]</para></td> |
4342 | - </tr> |
4343 | - <tr> |
4344 | - <td><para style="CONTENIDOLEFT">AJUSTES A LOS DEBITOS FISCALES DE LOS PERIODOS ANTERIORES</para></td> |
4345 | - <td><para style="CONTENIDO">0.0</para></td> |
4346 | - <td><para style="CONTENIDO">[[formatLang(to.adjustment_cf)]]</para></td> |
4347 | - </tr> |
4348 | - <tr> |
4349 | - <td><para style="CONTENIDOLEFT_BOLD">TOTAL COMPRAS Y CREDITOS FISCALES DEL PERIODO</para></td> |
4350 | - <td><para style="CONTENIDO">[[formatLang(to.amount_base_total)]]</para></td> |
4351 | - <td><para style="CONTENIDO">[[formatLang(to.amount_percent_total)]]</para></td> |
4352 | - </tr> |
4353 | - </blockTable> |
4354 | - </section> |
4355 | - |
4356 | - <spacer length='5mm'/> |
4357 | - <!-- ************ OBSERVACIONES ADJUSTMENT BOOK************--> |
4358 | - <section> |
4359 | - <para>[[ repeatIn(validation(data['form']) and get_data_adjustment(data['form'])[0] or [],'ob')]]</para> |
4360 | - <blockTable colWidths="794.0" style="CONTENIDOTABLE_LINES_PUR"> |
4361 | - <tr> |
4362 | - <td><para style="OBSERVACIONES">[[ob.note and 'OBSERVACIONES:' or removeParentNode('para')]]</para></td> |
4363 | - </tr> |
4364 | - <tr> |
4365 | - <td><para style="OBSERVACIONES">[[ ob.note and ob.note or removeParentNode('para') ]]</para></td> |
4366 | - </tr> |
4367 | - </blockTable> |
4368 | - </section> |
4369 | - |
4370 | - |
4371 | - </story> |
4372 | -</document> |
4373 | - |
4374 | - |
4375 | - |
4376 | - |
4377 | - |
4378 | - |
4379 | - |
4380 | - |
4381 | - |
4382 | - |
4383 | - |
4384 | |
4385 | === removed file 'l10n_ve_fiscal_book/report/sales_book.rml' |
4386 | --- l10n_ve_fiscal_book/report/sales_book.rml 2013-04-16 16:53:35 +0000 |
4387 | +++ l10n_ve_fiscal_book/report/sales_book.rml 1970-01-01 00:00:00 +0000 |
4388 | @@ -1,681 +0,0 @@ |
4389 | -<?xml version="1.0"?> |
4390 | -<document filename="test.pdf" invariant="1"> |
4391 | - <template pageSize="(35.56cm,21.59cm)" title="Test" author="Martin Simon" allowSplitting="20" showBoundary="0"> |
4392 | - <pageTemplate id="first"> |
4393 | - <pageGraphics> |
4394 | - <setFont name="Times-Roman" size="9"/> |
4395 | - <drawString x="1.3cm" y="0.5cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString> |
4396 | - <drawString x="25cm" y="0.5cm">Pagina <pageNumber/></drawString> |
4397 | - <lineMode width="0.7"/> |
4398 | - <lines>1.3cm 24.9cm 38.3cm 24.9cm</lines> |
4399 | - <setFont name="Times-Roman" size="8"/> |
4400 | - </pageGraphics> |
4401 | - <frame id="first" x1="5.0" y1="15.0" width="1000" height="580"/> |
4402 | - </pageTemplate> |
4403 | - |
4404 | - |
4405 | - </template> |
4406 | - <stylesheet> |
4407 | - <blockTableStyle id="HEADERTABLE"> |
4408 | - <blockAlignment value="LEFT"/> |
4409 | - <blockValign value="TOP"/> |
4410 | - <lineStyle kind="LINEBELOW" colorName="#000000" thickness="1" start="0,0" stop="14,0"/> |
4411 | - </blockTableStyle> |
4412 | - <blockTableStyle id="HEADERTABLE_AD"> |
4413 | - <blockAlignment value="LEFT"/> |
4414 | - <blockValign value="TOP"/> |
4415 | - <lineStyle kind="LINEBELOW" colorName="#000000" thickness="1" start="0,3" stop="14,3"/> |
4416 | - </blockTableStyle> |
4417 | - <blockTableStyle id="INTERNALTABLE"> |
4418 | - <blockAlignment value="LEFT"/> |
4419 | - <blockValign value="MIDDLE"/> |
4420 | - </blockTableStyle> |
4421 | - <blockTableStyle id="CONTENIDOTABLE"> |
4422 | - <blockAlignment value="LEFT"/> |
4423 | - <blockValign value="MIDDLE"/> |
4424 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,1" stop="-1,-1"/> |
4425 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="-5,0" stop="-4,0"/> |
4426 | - </blockTableStyle> |
4427 | - <blockTableStyle id="ENCANBEZADO"> |
4428 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="15,0" stop="17,0"/> |
4429 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="0,1" stop="-1,-1"/> |
4430 | - <blockBackground colorName="#e5e2e5" start="0,1" stop="-1,1"/> |
4431 | - </blockTableStyle> |
4432 | - <blockTableStyle id="ENCANBEZADO_SINCOLUM"> |
4433 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,0" stop="-1,-1"/> |
4434 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,1" stop="-1,-1"/> |
4435 | - <blockBackground colorName="#e5e2e5" start="1,1" stop="-1,1"/> |
4436 | - </blockTableStyle> |
4437 | - |
4438 | - <blockTableStyle id="ENCANBEZADO_SINCOLUM_2"> |
4439 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,0" stop="2,0"/> |
4440 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="1,1" stop="-1,-1"/> |
4441 | - <blockBackground colorName="#e5e2e5" start="1,1" stop="-1,1"/> |
4442 | - </blockTableStyle> |
4443 | - |
4444 | - <blockTableStyle id="TOTALS_TABLE"> |
4445 | - <blockValign value="MIDDLE"/> |
4446 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="0,0" stop="-1,-1"/> |
4447 | - <blockBackground colorName="#e5e2e5" start="0,0" stop="-1,0"/> |
4448 | - </blockTableStyle> |
4449 | - <blockTableStyle id="CONTENIDOTABLE_PUR"> |
4450 | - <blockValign value="MIDDLE"/> |
4451 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="0,1" stop="-1,-1"/> |
4452 | - <lineStyle kind="GRID" colorName="black" thickness="1" start="-4,0" stop="-3,0"/> |
4453 | - </blockTableStyle> |
4454 | - <blockTableStyle id="CONTENIDOTABLE_TITULOS"> |
4455 | - <blockAlignment value="LEFT"/> |
4456 | - <blockValign value="MIDDLE"/> |
4457 | - <lineStyle kind="GRID" colorName="black" start="1,0" stop="-1,-1" thickness="0.5"/> |
4458 | - <blockBackground colorName="#e5e2e5" start="1,0" stop="-1,0"/> |
4459 | - </blockTableStyle> |
4460 | - <blockTableStyle id="CONTENIDOTABLE_TITULOS_PUR"> |
4461 | - <blockAlignment value="LEFT"/> |
4462 | - <blockValign value="MIDDLE"/> |
4463 | - <lineStyle kind="GRID" colorName="black" start="0,0" stop="-1,-1" thickness="0.5"/> |
4464 | - <blockBackground colorName="#e5e2e5" start="0,0" stop="-1,0"/> |
4465 | - </blockTableStyle> |
4466 | - <blockTableStyle id="CONTENIDOTABLE_LINES"> |
4467 | - <blockAlignment value="LEFT"/> |
4468 | - <blockValign value="MIDDLE"/> |
4469 | - <lineStyle kind="GRID" colorName="black" start="1,0" stop="-1,-1" thickness="0.5"/> |
4470 | - </blockTableStyle> |
4471 | - <blockTableStyle id="CONTENIDOTABLE_LINES_PUR"> |
4472 | - <blockAlignment value="LEFT"/> |
4473 | - <blockValign value="MIDDLE"/> |
4474 | - <lineStyle kind="GRID" colorName="black" start="0,0" stop="-1,-1" thickness="0.5"/> |
4475 | - </blockTableStyle> |
4476 | - |
4477 | - <initialize> |
4478 | - <alias id="style.normal" value="style.Normal"/> |
4479 | - </initialize> |
4480 | - <paraStyle name="P1" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER"/> |
4481 | - <paraStyle name="P2" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER"/> |
4482 | - <paraStyle name="P3" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER"/> |
4483 | - <paraStyle name="P4" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER" textColor="#ffffff"/> |
4484 | - <paraStyle name="P5" fontName="Times-Roman" fontSize="7.0" leading="8"/> |
4485 | - <paraStyle name="TITULO_AJUSTE" fontName="Times-Roman" fontSize="10.0" alignment="CENTER"/> |
4486 | - <paraStyle name="CONTENIDO" fontName="Times-Roman" fontSize="4.5" leading="5.0" alignment="CENTER" topPadding="0.5" bottomPadding="0.7"/> |
4487 | - <paraStyle name="CONTENIDOINT" fontName="Times-Roman" fontSize="4.5" leading="5.0" alignment="RIGHT" topPadding="0.5" bottomPadding="0.7"/> |
4488 | - <paraStyle name="CONTENIDOLEFT" fontName="Times-Roman" fontSize="4.5" leading="5.0" alignment="LEFT" topPadding="0.5" bottomPadding="0.7"/> |
4489 | - <paraStyle name="OBSERVACIONES" fontName="Times-Roman" fontSize="9.0" alignment="LEFT"/> |
4490 | - <paraStyle name="HEADERDOC" fontName="Times-Bold" fontSize="8.0" leading="8" alignment="JUSTIFY"/> |
4491 | - <paraStyle name="HEADER" fontName="Times-Roman" fontSize="6.0" leading="6" alignment="CENTER"/> |
4492 | - <paraStyle name="HEADERLEFT" fontName="Times-Roman" fontSize="4.0" leading="6" alignment="LEFT"/> |
4493 | - <paraStyle name="CONTENIDOLEFT_BOLD" fontName="Times-Bold" fontSize="7.0" leading="6" alignment="LEFT"/> |
4494 | - <paraStyle name="P7" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER"/> |
4495 | - <paraStyle name="P8" fontName="Times-Roman" fontSize="7.0" leading="8" alignment="CENTER" textColor="#ffffff"/> |
4496 | - <paraStyle name="Standard" fontName="Times-Roman"/> |
4497 | - <paraStyle name="Heading" fontName="Times-Roman" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
4498 | - <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> |
4499 | - <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> |
4500 | - <paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
4501 | - <paraStyle name="Index" fontName="Times-Roman"/> |
4502 | - <paraStyle name="Table Contents" fontName="Times-Roman"/> |
4503 | - <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/> |
4504 | - </stylesheet> |
4505 | - <images/> |
4506 | - |
4507 | - <story> |
4508 | - <blockTable colWidths="447.0,190.0,260.0" style="HEADERTABLE"> |
4509 | - <tr> |
4510 | - [[ setLang(l.ai_id.company_id.partner_id.lang) ]] |
4511 | - <td> |
4512 | - <para style="HEADERDOC">[[ company.partner_id.name ]] [[ company.partner_id.vat[2:] ]]</para> |
4513 | - <para style="HEADERDOC">[[ get_partner_addr() ]]</para> |
4514 | - </td> |
4515 | - <td> |
4516 | - <para style="HEADERDOC">Libro: Ventas </para> |
4517 | - <para style="HEADERDOC">Correspodiente al Mes de [[ get_month( data['form'] )[0] ]] del año [[ get_month( data['form'] )[1] ]]</para> |
4518 | - <para style="HEADERDOC">[[data['form'] and ('Desde: %s'%formatLang( data['form']['date_start'], date=True)) or '']]</para> |
4519 | - <para style="HEADERDOC">[[data['form'] and ('Hasta: %s'%formatLang( data['form']['date_end'], date=True)) or '']]</para> |
4520 | - </td> |
4521 | - <td> |
4522 | - <para style="HEADERDOC" fontName="Times-Roman">Según Articulo 77 del Reglamento de la Ley del IVA No. 5.363 del 12 de Julio de 1999</para> |
4523 | - </td> |
4524 | - </tr> |
4525 | - </blockTable> |
4526 | - <spacer length="2mm"/> |
4527 | - <!-- ****************************************--> |
4528 | - <!-- ********* SALE BOOK *********--> |
4529 | - <!-- ****************************************--> |
4530 | - |
4531 | - <section> |
4532 | - <blockTable colWidths="525.0,144.0,144.0" style="ENCANBEZADO_SINCOLUM_2"> |
4533 | - <tr> |
4534 | - <td></td> |
4535 | - <td vAlign="MIDDLE"><para style="HEADER">CONTRIBUYENTE</para></td> |
4536 | - <td vAlign="MIDDLE"><para style="HEADER">NO CONTRIBUYENTE</para></td> |
4537 | - </tr> |
4538 | - </blockTable> |
4539 | - </section> |
4540 | - <section> |
4541 | - <blockTable colWidths="1.0,15.0,25.0,16.0,35.0,128.0,31.0,36.0,30.0,30.0,36.0,36.0,20.0,33.0,33.0,33.0,37.0,25.0,25.0,119.0,25.0,119.0,35.0,40.0" style="ENCANBEZADO_SINCOLUM" repeatRows="1"> |
4542 | - <tr> |
4543 | - <td><para style="HEADER"></para></td> |
4544 | - <td><para style="HEADER">Linea</para></td> |
4545 | - <td><para style="HEADER">Fecha Doc.</para></td> |
4546 | - <td><para style="HEADER">T. Doc.</para></td> |
4547 | - <td><para style="HEADER">RIF</para></td> |
4548 | - <td><para style="HEADER">Nombre o Razon Social</para></td> |
4549 | - <td><para style="HEADER">Numero Doc.</para></td> |
4550 | - <td><para style="HEADER">Numero Control</para></td> |
4551 | - <td><para style="HEADER">Num de Factura Impresora Fiscal</para></td> |
4552 | - <td><para style="HEADER">Num. de Máquina Fiscal</para></td> |
4553 | - <td><para style="HEADER">Planilla Exportacion</para></td> |
4554 | - <td><para style="HEADER">Nro Expediente Exportacion</para></td> |
4555 | - <td><para style="HEADER">T. Trans.</para></td> |
4556 | - <td><para style="HEADER">Nota de Debito Afectada</para></td> |
4557 | - <td><para style="HEADER">Nota de Credito Afectada</para></td> |
4558 | - <td><para style="HEADER">Documento Afectado</para></td> |
4559 | - <td><para style="HEADER">Total con IVA</para></td> |
4560 | - <td><para style="HEADER">Ventas Export.</para></td> |
4561 | - <td><para style="HEADER">SDCF</para></td> |
4562 | - <td> |
4563 | - <section> |
4564 | - <blockTable colWidths="29.0,37.0,16.0,37.0" style="INTERNALTABLE"> |
4565 | - <tr> |
4566 | - <td><para style="HEADER">Exento</para></td> |
4567 | - <td><para style="HEADER">Base Imponible</para></td> |
4568 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
4569 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
4570 | - </tr> |
4571 | - </blockTable> |
4572 | - </section> |
4573 | - </td> |
4574 | - <td><para style="HEADER">SDCF</para></td> |
4575 | - <td> |
4576 | - <blockTable colWidths="29.0,37.0,16.0,37.0" style="INTERNALTABLE"> |
4577 | - <tr> |
4578 | - <td><para style="HEADER">Exento</para></td> |
4579 | - <td><para style="HEADER">Base Imponible</para></td> |
4580 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
4581 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
4582 | - </tr> |
4583 | - </blockTable> |
4584 | - </td> |
4585 | - <td><para style="HEADER">Retencion Iva</para></td> |
4586 | - <td><para style="HEADER">Comprobante</para></td> |
4587 | - </tr> |
4588 | - </blockTable> |
4589 | - </section> |
4590 | - |
4591 | - <!-- ************ WITHHOLDING VAT BOOK LINES************--> |
4592 | - <section> |
4593 | - <para>[[repeatIn( get_data_wh(data['form']),'wh')]]</para> |
4594 | - <blockTable colWidths="1.0,18.0,36.0,39.0,153.0,51.0,40.0,38.0,15.0,37.0,187.0,187.0,44.0,60.0" style="CONTENIDOTABLE_LINES" repeatRows="2"> |
4595 | - <tr> |
4596 | - [[ setLang(company.partner_id.lang) ]] |
4597 | - <td><para style="CONTENIDO"></para></td> |
4598 | - <td><para style="CONTENIDO">[[ get_id(data['form'],wh.id) ]]</para></td> |
4599 | - <td><para style="CONTENIDO">[[ time.strftime('%d/%m/%Y', time.strptime(wh.ar_date_ret, '%Y-%m-%d'))]]</para></td> |
4600 | - <td><para style="CONTENIDO">[[ wh.get_t_doc ]]</para></td> |
4601 | - <td><para style="CONTENIDO">[[ get_rif(wh.rp_vat) ]]</para></td> |
4602 | - <td><para style="CONTENIDOLEFT">[[ wh.rp_id.name ]]</para></td> |
4603 | - <td><para style="CONTENIDO">-----</para></td> |
4604 | - <td><para style="CONTENIDO">-----</para></td> |
4605 | - <td><para style="CONTENIDO">0.00</para></td> |
4606 | - <td><para style="CONTENIDO">-</para></td> |
4607 | - <td><para style="CONTENIDO">0.00</para></td> |
4608 | - <td><para style="CONTENIDO">SDCF</para></td> |
4609 | - <td> |
4610 | - <blockTable colWidths="29.0,37.0,16.0,37.0" style="INTERNALTABLE"> |
4611 | - <tr> |
4612 | - <td><para style="CONTENIDO">Exento</para></td> |
4613 | - <td><para style="CONTENIDO">0.00</para></td> |
4614 | - <td><para style="CONTENIDO">0.00</para></td> |
4615 | - <td><para style="CONTENIDO">0.00</para></td> |
4616 | - </tr> |
4617 | - </blockTable> |
4618 | - </td> |
4619 | - <td><para style="CONTENIDO">SDCF</para></td> |
4620 | - <td> |
4621 | - <section> |
4622 | - <blockTable colWidths="29.0,37.0,16.0,37.0" style="INTERNALTABLE"> |
4623 | - <tr> |
4624 | - <td><para style="CONTENIDO">Exento</para></td> |
4625 | - <td><para style="CONTENIDO">0.00</para></td> |
4626 | - <td><para style="CONTENIDO">0.00</para></td> |
4627 | - <td><para style="CONTENIDO">0.00</para></td> |
4628 | - </tr> |
4629 | - </blockTable> |
4630 | - </section> |
4631 | - </td> |
4632 | - <td><para style="CONTENIDO">[[ formatLang(get_amount_withheld(wh.ar_line_id.id)) or '' ]]</para></td> |
4633 | - <td><para style="CONTENIDO">[[ wh.ar_id.number ]]</para></td> |
4634 | - </tr> |
4635 | - </blockTable> |
4636 | - </section> |
4637 | - |
4638 | - <!-- ************ SALE BOOK LINES************--> |
4639 | - <section> |
4640 | - <para>[[repeatIn( get_data( data['form'] ),'l')]]</para> |
4641 | - <blockTable rowHeights="6.0" colWidths="1.0,15.0,25.0,16.0,35.0,128.0,31.0,36.0,30.0,30.0,36.0,36.0,20.0,33.0,33.0,33.0,37.0,25.0,25.0,119.0,25.0,119.0,35.0,40.0" style="CONTENIDOTABLE_LINES" repeatRows="2"> |
4642 | - <tr> |
4643 | - [[ setLang(l.ai_id.company_id.partner_id.lang) ]] |
4644 | - <td vAlign="MIDDLE"></td> |
4645 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ get_id(data['form'],l.id,'book') ]]</para></td> |
4646 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ time.strftime('%d/%m/%Y',time.strptime(l.get_date_invoice,'%Y-%m-%d')) ]]</para></td> |
4647 | - <td><para style="CONTENIDO">[[ l.get_t_doc ]]</para></td> |
4648 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_partner_vat ]]</para></td> |
4649 | - <td vAlign="MIDDLE"><para style="CONTENIDOLEFT">[[ l.get_partner_name ]]</para></td> |
4650 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_reference ]]</para></td> |
4651 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_number ]]</para></td> |
4652 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_invoice_printer ]]</para></td> |
4653 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_fiscal_printer ]]</para></td> |
4654 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_nro_inport_form ]]</para></td> |
4655 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_nro_inport_expe ]]</para></td> |
4656 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_papel_anulado ]]</para></td> |
4657 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_debit_affected ]]</para></td> |
4658 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_credit_affected ]]</para></td> |
4659 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ l.get_parent ]]</para></td> |
4660 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(l.get_total) ]]</para></td> |
4661 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(0.0) ]]</para></td> |
4662 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(l.get_vat_subjected and l.get_v_sdcf or 0.0) ]]</para></td> |
4663 | - <td> |
4664 | - <section> |
4665 | - <para>[[ repeatIn(l.get_taxes and l.get_taxes or [0.0],'s')]]</para> |
4666 | - <blockTable colWidths="29.0,37.0,16.0,37.0" style="INTERNALTABLE"> |
4667 | - <tr> |
4668 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(s.invoice_id.partner_id.vat_subjected and l.get_v_exent or 0.0) ]]</para></td> |
4669 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(s.invoice_id.partner_id.vat_subjected and get_tax_line(s) or 0.0) ]]</para></td> |
4670 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(s.invoice_id.partner_id.vat_subjected and round(s.tax_amount/(s.base_amount and s.base_amount or 1)*100.0) or 0.0) ]]</para></td> |
4671 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang(s.invoice_id.partner_id.vat_subjected and s.tax_amount or 0.0) ]]</para></td> |
4672 | - </tr> |
4673 | - </blockTable> |
4674 | - </section> |
4675 | - </td> |
4676 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang((not l.get_vat_subjected) and l.get_v_sdcf or 0.0) ]]</para></td> |
4677 | - <td> |
4678 | - <section> |
4679 | - <para>[[ repeatIn(l.get_taxes and l.get_taxes or [0.0],'t')]]</para> |
4680 | - <blockTable colWidths="29.0,37.0,16.0,37.0" style="INTERNALTABLE"> |
4681 | - <tr> |
4682 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not s.invoice_id.partner_id.vat_subjected) and l.get_v_exent or 0.0) ]]</para></td> |
4683 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not s.invoice_id.partner_id.vat_subjected) and get_tax_line(s) or 0.0) ]]</para></td> |
4684 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not s.invoice_id.partner_id.vat_subjected) and round(s.tax_amount/(s.base_amount and s.base_amount or 1)*100.0) or 0.0) ]]</para></td> |
4685 | - <td vAlign="MIDDLE"><para style="CONTENIDOINT">[[ formatLang((not s.invoice_id.partner_id.vat_subjected) and s.tax_amount or 0.0) ]]</para></td> |
4686 | - </tr> |
4687 | - </blockTable> |
4688 | - </section> |
4689 | - </td> |
4690 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ formatLang( get_amount_withheld(data['form'], l) ) ]]</para></td> |
4691 | - <td vAlign="MIDDLE"><para style="CONTENIDO">[[ get_ret(data['form'], l.id) ]]</para></td> |
4692 | - </tr> |
4693 | - </blockTable> |
4694 | - </section> |
4695 | - |
4696 | - |
4697 | - <!-- ************ TOTALS SALE PARCIALES************--> |
4698 | - <section> |
4699 | - |
4700 | - <blockTable colWidths="1.0,15.0,25.0,16.0,35.0,128.0,31.0,36.0,30.0,30.0,36.0,36.0,20.0,33.0,33.0,33.0,37.0,25.0,25.0,119.0,25.0,119.0,35.0,40.0" style="CONTENIDOTABLE_LINES" repeatRows="2"> |
4701 | - <tr> |
4702 | - [[ setLang(l.ai_id.company_id.partner_id.lang) ]] |
4703 | - <td></td> |
4704 | - <td></td> |
4705 | - <td></td> |
4706 | - <td></td> |
4707 | - <td></td> |
4708 | - <td><para style="HEADER">TOTALES</para></td> |
4709 | - <td></td> |
4710 | - <td></td> |
4711 | - <td></td> |
4712 | - <td></td> |
4713 | - <td></td> |
4714 | - <td></td> |
4715 | - <td></td> |
4716 | - <td></td> |
4717 | - <td></td> |
4718 | - <td></td> |
4719 | - <td><para style="HEADER">[[ formatLang(get_total_iva(data['form'])) ]]</para></td> |
4720 | - <td><para style="HEADER">[[ formatLang(0.0) ]]</para></td> |
4721 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'SDCF','nacional')[0])]]</para></td> |
4722 | - <td> |
4723 | - <blockTable colWidths="29.0,37.0,16.0,37.0" style="INTERNALTABLE"> |
4724 | - <tr> |
4725 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'], 'EXENTO', 'all', exempt=True)[0]) ]]</para></td> |
4726 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12','all', exempt=True)[0]+get_amount_untaxed_tax(data['form'],'8','all', exempt=True)[0]+get_amount_untaxed_tax(data['form'],'EXONERADO','all', exempt=True)[0]) ]]</para></td> |
4727 | - <td></td> |
4728 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12','all', exempt=True)[1] +get_amount_untaxed_tax(data['form'],'8','all', exempt=True)[1]+get_amount_untaxed_tax(data['form'],'EXONERADO','all', exempt=True)[1]) ]]</para></td> |
4729 | - </tr> |
4730 | - </blockTable> |
4731 | - </td> |
4732 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'SDCF','nacional')[0])]]</para></td> |
4733 | - <td> |
4734 | - <blockTable colWidths="29.0,37.0,16.0,37.0" style="INTERNALTABLE"> |
4735 | - <tr> |
4736 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'EXENTO','all', exempt=False)[0])]]</para></td> |
4737 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12','all', exempt=False)[0]+get_amount_untaxed_tax(data['form'],'8','all', exempt=False)[0]+get_amount_untaxed_tax(data['form'],'EXONERADO','all', exempt=False)[0]) ]]</para></td> |
4738 | - <td></td> |
4739 | - <td><para style="HEADER">[[ formatLang(get_amount_untaxed_tax(data['form'],'12','all', exempt=False)[1] +get_amount_untaxed_tax(data['form'],'8','all', exempt=False)[1]+get_amount_untaxed_tax(data['form'],'EXONERADO','all', exempt=False)[1]) ]]</para></td> |
4740 | - </tr> |
4741 | - </blockTable> |
4742 | - </td> |
4743 | - <td><para style="HEADER">[[ formatLang(get_total_wh(data['form'])) ]]</para></td> |
4744 | - <td></td> |
4745 | - </tr> |
4746 | - </blockTable> |
4747 | - </section> |
4748 | - |
4749 | - <!-- ************ LEYENDA************--> |
4750 | - <section> |
4751 | - <blockTable colWidths="794.0"> |
4752 | - <tr> |
4753 | - <td><para style="CONTENIDOLEFT">LEYENDA. F:Factura, ND:Nota de Débito, NC:Nota de Crédito, E:Expediente, A:Documento Anulado.</para></td> |
4754 | - </tr> |
4755 | - </blockTable> |
4756 | - </section> |
4757 | - |
4758 | - <spacer length='5mm'/> |
4759 | - |
4760 | - <!-- ************ TOTALS WHITHHOLDING***********--> |
4761 | - |
4762 | - <section> |
4763 | - [['.']] |
4764 | - <blockTable colWidths="70mm,40mm" style="TOTALS_TABLE" repeatRows="2"> |
4765 | - <tr> |
4766 | - <td><para style="HEADER">[['RESUMEN RETENCIONES']]</para></td> |
4767 | - <td><para style="HEADER">RET. DEBITO FISCAL</para></td> |
4768 | - </tr> |
4769 | - <tr> |
4770 | - <td><para style="CONTENIDOLEFT">[['RETENCIONES PERIODOS ANTERIORES']]</para></td> |
4771 | - <td><para style="CONTENIDO">[[ formatLang(get_total_wh(data['form'])-get_wh_actual(data['form'])) ]]</para></td> |
4772 | - </tr> |
4773 | - <tr> |
4774 | - <td><para style="CONTENIDOLEFT">[['RETENCIONES DEL PERIODO']]</para></td> |
4775 | - <td><para style="CONTENIDO">[[ formatLang(get_wh_actual(data['form'])) ]]</para></td> |
4776 | - </tr> |
4777 | - <tr> |
4778 | - <td><para style="CONTENIDOLEFT_BOLD">[['TOTAL RETENCIONES']]</para></td> |
4779 | - <td><para style="CONTENIDO">[[ formatLang(get_total_wh(data['form'])) ]]</para></td> |
4780 | - </tr> |
4781 | - </blockTable> |
4782 | - </section> |
4783 | - <spacer length='5mm'/> |
4784 | - |
4785 | - <!-- ************ TOTALS SALE BOOK************--> |
4786 | - |
4787 | - <section> |
4788 | - [[ setLang(l.ai_id.company_id.partner_id.lang) ]] |
4789 | - <blockTable colWidths="280.0,80.0,80.0" style="TOTALS_TABLE" repeatRows="2"> |
4790 | - <tr> |
4791 | - <td><para style="HEADER">RESUMEN</para></td> |
4792 | - <td><para style="HEADER">BASE IMPONIBLE</para></td> |
4793 | - <td><para style="HEADER">DEBITO FISCAL</para></td> |
4794 | - </tr> |
4795 | - <tr> |
4796 | - <td><para style="HEADERLEFT">VENTAS INTERNAS NO GRAVADAS</para></td> |
4797 | - <td><para style="HEADER">[[ formatLang(+get_amount_untaxed_tax(data['form'],'SDCF')[0]+get_amount_untaxed_tax(data['form'],'EXONERADO')[0]+get_amount_untaxed_tax(data['form'],'EXENTO')[0]) ]]</para></td> |
4798 | - <td><para style="HEADER">0.0</para></td> |
4799 | - </tr> |
4800 | - <tr> |
4801 | - <td><para style="HEADERLEFT">VENTAS INTERNAS GRAVADAS POR ALICUOTA GENERAL</para></td> |
4802 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'12','nacional')[0])]]</para></td> |
4803 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'12','nacional')[1])]]</para></td> |
4804 | - </tr> |
4805 | - <tr> |
4806 | - <td><para style="HEADERLEFT">VENTAS INTERNAS GRAVADAS POR ALICUOTA GENERAL MAS ALICUOTA ADICIONAL</para></td> |
4807 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'22','nacional')[0])]]</para></td> |
4808 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'22','nacional')[1])]]</para></td> |
4809 | - </tr> |
4810 | - <tr> |
4811 | - <td><para style="HEADERLEFT">VENTAS INTERNAS GRAVADAS POR ALICUOTA REDUCIDA</para></td> |
4812 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'8','nacional')[0])]]</para></td> |
4813 | - <td><para style="HEADER">[[formatLang(get_amount_untaxed_tax(data['form'],'8','nacional')[1])]]</para></td> |
4814 | - |
4815 | - </tr> |
4816 | - <tr> |
4817 | - <td><para style="CONTENIDOLEFT_BOLD">TOTAL VENTAS Y DEBITOS FISCAL PARA EFECTOS DE DETERMINACION</para></td> |
4818 | - <td><para style="HEADER"> |
4819 | -[[ formatLang(get_amount_untaxed_tax(data['form'],'SDCF','nacional')[0]+ |
4820 | -get_amount_untaxed_tax(data['form'],'SDCF')[0]+ |
4821 | -get_amount_untaxed_tax(data['form'],'EXONERADO')[0]+ |
4822 | -get_amount_untaxed_tax(data['form'],'12')[0]+ |
4823 | -get_amount_untaxed_tax(data['form'],'22')[0]+ |
4824 | -get_amount_untaxed_tax(data['form'],'8')[0])]] |
4825 | - </para></td> |
4826 | - <td><para style="HEADER"> |
4827 | -[[formatLang( |
4828 | -get_amount_untaxed_tax(data['form'],'12')[1]+ |
4829 | -get_amount_untaxed_tax(data['form'],'22')[1]+ |
4830 | -get_amount_untaxed_tax(data['form'],'8')[1] |
4831 | -)]] |
4832 | - </para></td> |
4833 | - </tr> |
4834 | - </blockTable> |
4835 | - </section> |
4836 | - |
4837 | -<blockTable colWidths="110.0" style="INTERNALTABLE"> |
4838 | - <tr><td vAlign="MIDDLE"><para>[[ validation(data['form']) and '.' or removeParentNode('blockTable') ]]</para><nextPage/></td></tr> |
4839 | -</blockTable> |
4840 | - |
4841 | - |
4842 | - <spacer length='5mm'/> |
4843 | - <!-- ****************************************--> |
4844 | - <!-- ************ AJUSTMENT BOOK ************--> |
4845 | - <!-- ****************************************--> |
4846 | - <section> |
4847 | - <blockTable colWidths="795.0" style="HEADERTABLE_AD"> |
4848 | - <tr><td><para></para></td></tr> |
4849 | - <tr><td><para></para></td></tr> |
4850 | - <tr> |
4851 | - <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4852 | - <td><para style="TITULO_AJUSTE">LIBRO DE AJUSTES</para></td></tr> |
4853 | - <tr><td><para></para></td></tr> |
4854 | - </blockTable> |
4855 | - </section> |
4856 | - |
4857 | - |
4858 | - <section> |
4859 | - <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4860 | - <blockTable colWidths="1.0,33.0,37.0,175.0,53.0,34.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0" style="ENCANBEZADO_SINCOLUM" repeatRows="2"> |
4861 | - <tr> |
4862 | - <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4863 | - <td></td> |
4864 | - <td></td> |
4865 | - <td></td> |
4866 | - <td></td> |
4867 | - <td></td> |
4868 | - <td></td> |
4869 | - <td></td> |
4870 | - <td></td> |
4871 | - <td></td> |
4872 | - <td></td> |
4873 | - <td> |
4874 | - <blockTable colWidths="110.0" style="INTERNALTABLE"> |
4875 | - <tr><td vAlign="MIDDLE"><para style="HEADER">Operaciones Nacionales</para></td></tr> |
4876 | - </blockTable> |
4877 | - </td> |
4878 | - <td> |
4879 | - <blockTable colWidths="110.0" style="INTERNALTABLE"> |
4880 | - <tr><td vAlign="MIDDLE"><para style="HEADER">Operaciones Internacionales</para></td></tr> |
4881 | - </blockTable> |
4882 | - </td> |
4883 | - <td></td><td></td> |
4884 | - </tr> |
4885 | - <tr> |
4886 | - <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4887 | - <td><para style="HEADER"></para></td> |
4888 | - <td><para style="HEADER">Fecha Cont.</para></td> |
4889 | - <td><para style="HEADER">RIF</para></td> |
4890 | - <td><para style="HEADER">Razon Social</para></td> |
4891 | - <td><para style="HEADER">Numero Doc.</para></td> |
4892 | - <td><para style="HEADER">Numero Control</para></td> |
4893 | - <td><para style="HEADER">Total con IVA</para></td> |
4894 | - <td><para style="HEADER">Tipo Doc.</para></td> |
4895 | - <td><para style="HEADER">Documento Afectado</para></td> |
4896 | - <td><para style="HEADER">Sin derecho a Credito Fiscal</para></td> |
4897 | - <td> |
4898 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4899 | - <tr> |
4900 | - <td><para style="HEADER">Base Imponible</para></td> |
4901 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
4902 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
4903 | - </tr> |
4904 | - </blockTable> |
4905 | - </td> |
4906 | - <td> |
4907 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4908 | - <tr> |
4909 | - <td><para style="HEADER">Base Imponible</para></td> |
4910 | - <td><para style="HEADER">%</para><para style="HEADER">IVA</para></td> |
4911 | - <td><para style="HEADER">Monto</para><para style="HEADER">Impuesto</para></td> |
4912 | - </tr> |
4913 | - </blockTable> |
4914 | - </td> |
4915 | - <td><para style="HEADER">Retencion IVA</para></td> |
4916 | - <td><para style="HEADER">Comprobante</para></td> |
4917 | - </tr> |
4918 | - </blockTable> |
4919 | - </section> |
4920 | - |
4921 | - <section> |
4922 | - <para>[[ repeatIn(validation(data['form']) and get_data_adjustment(data['form'])[1] or [],'a')]]</para> |
4923 | - <blockTable colWidths="1.0,33.0,37.0,175.0,53.0,34.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0" style="CONTENIDOTABLE_LINES" repeatRows="2"> |
4924 | - <tr> |
4925 | - <para>[[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4926 | - [[ setLang(l.ai_id.company_id.partner_id.lang) ]] |
4927 | - <td><para style="CONTENIDO"></para></td> |
4928 | - <td><para style="CONTENIDO">[[ time.strftime('%d/%m/%Y', time.strptime(a.date_accounting, '%Y-%m-%d'))]]</para></td> |
4929 | - <td><para style="CONTENIDO">[[ a.vat ]]</para></td> |
4930 | - <td><para style="CONTENIDOLEFT">[[ a.partner ]]</para></td> |
4931 | - <td><para style="CONTENIDO">[[ a.invoice_number ]]</para></td> |
4932 | - <td><para style="CONTENIDO">[[ a.control_number ]]</para></td> |
4933 | - <td><para style="CONTENIDO">[[ formatLang(a.amount) ]]</para></td> |
4934 | - <td><para style="CONTENIDO">[[ a.type_doc ]]</para></td> |
4935 | - <td><para style="CONTENIDO">[[ a.doc_affected ]]</para></td> |
4936 | - <td><para style="CONTENIDO">[[ a.uncredit_fiscal ]]</para></td> |
4937 | - <td> |
4938 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4939 | - <tr> |
4940 | - <td><para style="CONTENIDOINT">[[ formatLang(a.amount_untaxed_n) ]]</para></td> |
4941 | - <td><para style="CONTENIDOINT">[[ formatLang(a.percent_with_vat_n) ]]</para></td> |
4942 | - <td><para style="CONTENIDOINT">[[ formatLang(a.amount_with_vat_n) ]]</para></td> |
4943 | - </tr> |
4944 | - </blockTable> |
4945 | - </td> |
4946 | - <td> |
4947 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4948 | - <tr> |
4949 | - <td><para style="CONTENIDOINT">[[ formatLang(a.amount_untaxed_i) ]]</para></td> |
4950 | - <td><para style="CONTENIDOINT">[[ formatLang(a.percent_with_vat_i) ]]</para></td> |
4951 | - <td><para style="CONTENIDOINT">[[ formatLang(a.amount_with_vat_i) ]]</para></td> |
4952 | - </tr> |
4953 | - </blockTable> |
4954 | - </td> |
4955 | - <td><para style="CONTENIDO">[[ formatLang(a.amount_with_vat) ]]</para></td> |
4956 | - <td><para style="CONTENIDO">[[ a.voucher ]]</para></td> |
4957 | - </tr> |
4958 | - </blockTable> |
4959 | - </section> |
4960 | - |
4961 | - <section> |
4962 | - <para>[[repeatIn( get_data_adjustment( data['form'] )[0],'al')]]</para> |
4963 | - <blockTable colWidths="1.0,33.0,37.0,175.0,53.0,34.0,38.0,15.0,38.0,34.0,114.0,114.0,44.0,50.0" style="CONTENIDOTABLE_LINES" repeatRows="2"> |
4964 | - <tr> |
4965 | - <para> |
4966 | - [[ validation(data['form']) and '.' or removeParentNode('blockTable')]]</para> |
4967 | - [[ setLang(company.partner_id.lang) ]] |
4968 | - <td></td><td></td><td></td> |
4969 | - <td></td><td></td><td></td> |
4970 | - <td><para style="CONTENIDOINT">[[ formatLang(al.amount_total) ]]</para></td> |
4971 | - <td></td><td></td> |
4972 | - <td><para style="CONTENIDOINT">[[ formatLang(al.uncredit_fiscal_total) ]]</para></td> |
4973 | - <td> |
4974 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4975 | - <tr> |
4976 | - <td><para style="CONTENIDOINT">[[ formatLang(al.amount_untaxed_n_total) ]]</para></td> |
4977 | - <td></td> |
4978 | - <td><para style="CONTENIDOINT">[[ formatLang(al.amount_with_vat_n_total) ]]</para></td> |
4979 | - </tr> |
4980 | - </blockTable> |
4981 | - </td> |
4982 | - <td> |
4983 | - <blockTable colWidths="40.0,30.0,40.0" style="INTERNALTABLE"> |
4984 | - <tr> |
4985 | - <td><para style="CONTENIDOINT">[[ formatLang(al.amount_untaxed_i_total) ]]</para></td> |
4986 | - <td></td> |
4987 | - <td><para style="CONTENIDOINT">[[ formatLang(al.amount_with_vat_i_total) ]]</para></td> |
4988 | - </tr> |
4989 | - </blockTable> |
4990 | - </td> |
4991 | - <td><para style="CONTENIDO">[[ formatLang(al.amount_with_vat_total) ]]</para></td> |
4992 | - <td></td> |
4993 | - </tr> |
4994 | - </blockTable> |
4995 | - </section> |
4996 | - |
4997 | - |
4998 | - <spacer length='5mm'/> |
4999 | - <!-- ************ TOTALES ADJUSTMENT BOOK************--> |
5000 | - <section> |
The diff has been truncated for viewing.