| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <report id="factura_venta_conecta5"
- model="account.invoice"
- string="Factura Legal"
- report_type="qweb-html"
- name="factura_venta_conecta5.report_factura_conecta5"
- file="factura_venta_conecta5.report_factura_conecta5"
- />
- <template id="report_factura_conecta5">
- <t t-call="report.html_container">
- <t t-foreach="docs" t-as="o">
- <!-- A4 = 29.7cm alto, dejamos 3cm arriba de margen -->
- <div class="page" style="width:21cm; height:29.7cm; margin:0; padding-top:2cm; font-family:Arial,Helvetica,sans-serif; font-size:11px; box-sizing:border-box;">
- <!-- Tres copias en la misma hoja -->
- <t t-foreach="[1,2,3]" t-as="i">
- <!-- Cada copia ocupa ~8.8cm de alto (3x8.8 + 3cm margen = 29.7cm) -->
- <div class="copia" t-att-style="'position:relative; height:8.8cm; width:100%; page-break-inside:avoid; margin-top:' + ('2.5' if i == 2 else ('2.55' if i == 3 else '0')) + 'cm;'">
- <style type="text/css">
- .campo{position:absolute; font-size:10px;}
- .detalle{position:absolute; top:3.6cm; left:1.2cm; width:19cm; font-size:10px; line-height:0.47cm;color:red;}
- .total_pagar_data{position:absolute; top:6.5cm; left:3.2cm; width:14cm;}
- .total_pagar{position:absolute; top:6.5cm; right:1.3cm; text-align:right; width:6cm;color:red;}
- .iva_5_data{position:absolute; top:7.4cm; left:7.1cm; width:3cm; text-align:right;color:red;}
- .iva_10_data{position:absolute; top:7.4cm; left:9.4cm; width:3cm; text-align:right;color:red;}
- .iva_total_data{position:absolute; top:7.4cm; left:15.1cm; width:3.5cm; text-align:right;color:red;}
- .xmark{position:absolute; font-weight:bold; font-size:12px;color:red;}
- </style>
- <!-- Fecha de emisión -->
- <div class="campo" style="top:0.2cm; left:3.7cm;">
- <span t-esc="time.strftime('%d %b %Y')"/>
- </div>
- <!-- Condición de venta (Contado / Crédito) -->
- <div class="xmark" style="top:0.2cm; left:18.3cm;">
- <t t-if="o.contado">X</t>
- </div>
- <div class="xmark" style="top:0.2cm; left:18.6cm;">
- <t t-if="o.credito">X</t>
- </div>
- <!-- Cliente: Nombre y RUC -->
- <div class="campo" style="top:0.7cm; left:4.5cm; width:19cm;">
- <t t-if="o.partner_id.street">
- <span t-field="o.partner_id.name"/>
- </t>
- <span style="position:absolute; left:11.7cm;">
- <span t-field="o.partner_id.ruc"/>
- </span>
- </div>
- <!-- Dirección + Teléfono -->
- <div class="campo" style="top:1.0cm; left:2.5cm; width:19cm;">
- <t t-if="o.partner_id.street">
- <span t-field="o.partner_id.street"/> <span t-field="o.partner_id.street2"/>
- </t>
- <span style="position:absolute; left:12.0cm;">
- <span t-field="o.partner_id.mobile"/>
- </span>
- </div>
- <!-- Detalle -->
- <div class="detalle" style="top:3.2cm;">
- <t t-foreach="o.invoice_line" t-as="l">
- <div style="display:flex;">
- <div style="width:1.8cm; text-align:center;"><span t-esc="'{0:,.0f}'.format(l.quantity)"/></div>
- <div style="width:8.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:3.0cm; 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>
- </div>
- <div style="width:3.5cm; text-align:right;"></div>
- <div style="width:2.5cm; text-align:right;">
- <span t-esc="'{0:,.0f}'.format((l.quantity * l.price_unit))"/>
- </div>
- </div>
- </t>
- </div>
- <!-- Totales -->
- <div class="total_pagar_data">
- <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>
- <!-- IVA -->
- <div class="iva_5_data"></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>
- </t>
- </div>
- </t>
- </t>
- </template>
- </data>
- </openerp>
|