|
36 | 36 | <span t-field="o.invoice_date"/>
|
37 | 37 | </span>
|
38 | 38 | <br/>
|
39 |
| - <span t-if="o.invoice_date_due and o.move_type == 'out_invoice' and o.state == 'posted' and not ecf_representation"> |
| 39 | + <span |
| 40 | + t-if="o.invoice_date_due and o.move_type == 'out_invoice' and o.state == 'posted'"> |
40 | 41 | <strong>Vence:</strong>
|
41 | 42 | <span t-field="o.invoice_date_due"/>
|
42 | 43 | </span>
|
|
47 | 48 | <h2>
|
48 | 49 | <span t-field="o.l10n_latam_document_type_id.report_name"/>
|
49 | 50 | </h2>
|
50 |
| - <strong t-if="o.l10n_do_fiscal_number"> |
51 |
| - <t t-if="ecf_representation">e-NCF:</t> |
52 |
| - <t t-else="">NCF:</t> |
| 51 | + <strong t-if="o.l10n_latam_document_number"> |
| 52 | + <t>NCF:</t> |
53 | 53 | </strong>
|
54 |
| - <span t-field="o.l10n_do_fiscal_number"/> |
| 54 | + <span t-field="o.l10n_latam_document_number"/> |
55 | 55 | <br/>
|
56 |
| - <span t-if="(o.move_type == 'out_refund' or o.move_type == 'in_refund' or o.debit_origin_id) and (o.l10n_do_origin_ncf != False)"> |
| 56 | + <span |
| 57 | + t-if="(o.move_type == 'out_refund' or o.move_type == 'in_refund' or o.debit_origin_id) and o.reversed_entry_id"> |
57 | 58 | <strong>NCF modificado:</strong>
|
58 |
| - <span t-field="o.l10n_do_origin_ncf"/> |
59 |
| - <t t-if="ecf_representation"> |
60 |
| - <br/> |
61 |
| - <strong>Código Modificación:</strong> |
62 |
| - <span t-field="o.l10n_do_ecf_modification_code"/> |
63 |
| - </t> |
| 59 | + <span t-field="o.reversed_entry_id.l10n_latam_document_number"/> |
64 | 60 | <br/>
|
65 | 61 | </span>
|
66 | 62 | <span id="fiscal_exp_date"
|
67 | 63 | t-if="o.l10n_latam_use_documents
|
68 |
| - and o.move_type in ['out_invoice', 'out_refund'] |
| 64 | + and o.is_sale_document() |
69 | 65 | and o.state == 'posted'
|
70 |
| - and o.l10n_do_fiscal_number |
| 66 | + and o.l10n_latam_document_number |
71 | 67 | and o.l10n_latam_document_type_id
|
72 | 68 | and o.l10n_latam_document_type_id.doc_code_prefix[1:] not in ('32', '34', '02')">
|
73 |
| - <strong> |
74 |
| - <t t-if="ecf_representation">Vencimiento e-NCF:</t> |
75 |
| - <t t-else="">Válida hasta:</t> |
76 |
| - </strong> |
77 | 69 | <span id="ecf_exp_date"
|
78 | 70 | t-field="o.l10n_do_ncf_expiration_date"/>
|
79 | 71 | </span>
|
|
89 | 81 | <t t-elif="vat_len == 11">Cédula:</t>
|
90 | 82 | <t t-else="">ID Cliente:</t>
|
91 | 83 | </strong>
|
92 |
| - <span class="m-0" t-esc="o.commercial_partner_id.vat or ''"/> |
| 84 | + <span class="m-0" t-out="o.commercial_partner_id.vat or ''"/> |
93 | 85 | <br/>
|
94 | 86 | <strong>
|
95 | 87 | <t t-if="vat_len == 9">Razón Social:</t>
|
|
154 | 146 | <t t-foreach="tax_totals['subtotals']" t-as="subtotal">
|
155 | 147 | <tr class="border-black o_subtotal">
|
156 | 148 | <td>
|
157 |
| - <strong t-esc="subtotal['name']"/> |
| 149 | + <strong t-out="subtotal['name']"/> |
158 | 150 | </td>
|
159 | 151 |
|
160 | 152 | <td class="text-right">
|
161 | 153 | <span
|
162 | 154 | t-att-class="oe_subtotal_footer_separator"
|
163 |
| - t-esc="subtotal['formatted_amount']" |
| 155 | + t-out="subtotal['formatted_amount']" |
164 | 156 | />
|
165 | 157 | </td>
|
166 | 158 | </tr>
|
|
174 | 166 | <t>
|
175 | 167 | <td>
|
176 | 168 | <span class="text-nowrap"
|
177 |
| - t-esc="tax_aml.tax_line_id.description"/> |
| 169 | + t-out="tax_aml.tax_line_id.invoice_label"/> |
178 | 170 | </td>
|
179 | 171 | <td class="text-right o_price_total">
|
180 |
| - <span class="text-nowrap" t-esc="l10n_do_tax_amount" |
| 172 | + <span class="text-nowrap" t-out="l10n_do_tax_amount" |
181 | 173 | t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
182 | 174 | </td>
|
183 | 175 | </t>
|
184 | 176 | </tr>
|
185 | 177 | </t>
|
186 | 178 |
|
187 |
| - <t t-set="total_amount_taxed" t-value="l10n_do_amounts['itbis_taxable_amount']"/> |
188 |
| - <t t-set="total_exempt_amount" t-value="l10n_do_amounts['itbis_exempt_amount']"/> |
| 179 | + <t t-set="total_amount_taxed" |
| 180 | + t-value="l10n_do_amounts['itbis_taxable_amount']"/> |
| 181 | + <t t-set="total_exempt_amount" |
| 182 | + t-value="l10n_do_amounts['itbis_exempt_amount']"/> |
189 | 183 |
|
190 | 184 | <tr class="border-black o_total" t-if="ecf_representation">
|
191 | 185 | <td>Monto Gravado</td>
|
192 | 186 | <td class="text-right o_price_total">
|
193 | 187 | <!-- MontoGravadoTotal consiste en la suma de la base imponible de todas las lineas gravadas con ITBIS -->
|
194 | 188 | <span class="text-nowrap"
|
195 | 189 | t-options='{"widget": "monetary", "display_currency": o.currency_id}'
|
196 |
| - t-esc="total_amount_taxed"/> |
| 190 | + t-out="total_amount_taxed"/> |
197 | 191 | </td>
|
198 | 192 | </tr>
|
199 | 193 | <tr t-if="ecf_representation">
|
|
202 | 196 | <!-- MontoExento consiste en la suma de la base imponible de todas las lineas exentas -->
|
203 | 197 | <span class="text-nowrap"
|
204 | 198 | t-options='{"widget": "monetary", "display_currency": o.currency_id}'
|
205 |
| - t-esc="total_exempt_amount"/> |
| 199 | + t-out="total_exempt_amount"/> |
206 | 200 | </td>
|
207 | 201 | </tr>
|
208 | 202 |
|
|
214 | 208 |
|
215 | 209 | <t t-set="l10n_do_amount_total" t-value="l10n_do_amounts['invoice_total']"/>
|
216 | 210 | <td class="text-right">
|
217 |
| - <span class="text-nowrap" t-esc="l10n_do_amount_total" |
| 211 | + <span class="text-nowrap" t-out="l10n_do_amount_total" |
218 | 212 | t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
219 | 213 | </td>
|
220 | 214 | </tr>
|
|
227 | 221 | <t>
|
228 | 222 | <td>
|
229 | 223 | <span class="text-nowrap"
|
230 |
| - t-esc="tax_aml.tax_line_id.description"/> |
| 224 | + t-out="tax_aml.tax_line_id.invoice_label"/> |
231 | 225 | </td>
|
232 | 226 | <td class="text-right o_price_total">
|
233 |
| - <span class="text-nowrap" t-esc="l10n_do_wh_amount" |
| 227 | + <span class="text-nowrap" t-out="l10n_do_wh_amount" |
234 | 228 | t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
235 | 229 | </td>
|
236 | 230 | </t>
|
|
239 | 233 |
|
240 | 234 | </template>
|
241 | 235 |
|
242 |
| - <template id="report_invoice_document_inherited" |
243 |
| - inherit_id="account.report_invoice_document" primary="True"> |
| 236 | + <template id="report_invoice_document" inherit_id="account.report_invoice_document" |
| 237 | + primary="True"> |
244 | 238 |
|
245 | 239 | <t t-set="o" position="after">
|
246 |
| - <t t-set="custom_header" t-value="'l10n_do_accounting.custom_header'"/> |
247 |
| - <t t-set="ecf_representation" t-value="o.is_ecf_invoice"/> |
| 240 | + <t t-set="custom_header" t-value="'l10n_do.custom_header'"/> |
248 | 241 | <t t-set="is_l10n_do_invoice"
|
249 | 242 | t-value="o.l10n_latam_use_documents and o.company_id.country_id and o.country_code == 'DO'"/>
|
250 | 243 | </t>
|
|
254 | 247 |
|
255 | 248 | <!-- replace information section and use dominican style -->
|
256 | 249 | <div id="informations" position="replace">
|
257 |
| - <t t-call="l10n_do_accounting.informations"/> |
| 250 | + <t t-call="l10n_do.informations"/> |
258 | 251 | </div>
|
259 | 252 |
|
260 | 253 | <xpath
|
|
269 | 262 |
|
270 | 263 | <xpath expr="//div[@id='total']/.." position="after">
|
271 | 264 | <div class="row">
|
272 |
| - <div class="col-6" |
273 |
| - style="display: inline-block; float: left; font-size:11px;"> |
274 |
| - <t t-if="o.l10n_do_electronic_stamp"> |
275 |
| - <div> |
276 |
| - <img t-att-src="'/report/barcode/?type=QR&width=100&height=100&value=' + o.l10n_do_electronic_stamp if o.l10n_do_electronic_stamp else ''"/> |
277 |
| - </div> |
278 |
| - <t t-if="o.l10n_do_ecf_security_code"> |
279 |
| - <strong>Código de Seguridad:</strong> |
280 |
| - <span t-esc="o.l10n_do_ecf_security_code"/> |
281 |
| - </t> |
282 |
| - <br/> |
283 |
| - <t t-if="o.l10n_do_ecf_sign_date"> |
284 |
| - <strong>Fecha Firma Digital:</strong> |
285 |
| - <span |
286 |
| - t-esc="context_timestamp(o.l10n_do_ecf_sign_date).strftime('%d-%m-%Y')"/> |
287 |
| - </t> |
288 |
| - </t> |
289 |
| - </div> |
290 | 265 | <div t-if="is_l10n_do_invoice" class="text-muted text-right col-6"
|
291 | 266 | style="float: right;">
|
292 | 267 | <span>
|
|
319 | 294 | t-value="line.price_unit * (1 - (line.discount / 100.0))"/>
|
320 | 295 | <t t-set="discount_amount"
|
321 | 296 | t-value="abs(price_unit_wo_discount) if line.discount else 0"/>
|
322 |
| - <span class="text-nowrap" t-esc="discount_amount" |
| 297 | + <span class="text-nowrap" t-out="discount_amount" |
323 | 298 | t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
324 | 299 | </td>
|
325 | 300 | </xpath>
|
326 |
| - <xpath expr="//span[@id='line_tax_ids']" position="attributes"> |
327 |
| - <attribute name="t-esc"> |
328 |
| - ', '.join(map(lambda x: (x.description or x.name), line.tax_ids)) if not ecf_representation else '%s %s' % (o.currency_id.symbol, '{0:,.2f}'.format(line.l10n_do_itbis_amount)) |
329 |
| - </attribute> |
330 |
| - </xpath> |
331 | 301 |
|
332 |
| - <xpath expr="//div[@id='total']/div/table/t[@t-call='account.document_tax_totals']" |
333 |
| - position="replace"> |
334 |
| - <t t-call="l10n_do_accounting.document_tax_totals"/> |
335 |
| - </xpath> |
| 302 | + <!--<xpath |
| 303 | + expr="//div[@id='total']/div/table/t[@t-call='account.document_tax_totals']" |
| 304 | + position="replace"> |
| 305 | + <t t-call="l10n_do.document_tax_totals"/> |
| 306 | + </xpath>--> |
| 307 | + <t t-call="account.document_tax_totals" position="attributes"> |
| 308 | + <attribute name="t-call">l10n_do.document_tax_totals</attribute> |
| 309 | + </t> |
336 | 310 |
|
337 | 311 | </template>
|
338 | 312 |
|
339 | 313 | <template id="report_invoice" inherit_id="account.report_invoice">
|
340 | 314 | <xpath expr='//t[@t-call="account.report_invoice_document"]' position="after">
|
341 |
| - <t t-if="o._get_name_invoice_report() == 'l10n_do_accounting.report_invoice_document_inherited'" |
342 |
| - t-call="l10n_do_accounting.report_invoice_document_inherited" |
343 |
| - t-lang="lang"/> |
| 315 | + <t t-if="o._get_name_invoice_report() == 'l10n_do.report_invoice_document'" |
| 316 | + t-call="l10n_do.report_invoice_document" t-lang="lang"/> |
344 | 317 | </xpath>
|
345 | 318 | </template>
|
346 | 319 |
|
347 | 320 | <template id="report_invoice_with_payments"
|
348 | 321 | inherit_id="account.report_invoice_with_payments">
|
349 | 322 | <xpath expr='//t[@t-call="account.report_invoice_document"]' position="after">
|
350 |
| - <t t-if="o._get_name_invoice_report() == 'l10n_do.report_invoice_document_inherited'" |
351 |
| - t-call="l10n_do.report_invoice_document_inherited" |
352 |
| - t-lang="lang"/> |
| 323 | + <t t-if="o._get_name_invoice_report() == 'l10n_do.report_invoice_document'" |
| 324 | + t-call="l10n_do.report_invoice_document" t-lang="lang"/> |
353 | 325 | </xpath>
|
354 | 326 | </template>
|
355 | 327 |
|
|
0 commit comments