|
@@ -29,74 +29,97 @@
|
|
|
<template id="report_factura_conecta5">
|
|
<template id="report_factura_conecta5">
|
|
|
<t t-call="report.html_container">
|
|
<t t-call="report.html_container">
|
|
|
<t t-foreach="docs" t-as="o">
|
|
<t t-foreach="docs" t-as="o">
|
|
|
- <div class="page" style="width:35cm; height:23cm; margin:0; padding:0; font-size:11px;">
|
|
|
|
|
|
|
+ <div class="page" style="width:35cm; height:23cm; margin:0; padding:0; font-size:10px; font-family:Arial, Helvetica, sans-serif;">
|
|
|
|
|
|
|
|
- <!-- Tres copias en una hoja (Original / Duplicado / Triplicado preimpresos) -->
|
|
|
|
|
|
|
+ <!-- 3 copias una debajo de otra -->
|
|
|
<t t-foreach="[1,2,3]" t-as="i">
|
|
<t t-foreach="[1,2,3]" t-as="i">
|
|
|
- <div style="height:7.5cm; position:relative; border:none; padding:0 0.3cm 0 0.3cm;">
|
|
|
|
|
|
|
+ <div style="height:7.5cm; position:relative; border:none;">
|
|
|
|
|
|
|
|
- <!-- Datos principales -->
|
|
|
|
|
- <div style="position:absolute; top:0.5cm; left:1cm; font-size:10px;">
|
|
|
|
|
- <span t-esc="o.date_invoice or ''"/>
|
|
|
|
|
|
|
+ <!-- Fecha de emisión -->
|
|
|
|
|
+ <div style="position:absolute; top:0.5cm; left:9cm;">
|
|
|
|
|
+ <span t-field="o.date_invoice" t-field-options='{"format": "dd/MM/yyyy"}'/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div style="position:absolute; top:1.2cm; left:1cm; font-size:10px;">
|
|
|
|
|
- <span t-esc="o.partner_id.name or ''"/>
|
|
|
|
|
|
|
+ <!-- Condición de venta -->
|
|
|
|
|
+ <div style="position:absolute; top:0.5cm; left:18cm;">
|
|
|
|
|
+ <t t-if="o.contado">X</t>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <div style="position:absolute; top:1.8cm; left:1cm; font-size:10px;">
|
|
|
|
|
- <span t-esc="o.partner_id.street or ''"/>
|
|
|
|
|
|
|
+ <div style="position:absolute; top:0.5cm; left:19.3cm;">
|
|
|
|
|
+ <t t-if="o.credito">X</t>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div style="position:absolute; top:2.4cm; left:1cm; font-size:10px;">
|
|
|
|
|
- <span t-esc="o.partner_id.vat or ''"/>
|
|
|
|
|
|
|
+ <!-- Razón social -->
|
|
|
|
|
+ <div style="position:absolute; top:1.2cm; left:2cm;">
|
|
|
|
|
+ <span t-field="o.partner_id.name"/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div style="position:absolute; top:2.4cm; left:13.5cm; font-size:10px;">
|
|
|
|
|
- <span t-esc="o.number or ''"/>
|
|
|
|
|
|
|
+ <!-- RUC -->
|
|
|
|
|
+ <div style="position:absolute; top:1.8cm; left:2cm;">
|
|
|
|
|
+ <span t-field="o.partner_id.vat"/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div style="position:absolute; top:3cm; left:1cm; font-size:10px;">
|
|
|
|
|
- <span t-esc="o.payment_term.name if o.payment_term else ''"/>
|
|
|
|
|
|
|
+ <!-- Dirección -->
|
|
|
|
|
+ <div style="position:absolute; top:2.4cm; left:2cm;">
|
|
|
|
|
+ <span t-field="o.partner_id.street"/>
|
|
|
|
|
+ <span t-field="o.partner_id.street2"/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div style="position:absolute; top:3cm; left:9cm; font-size:10px;">
|
|
|
|
|
- <span t-esc="o.partner_id.phone or ''"/>
|
|
|
|
|
|
|
+ <!-- Teléfono -->
|
|
|
|
|
+ <div style="position:absolute; top:2.4cm; left:13cm;">
|
|
|
|
|
+ <span t-field="o.partner_id.phone"/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <!-- Líneas de factura -->
|
|
|
|
|
- <div style="position:absolute; top:3.8cm; left:0.8cm; width:33cm; font-size:10px;">
|
|
|
|
|
- <t t-foreach="o.invoice_line" t-as="line">
|
|
|
|
|
- <div style="display:flex; width:100%; margin-bottom:0.05cm;">
|
|
|
|
|
- <div style="width:10%; text-align:center;"><span t-esc="line.quantity"/></div>
|
|
|
|
|
- <div style="width:52%;"><span t-esc="line.name"/></div>
|
|
|
|
|
- <div style="width:12%; text-align:right;"><span t-esc="line.price_unit"/></div>
|
|
|
|
|
- <div style="width:8%; text-align:right;">
|
|
|
|
|
- <t t-if="line.invoice_line_tax_id and line.invoice_line_tax_id[0].amount == 0">
|
|
|
|
|
- <span t-esc="line.price_subtotal"/>
|
|
|
|
|
|
|
+ <!-- Tabla de líneas -->
|
|
|
|
|
+ <div style="position:absolute; top:3.3cm; left:1cm; width:33cm;">
|
|
|
|
|
+ <t t-foreach="o.invoice_line" t-as="l">
|
|
|
|
|
+ <div style="display:flex; width:100%; font-size:10px; line-height:0.5cm;">
|
|
|
|
|
+ <div style="width:1cm; text-align:center;">
|
|
|
|
|
+ <span t-esc="'{0:,.2f}'.format(l.quantity)"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="width:14cm; padding-left:0.3cm;">
|
|
|
|
|
+ <span t-field="l.product_id.name"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="width:2.3cm; text-align:right;">
|
|
|
|
|
+ <span t-esc="'{0:,.0f}'.format(l.price_unit)"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="width:2.2cm; text-align:right;">
|
|
|
|
|
+ <t t-if="l.invoice_line_tax_id and l.invoice_line_tax_id[0].amount == 0">
|
|
|
|
|
+ <span t-esc="'{0:,.0f}'.format(l.price_subtotal)"/>
|
|
|
</t>
|
|
</t>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="width:8%; text-align:right;">
|
|
|
|
|
- <t t-if="any(t.amount==5 for t in line.invoice_line_tax_id)">
|
|
|
|
|
- <span t-esc="line.price_subtotal"/>
|
|
|
|
|
|
|
+ <div style="width:2.2cm; text-align:right;">
|
|
|
|
|
+ <t t-if="any(t.amount==5 for t in l.invoice_line_tax_id)">
|
|
|
|
|
+ <span t-esc="'{0:,.0f}'.format(l.price_subtotal)"/>
|
|
|
</t>
|
|
</t>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="width:8%; text-align:right;">
|
|
|
|
|
- <t t-if="any(t.amount==10 for t in line.invoice_line_tax_id)">
|
|
|
|
|
- <span t-esc="line.price_subtotal"/>
|
|
|
|
|
|
|
+ <div style="width:2.2cm; text-align:right;">
|
|
|
|
|
+ <t t-if="any(t.amount==10 for t in l.invoice_line_tax_id)">
|
|
|
|
|
+ <span t-esc="'{0:,.0f}'.format(l.price_subtotal)"/>
|
|
|
</t>
|
|
</t>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</t>
|
|
</t>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <!-- Totales -->
|
|
|
|
|
- <div style="position:absolute; top:6.5cm; left:1cm; font-size:10px;">
|
|
|
|
|
- <span t-esc="o.amount_total_text or ''"/>
|
|
|
|
|
|
|
+ <!-- Subtotales e IVA -->
|
|
|
|
|
+ <div class="subtotal_10" style="position:absolute; top:6.2cm; right:5cm; text-align:right;">
|
|
|
|
|
+ <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="total_pagar_data" style="position:absolute; top:6.5cm; left:1cm;">
|
|
|
|
|
+ <span t-esc="convertir(o.amount_total, o.currency_id.en_letras)"/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div style="position:absolute; top:6.5cm; right:3cm; text-align:right; font-size:10px;">
|
|
|
|
|
- <span t-esc="o.amount_total or ''"/>
|
|
|
|
|
|
|
+ <div class="total_pagar" style="position:absolute; top:6.5cm; right:5cm; text-align:right;">
|
|
|
|
|
+ <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="iva_10_data" style="position:absolute; top:7cm; left:25cm; text-align:right;">
|
|
|
|
|
+ <span t-esc="'{0:,.0f}'.format(o.amount_tax)"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="iva_total_data" style="position:absolute; top:7cm; left:29cm; text-align:right;">
|
|
|
|
|
+ <span t-esc="'{0:,.0f}'.format(o.amount_tax)"/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -107,5 +130,6 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
</data>
|
|
</data>
|
|
|
</openerp>
|
|
</openerp>
|