397 lines
23 KiB
XML
397 lines
23 KiB
XML
<?xml version='1.0' encoding='utf-8'?>
|
|
<odoo>
|
|
<data noupdate="0">
|
|
|
|
<template id="report_electronic_invoice_document">
|
|
<t t-call="web.basic_layout">
|
|
<style>
|
|
.infolabel {
|
|
font-size: 11px;
|
|
text-align: left;
|
|
font-weight: bold;
|
|
border-bottom: 0px
|
|
}
|
|
div.infolabel {
|
|
font-size: 11px;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
border-bottom: 0px
|
|
}
|
|
div.infolabelbig {
|
|
font-size: 14px;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
border-bottom: 0px
|
|
}
|
|
span.infodata{
|
|
font-size: 11px;
|
|
text-align: left;
|
|
border-bottom: 0px
|
|
}
|
|
span.infodatabottom{
|
|
font-size: 11px;
|
|
text-align: left;
|
|
border-bottom: 0px
|
|
}
|
|
strong.infodatabottom{
|
|
font-size: 11px;
|
|
text-align: left;
|
|
border-bottom: 0px
|
|
}
|
|
tr.inforow {
|
|
line-height: 25px;
|
|
min-height: 25px;
|
|
height: 25px;
|
|
}
|
|
.borderless td, .borderless tr {
|
|
border: none;
|
|
line-height: 15px;
|
|
min-height: 15px;
|
|
padding: 1px;
|
|
}
|
|
</style>
|
|
<div class="header">
|
|
<div class="row">
|
|
<div class="col-3">
|
|
<img t-if="o.company_id.logo" t-att-src="image_data_uri(o.company_id.logo)" width="130" height="auto" />
|
|
</div>
|
|
<div class="col-3">
|
|
<span style="font-size:10px" t-field="o.company_id.partner_id.name" />
|
|
<span style="font-size:10px">NIT </span><span style="font-size:10px" t-field="o.company_id.partner_id.ref_num" />
|
|
<br/>
|
|
<span style="font-size:10px" t-field="o.company_id.street" />
|
|
<span style="font-size:10px" t-field="o.company_id.street2" />
|
|
<br/>
|
|
<span style="font-size:10px" t-field="o.company_id.partner_id.city_id.name" />
|
|
,
|
|
<span style="font-size:10px" t-field="o.company_id.partner_id.country_id.name" />
|
|
<br/>
|
|
<span style="font-size:10px">TELEFONO </span><span style="font-size:10px" t-field="o.company_id.phone" />
|
|
<span style="font-size:10px" t-if="o.company_id.partner_id.mobile">/</span>
|
|
<span style="font-size:10px" t-field="o.company_id.partner_id.mobile" />
|
|
<br/>
|
|
<span style="font-size:10px" t-field="o.company_id.email" />
|
|
</div>
|
|
<div class="col-3">
|
|
</div>
|
|
<div t-if="o.ei_qr" class="col-3">
|
|
<img t-att-src="'/report/barcode/?type=QR&value=%s&width=%s&height=%s' % (o.ei_qr, 110, 110)" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-6 card card-body">
|
|
<table class="table borderless">
|
|
<tr class="inforow">
|
|
<td>
|
|
<span class="w-15 infolabel">
|
|
CLIENTE
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="infodata" t-field="o.partner_id.name" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="w-15 infolabel">
|
|
NIT
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="infodata" t-field="o.partner_id.ref_num" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="w-15 infolabel">
|
|
DIRECCIÓN
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="infodata" t-field="o.partner_id.street" />
|
|
<span class="infodata" t-field="o.partner_id.street2" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="w-15 infolabel">
|
|
CIUDAD
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="infodata" t-field="o.partner_id.city_id.name" />
|
|
-
|
|
<span class="infodata" t-field="o.partner_id.country_id.name" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="w-15 infolabel">
|
|
TELEFONO
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="infodata" t-field="o.partner_id.phone" />
|
|
<span class="infodata" t-if="o.partner_id.mobile">/</span>
|
|
<span class="infodata" t-field="o.partner_id.mobile" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="w-15 infolabel">
|
|
EMAIL
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="infodata" t-field="o.partner_id.email" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="w-15 infolabel">
|
|
REFERENCIA
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="infodata" t-field="o.ref" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="col-6 card">
|
|
<div class="infolabelbig card-header">
|
|
<span t-if="o.move_type == 'out_invoice' and o.ei_cufe">FACTURA ELECTRÓNICA DE VENTA</span>
|
|
<span t-if="o.move_type == 'out_invoice' and not o.ei_cufe">FACTURA DE VENTA</span>
|
|
<span t-if="o.move_type == 'out_invoice' and o.ei_cude">NOTA DÉBITO ELECTRONICA</span>
|
|
<span t-if="o.move_type == 'out_refund' and o.ei_cude">NOTA CRÉDITO ELECTRONICA</span>
|
|
<span t-if="o.move_type == 'out_refund' and not o.ei_cude">NOTA CRÉDITO</span>
|
|
<span t-if="o.move_type == 'out_invoice' and not o.ei_cude and o.debit_origin_id">NOTA DÉBITO</span>
|
|
<span t-if="o.move_type == 'out_invoice' and o.state == 'cancel'">CANCELADA</span>
|
|
<span t-if="o.move_type == 'in_invoice'">DOCUMENTO DE SOPORTE</span>
|
|
<span t-if="o.name != '/'" t-field="o.name"/>
|
|
</div>
|
|
<div class="card-body">
|
|
<table class="table borderless">
|
|
<tr class="inforow">
|
|
<td>
|
|
<span class="w-15 infolabel">
|
|
FECHA DE EMISION
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="infodata" t-field="o.ei_generation_date" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="w-15 infolabel">
|
|
FECHA DE VENCIMIENTO
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="infodata" t-field="o.invoice_date_due" />
|
|
</td>
|
|
</tr>
|
|
<tr t-if="o.invoice_payment_term_id">
|
|
<td>
|
|
<span class="w-15 infolabel">
|
|
TERMINO DE PAGO
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="infodata" t-field="o.invoice_payment_term_id.name" />
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
<div class="row">
|
|
<t t-if="o.ei_cufe">
|
|
<div class="col-12" style="font-size:8px; float:left; text-align:left; white-space: pre;"><strong>CUFE : </strong><span t-field="o.ei_cufe" /></div>
|
|
</t>
|
|
<t t-if="o.ei_cude">
|
|
<div class="col-12" style="font-size:8px; float:left; text-align:left; white-space: pre;"><strong>CUDE : </strong><span t-field="o.ei_cude" /></div>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="page">
|
|
|
|
|
|
<t t-set="display_discount" t-value="any(l.discount for l in o.invoice_line_ids)"/>
|
|
|
|
<table class="table table-sm o_main_table" name="invoice_line_table">
|
|
<thead>
|
|
<tr>
|
|
<th name="th_defaultcode" class="text-left"><span class="infolabel">N°</span></th>
|
|
<th name="th_defaultcode" class="text-left"><span class="infolabel">REFERENCIA</span></th>
|
|
<th name="th_description" class="text-left"><span class="infolabel">DESCRIPCIÓN</span></th>
|
|
<th name="th_quantity" class="text-right"><span class="infolabel">CANTIDAD</span></th>
|
|
<th name="th_priceunit" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span class="infolabel">PRECIO UNIT.</span></th>
|
|
<th name="th_price_unit" t-if="display_discount" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
|
|
<span class="infolabel">DESC.%</span>
|
|
</th>
|
|
<th name="th_taxes" t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span class="infolabel">IMPUESTOS</span></th>
|
|
<th name="th_subtotal" class="text-right">
|
|
<span groups="account.group_show_line_subtotals_tax_excluded" class="infolabel">VALOR</span>
|
|
<span groups="account.group_show_line_subtotals_tax_included" class="infolabel">PRECIO TOTAL</span>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="invoice_tbody">
|
|
<t t-set="current_subtotal" t-value="0"/>
|
|
<t t-set="lines" t-value="o.invoice_line_ids.sorted(key=lambda l: (-l.sequence, l.date, l.move_name, -l.id), reverse=True)"/>
|
|
<t t-set="n_item" t-value="0"/>
|
|
<t t-foreach="lines" t-as="line">
|
|
<t t-set="n_item" t-value="n_item+1"/>
|
|
<t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
|
|
<t t-set="current_subtotal" t-value="current_subtotal + line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
|
|
|
|
<tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''">
|
|
<t t-if="not line.display_type" name="account_invoice_line_accountable">
|
|
<td name="account_invoice_line_number"><span class="infodatabottom" t-esc="n_item"/></td>
|
|
<td name="account_invoice_default_code"><span class="infodatabottom" t-field="line.product_id.default_code" t-options="{'widget': 'text'}"/></td>
|
|
<td name="account_invoice_line_name"><span class="infodatabottom" t-field="line.name" t-options="{'widget': 'text'}"/></td>
|
|
<td class="text-right">
|
|
<span class="infodatabottom" t-field="line.quantity"/>
|
|
<span class="infodatabottom" t-field="line.product_uom_id" groups="uom.group_uom"/>
|
|
</td>
|
|
<td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
|
|
<span class="text-nowrap infodatabottom" t-field="line.price_unit"/>
|
|
</td>
|
|
<td t-if="display_discount" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
|
|
<span class="text-nowrap infodatabottom" t-field="line.discount"/>
|
|
</td>
|
|
<td t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
|
|
<span class="infodatabottom" t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_ids))" id="line_tax_ids"/>
|
|
</td>
|
|
<td class="text-right o_price_total">
|
|
<span class="text-nowrap infodatabottom" t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
|
|
<span class="text-nowrap infodatabottom" t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
|
|
</td>
|
|
</t>
|
|
<t t-if="line.display_type == 'line_section'">
|
|
<td colspan="99">
|
|
<span t-field="line.name" t-options="{'widget': 'text'}"/>
|
|
</td>
|
|
<t t-set="current_section" t-value="line"/>
|
|
<t t-set="current_subtotal" t-value="0"/>
|
|
</t>
|
|
<t t-if="line.display_type == 'line_note'">
|
|
<td colspan="99">
|
|
<span t-field="line.name" t-options="{'widget': 'text'}"/>
|
|
</td>
|
|
</t>
|
|
</tr>
|
|
|
|
<t t-if="current_section and (line_last or lines[line_index+1].display_type == 'line_section')">
|
|
<tr class="is-subtotal text-right">
|
|
<td colspan="99">
|
|
<strong class="mr16">SUBTOTAL</strong>
|
|
<span t-esc="current_subtotal" t-options="{"widget": "monetary", "display_currency": o.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
<div>
|
|
<span class="infodata" t-esc="n_item"></span> <span class="infodata" >Items</span>
|
|
</div>
|
|
<br/>
|
|
<div class="clearfix">
|
|
<div id="total" class="row">
|
|
<div class="col-6">
|
|
<t t-if="o.journal_id.resolution_id.description">
|
|
<div class="col-12" style="font-size:10px; float:left; text-align:left;"><span t-field="o.journal_id.resolution_id.description" /></div>
|
|
</t>
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<table class="table table-sm" style="page-break-inside: avoid;">
|
|
<tr class="border-black o_subtotal" style="">
|
|
<td><strong class="infodatabottom">SUBTOTAL</strong></td>
|
|
<td class="text-right">
|
|
<span class="infodatabottom" t-field="o.amount_untaxed"/>
|
|
</td>
|
|
</tr>
|
|
<t t-foreach="o.amount_by_group" t-as="amount_by_group">
|
|
<tr style="">
|
|
<t t-if="len(o.line_ids.filtered(lambda line: line.tax_line_id)) in [0, 1] and o.amount_untaxed == amount_by_group[2]">
|
|
<td><span class="text-nowrap infodatabottom" t-esc="amount_by_group[0]"/></td>
|
|
<td class="text-right o_price_total">
|
|
<span class="text-nowrap infodatabottom" t-esc="amount_by_group[3]"/>
|
|
</td>
|
|
</t>
|
|
<t t-else="">
|
|
<td>
|
|
<span class="infodatabottom" t-esc="amount_by_group[0]"/>
|
|
<span class="text-nowrap infodatabottom"> sobre
|
|
<t t-esc="amount_by_group[4]"/>
|
|
</span>
|
|
</td>
|
|
<td class="text-right o_price_total">
|
|
<span class="text-nowrap infodatabottom" t-esc="amount_by_group[3]"/>
|
|
</td>
|
|
</t>
|
|
</tr>
|
|
</t>
|
|
<tr class="border-black o_total">
|
|
<td><strong class="infodatabottom">TOTAL</strong></td>
|
|
<td class="text-right">
|
|
<span class="text-nowrap infodatabottom" t-field="o.amount_total"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<p t-if="o.narration" name="comment">
|
|
<span class="infodata" t-field="o.narration"/>
|
|
</p>
|
|
<p t-if="o.fiscal_position_id.note" name="note">
|
|
<span class="infodata" t-field="o.fiscal_position_id.note"/>
|
|
</p>
|
|
<p t-if="o.invoice_incoterm_id" name="incoterm">
|
|
<strong class="infodatabottom">Incoterm: </strong><span class="infodata" t-field="o.invoice_incoterm_id.code"/> - <span class="infodata" t-field="o.invoice_incoterm_id.name"/>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<t t-if="bool(o.ei_cufe or o.ei_cude)">
|
|
<span style="font-size:9px"><b>FECHA DE VALIDACION : </b></span><span style="font-size:9px" t-esc="o.ei_validation_date"/><br/>
|
|
<span style="font-size:9px"><b>INFORMACIÓN : </b></span><a style="font-size:9px">https://catalogo-vpfe.dian.gov.co/document/searchqr?documentkey=<span t-esc="o.ei_cufe or o.ei_cude" /></a>
|
|
</t>
|
|
<div class="text-center border-top" >
|
|
<small>
|
|
<strong style="font-size:10px">
|
|
<span style="font-size:10px" t-field="o.company_id.website" />
|
|
</strong>
|
|
</small>
|
|
</div>
|
|
<div class="text-left">
|
|
<p style="font-size:9px; margin-bottom: 10px">AvancysERP, por Avancys SAS, NIT 900297700</p>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
|
|
</template>
|
|
|
|
<template id="report_electronic_invoice">
|
|
<t t-call="web.html_container">
|
|
<t t-foreach="docs" t-as="o">
|
|
<t t-set="lang" t-value="o.invoice_user_id.sudo().lang if o.move_type in ('in_invoice', 'in_refund') else o.partner_id.lang"/>
|
|
<t t-call="electronic_invoice_dian.report_electronic_invoice_document" t-lang="lang"/>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
|
|
|
|
</data>
|
|
</odoo>
|