|
|
@@ -28,191 +28,84 @@
|
|
|
<!-- Reporte principal -->
|
|
|
<template id="report_factura_conecta5">
|
|
|
<t t-call="report.html_container">
|
|
|
- <t t-call="report.external_layout">
|
|
|
-
|
|
|
- <t t-foreach="docs" t-as="o">
|
|
|
- <div class="page" style="width:35cm; height:23cm;">
|
|
|
-
|
|
|
- <style type="text/css">
|
|
|
- body{
|
|
|
- font-size: 2.67mm;
|
|
|
- font-family: Arial, Helvetica, sans-serif;
|
|
|
- }
|
|
|
- .copia {
|
|
|
- width: 100%;
|
|
|
- height: 7.6cm; /* 23 / 3 = 7.6 cm aprox. */
|
|
|
- border-bottom: 1px dashed #000;
|
|
|
- position: relative;
|
|
|
- padding-top: 0.2cm;
|
|
|
- page-break-inside: avoid;
|
|
|
- }
|
|
|
- .titulo-copia {
|
|
|
- text-align: right;
|
|
|
- font-weight: bold;
|
|
|
- font-size: 3mm;
|
|
|
- position: absolute;
|
|
|
- right: 0.5cm;
|
|
|
- top: 0.2cm;
|
|
|
- }
|
|
|
- .pagina {
|
|
|
- width: 33cm;
|
|
|
- margin-left: 1cm;
|
|
|
- }
|
|
|
- .logo{
|
|
|
- height: 2.3cm;
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
- .fecha_emision_data{
|
|
|
- width: 13.1cm;
|
|
|
- padding-left: 8.9cm;
|
|
|
- float: left;
|
|
|
- min-height: 0.6cm;
|
|
|
- }
|
|
|
- .contado_x{
|
|
|
- width: 0.4cm;
|
|
|
- float: left;
|
|
|
- }
|
|
|
- .credito_x{
|
|
|
- width: 0.3cm;
|
|
|
- float: left;
|
|
|
- padding-left: 0.8cm;
|
|
|
- }
|
|
|
- .razon_data{
|
|
|
- width: 15cm;
|
|
|
- float: left;
|
|
|
- padding-left: 9.9cm;
|
|
|
- min-height: 0.5cm;
|
|
|
- }
|
|
|
- .direccion_data{
|
|
|
- width: 15.5cm;
|
|
|
- float: left;
|
|
|
- padding-left: 9.7cm;
|
|
|
- min-height: 0.5cm;
|
|
|
- }
|
|
|
- .ruc_data{
|
|
|
- width: 11.9cm;
|
|
|
- float: left;
|
|
|
- padding-left: 9.1cm;
|
|
|
- min-height: 0.4cm;
|
|
|
- }
|
|
|
- .telefono_data{
|
|
|
- width: 6.8cm;
|
|
|
- float: left;
|
|
|
- padding-left: 2.3cm;
|
|
|
- min-height: 0.5cm;
|
|
|
- }
|
|
|
- .nota_remision_data{
|
|
|
- width: 8.3cm;
|
|
|
- float: left;
|
|
|
- padding-left: 2.5cm;
|
|
|
- min-height: 0.5cm;
|
|
|
- }
|
|
|
- .cab-articulos{
|
|
|
- height: 0.7cm;
|
|
|
- clear: both;
|
|
|
- }
|
|
|
- .articulos{
|
|
|
- height: 3.60cm;
|
|
|
- }
|
|
|
- .art-col1{ width:0.9cm; text-align:center; }
|
|
|
- .art-col2{ padding-left: 0.8cm; width:1cm; text-align:center; }
|
|
|
- .art-col3{ padding-left: 1cm; width:9.4cm; }
|
|
|
- .art-col7{ width:1.9cm; text-align:right; }
|
|
|
-
|
|
|
- .subtotal_10{
|
|
|
- width: 2.3cm;
|
|
|
- float: left;
|
|
|
- padding-left: 0.8cm;
|
|
|
- text-align: left;
|
|
|
- padding-top: 0.7cm;
|
|
|
- }
|
|
|
- .total_pagar_data{
|
|
|
- width: 16.4cm;
|
|
|
- float: left;
|
|
|
- padding-top: 0.01mm;
|
|
|
- padding-left: 4.8cm;
|
|
|
- }
|
|
|
- .total_pagar{
|
|
|
- width: 2.3cm;
|
|
|
- float: right;
|
|
|
- padding-top: 0.01mm;
|
|
|
- padding-left: 0.8cm;
|
|
|
- }
|
|
|
- .iva_10_data{
|
|
|
- width: 5.2cm;
|
|
|
- float: left;
|
|
|
- padding-left: 3.8cm;
|
|
|
- }
|
|
|
- .iva_total_data{
|
|
|
- width: 7cm;
|
|
|
- float: left;
|
|
|
- padding-left: 3.3cm;
|
|
|
- }
|
|
|
- </style>
|
|
|
-
|
|
|
- <!-- 3 copias en una hoja -->
|
|
|
- <t t-foreach="['ORIGINAL', 'DUPLICADO', 'TRIPLICADO']" t-as="tipo">
|
|
|
- <div class="copia">
|
|
|
- <div class="titulo-copia"><t t-esc="tipo"/></div>
|
|
|
-
|
|
|
- <div class="pagina">
|
|
|
- <div class="logo"></div>
|
|
|
-
|
|
|
- <div class="linea1">
|
|
|
- <div class="fecha_emision_data">
|
|
|
- <span t-field="o.date_invoice" t-field-options='{"format": "dd MMM yyyy"}'/>
|
|
|
+ <t t-foreach="docs" t-as="o">
|
|
|
+ <div class="page" style="width:35cm; height:23cm; margin:0; padding:0; font-size:11px;">
|
|
|
+
|
|
|
+ <!-- Tres copias en una hoja (Original / Duplicado / Triplicado preimpresos) -->
|
|
|
+ <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;">
|
|
|
+
|
|
|
+ <!-- Datos principales -->
|
|
|
+ <div style="position:absolute; top:0.5cm; left:1cm; font-size:10px;">
|
|
|
+ <span t-esc="o.date_invoice or ''"/>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="position:absolute; top:1.2cm; left:1cm; font-size:10px;">
|
|
|
+ <span t-esc="o.partner_id.name or ''"/>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="position:absolute; top:1.8cm; left:1cm; font-size:10px;">
|
|
|
+ <span t-esc="o.partner_id.street or ''"/>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="position:absolute; top:2.4cm; left:1cm; font-size:10px;">
|
|
|
+ <span t-esc="o.partner_id.vat or ''"/>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="position:absolute; top:2.4cm; left:13.5cm; font-size:10px;">
|
|
|
+ <span t-esc="o.number or ''"/>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="position:absolute; top:3cm; left:1cm; font-size:10px;">
|
|
|
+ <span t-esc="o.payment_term.name if o.payment_term else ''"/>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="position:absolute; top:3cm; left:9cm; font-size:10px;">
|
|
|
+ <span t-esc="o.partner_id.phone or ''"/>
|
|
|
+ </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"/>
|
|
|
+ </t>
|
|
|
</div>
|
|
|
- <div class="contado_x">
|
|
|
- <t t-if="o.contado">X</t>
|
|
|
+ <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"/>
|
|
|
+ </t>
|
|
|
</div>
|
|
|
- <div class="credito_x">
|
|
|
- <t t-if="o.credito">X</t>
|
|
|
+ <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"/>
|
|
|
+ </t>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ </t>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="razon_data"><span t-field="o.partner_id.name"/></div>
|
|
|
- <div class="direccion_data"><span t-field="o.partner_id.ruc"/></div>
|
|
|
-
|
|
|
- <div class="ruc_data">
|
|
|
- <t t-if="o.partner_id.street">
|
|
|
- <span t-field="o.partner_id.street"/> <span t-field="o.partner_id.street2"/>
|
|
|
- </t>
|
|
|
- </div>
|
|
|
- <div class="telefono_data"><span t-field="o.partner_id.mobile"/></div>
|
|
|
-
|
|
|
- <div class="cab-articulos"></div>
|
|
|
- <div class="articulos">
|
|
|
- <table class="tab-articulos">
|
|
|
- <tr t-foreach="o.invoice_line" t-as="l">
|
|
|
- <td class="art-col1"><span t-field="l.product_id.default_code"/></td>
|
|
|
- <td class="art-col2"><span t-esc="'{0:,.2f}'.format(l.quantity)"/></td>
|
|
|
- <td class="art-col3"><span t-field="l.product_id.name"/></td>
|
|
|
- <td class="art-col7"><span t-esc="'{0:,.0f}'.format((l.quantity * l.price_unit))"/></td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
+ <!-- Totales -->
|
|
|
+ <div style="position:absolute; top:6.5cm; left:1cm; font-size:10px;">
|
|
|
+ <span t-esc="o.amount_total_text or ''"/>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="subtotal_10"><span t-esc="'{0:,.0f}'.format(o.amount_total)"/></div>
|
|
|
- <div class="total_pagar_data">
|
|
|
- Gs.: <span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/>
|
|
|
- </div>
|
|
|
- <div class="total_pagar">
|
|
|
- <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
|
|
|
- </div>
|
|
|
- <div class="iva_10_data">
|
|
|
- <span t-esc="'{0:,.0f}'.format(o.amount_tax)"/>
|
|
|
- </div>
|
|
|
- <div class="iva_total_data">
|
|
|
- <span t-esc="'{0:,.0f}'.format(o.amount_tax)"/>
|
|
|
- </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>
|
|
|
- </t>
|
|
|
- </div>
|
|
|
- </t>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </t>
|
|
|
+ </div>
|
|
|
</t>
|
|
|
</t>
|
|
|
</template>
|
|
|
|
|
|
+
|
|
|
</data>
|
|
|
</openerp>
|