Browse Source

Agregar factura tag ivas y exenta

sebas 3 years ago
parent
commit
093e817e3d
4 changed files with 152 additions and 51 deletions
  1. BIN
      __init__.pyc
  2. BIN
      factura_venta_tag.pyc
  3. 152 51
      factura_venta_tag.xml
  4. BIN
      res_currency.pyc

BIN
__init__.pyc


BIN
factura_venta_tag.pyc


+ 152 - 51
factura_venta_tag.xml

@@ -185,7 +185,7 @@
 
                         }
                         .art-col8{
-                            width:1.7cm;
+                            width:1.9cm;
                             font-size: 2.0mm;
                             text-align: right;
                             vertical-align: top;
@@ -193,7 +193,7 @@
 
                         }
                         .art-col6{
-                            width:2.0cm;
+                            width:2.1cm;
                             font-size: 2.0mm;
                             vertical-align: top;
                             text-align: right;
@@ -208,6 +208,74 @@
                             min-height: 0.6cm;
 
                         }
+
+                        .table-condensed>tbody>tr>td {
+                            padding: 1px !important;
+                        }
+
+
+                        .tab-articulos7{
+                            height: 0.40cm;
+                            clear: both;
+                        }
+                        .art-col72{
+                            padding-left: 0.2mm;
+                            width:1.8cm;
+                            font-size: 2.0mm;
+                            text-align: center;
+                            vertical-align: top;
+                            min-height: 0.6cm;
+                        }
+                        .art-col73{
+                            padding-left: 1.0cm;
+                            font-size: 2.0mm;
+                            width:2.0cm;
+                            text-align: center;
+                            vertical-align: top;
+                            min-height: 0.6cm;
+                        }
+                        .art-col74{
+                            width:6.9cm;
+                            font-size: 2.0mm;
+                            padding-left: 0.2mm;
+                            text-align: left;
+                            vertical-align: top;
+                            min-height: 0.6cm;
+
+                        }
+                        .art-col75{
+                            width:1.68cm;
+                            font-size: 2.0mm;
+                            text-align: right;
+                            vertical-align: top;
+                            min-height: 0.6cm;
+
+                        }
+                        .art-col78{
+                            width:1.9cm;
+                            font-size: 2.4mm;
+                            text-align: right;
+                            vertical-align: top;
+                            min-height: 0.6cm;
+
+                        }
+                        .art-col76{
+                            width:2.1cm;
+                            font-size: 2.4mm;
+                            vertical-align: top;
+                            text-align: right;
+                            min-height: 0.6cm;
+
+                        }
+                        .art-col77{
+                            width:2.3cm;
+                            font-size: 2.4mm;
+                            text-align: right;
+                            vertical-align: top;
+                            min-height: 0.6cm;
+
+                        }
+
                         .tab-articulos{
                             height: 0.87cm;
                             clear: both;
@@ -282,25 +350,29 @@
                             width: 100%;
                             top: 0px;
                         }
+
                         .subtotal_data{
-                            width: 6cm;
+                            width: 2.8cm;
                             float: left;
+                            font-size: 2.0mm;
                             padding-top: 0.002cm;
-                            padding-left: 2.3cm;
+                            padding-left: 4.0cm;
                             min-height: 0.2cm;
                         }
                         .subtotal_excentas{
-                            width: 1.8cm;
+                            width: 6.5cm;
+                            font-size: 1.5mm;
                             float: left;
                             text-align: right;
-							              padding-left: 7.9cm;
+							              padding-left: 7.7cm;
                             padding-top: 0.7cm;
                             min-height: 0.2cm;
                         }
                         .subtotal_5{
-                            width: 1.8cm;
+                            width: 2.8cm;
                             float: left;
-							              padding-left: 1cm;
+                            font-size: 2.0mm;
+							              padding-left: 0.6cm;
                             text-align: right;
                             padding-top: 0.7cm;
                             min-height: 0.2cm;
@@ -308,6 +380,7 @@
                         .subtotal_10{
                             width: 2.8cm;
                             float: left;
+                            font-size: 2.0mm;
 							              padding-left: 0.8cm;
                             text-align: right;
                             padding-top: 0.7cm;
@@ -441,65 +514,93 @@
                             <div class="articulos">
 
                                <table class="tab-articulos">
-                                      <!-- <div style="border:0.1px white;"></div> -->
+                                    <t t-set="valor_exenta" t-value="0"/>
+                                    <t t-set="valor_5" t-value="0"/>
+                                    <t t-set="valor_10" t-value="0"/>
                                     <tr t-foreach="o.invoice_line" t-as="l">
                                         <td class="art-col2"><span t-field="l.product_id.id"/></td>
                                         <td class="art-col3"><span t-esc="'%.0f'%l.quantity"/></td>
                                         <td class="art-col4"><span t-field="l.name"/></td>
                                         <td class="art-col5"><span t-esc="'{0:,.0f}'.format(l.price_unit)"/></td>
-                                        <td class="art-col8"> </td>
-                                        <td class="art-col6"> </td>
-                                        <td class="art-col7"><span t-esc="'{0:,.0f}'.format((l.quantity * l.price_unit))"/></td>
+                                        <td class="art-col8">
+                                          <span t-if="'IVA 5% Venta' not in [ilt.name for ilt in l.invoice_line_tax_id] and 'IVA 10% Venta' not in [ilt.name for ilt in l.invoice_line_tax_id]">
+                                              <span t-esc= "'{0:,.0f}'.format(int(l.quantity * l.price_unit)).replace(',', '.')">
+                                                  <span t-value="valor_exenta+(l.quantity * l.price_unit)"/></span>
+                                                  <t t-set="valor_exenta" t-value="valor_exenta+(l.quantity * l.price_unit)"/>
+                                              </span>
+                                        </td>
+                                        <td class="art-col6">
+                                          <span t-if="'IVA 5% Venta' in [ilt.name for ilt in l.invoice_line_tax_id] and 'IVA 10% Venta' not in [ilt.name for ilt in l.invoice_line_tax_id]">
+                                              <span t-esc= "'{0:,.0f}'.format(int(l.quantity * l.price_unit)).replace(',', '.')">
+                                                  <span t-value="valor_5+(l.quantity * l.price_unit)"/></span>
+                                                  <t t-set="valor_5" t-value="valor_5+(l.quantity * l.price_unit)"/>
+                                              </span>
+                                        </td>
+                                        <td class="art-col7">
+                                          <span t-if="'IVA 10% Venta' in [ilt.name for ilt in l.invoice_line_tax_id]">
+                                            <span t-esc= "'{0:,.0f}'.format(int(l.quantity * l.price_unit)).replace(',', '.')">
+                                                <span t-value="valor_10+(l.quantity * l.price_unit)"/></span>
+                                                <t t-set="valor_10" t-value="valor_10+(l.quantity * l.price_unit)"/>
+                                            </span>
+                                        </td>
                                    </tr>
                                 </table>
                             </div>
+                            <!-- <div class="logo5"> </div> -->
+                            <table class="tab-articulos7">
+
+                                     <td class="art-col72"></td>
+                                     <td class="art-col73"></td>
+                                     <td class="art-col74"></td>
+                                     <td class="art-col75"></td>
+                                     <td class="art-col78">
+                                          <span t-esc="'{0:,.0f}'.format(int(valor_exenta)).replace(',', '.')"></span>
+                                     </td>
+                                     <td class="art-col76">
+                                       <span t-esc="'{0:,.0f}'.format(int(valor_5)).replace(',', '.')"></span>
+                                       <t t-set="iva_5" t-value="valor_5/21" />
+                                     </td>
+                                     <td class="art-col77">
+                                       <span t-esc="'{0:,.0f}'.format(int(valor_10)).replace(',', '.')"></span>
+                                       <t t-set="iva_10" t-value="valor_10/11" />
+                                     </td>
+
+
+                             </table>
+
+                             <table class="tab-articulos">
+                                     <td class="art-col2"></td>
+                                     <td class="art-col3"></td>
+                                     <td class="art-col4"></td>
+                                     <td class="art-col5"></td>
+                                     <td class="art-col8">
+
+                                     </td>
+                                     <td class="art-col6">
+
+                                     </td>
+                                     <td class="art-col7" style="font-size:2.4mm;">
+                                        <span t-esc="'{0:,.0f}'.format(int(o.amount_total)).replace(',', '.')"/>
+                                     </td>
+                              </table>
 
-                             <div class="subtotal_data"> </div>
-                             <div class="subtotal_excentas"> </div>
-                             <div class="subtotal_5"> </div>
-                             <td style="font-size:7.0px;">
-                                <t t-if="o.currency_id.id == 166">
-                                  <div class="subtotal_10"><span t-esc="'{0:,.0f}'.format(o.amount_total)"/></div>
-                                </t>
-                                <t t-if="o.currency_id.id != 166">
-                                    <div class="subtotal_10"><span t-esc="'{0:,.2f}'.format(o.amount_total)"/></div>
-                                </t>
-                            </td>
-                            <div class="total_pagar_data"></div>
-
-                            <tr>
-                               <table class="tab-articulos2">
-                                 <td class="art-col33">
-                                 </td>
-                                  <td class="art-col34">
-                                  </td>
-                                  <td class="art-col35">
-
-                                  </td>
-                                  <td class="art-col36">
-                                    <t t-if="o.currency_id.id == 166">
-                                        <span t-esc="'{0:,.0f}'.format(o.amount_total)"/>
-                                    </t>
-                                    <t t-if="o.currency_id.id != 166">
-                                        <span t-esc="'{0:,.2f}'.format(o.amount_total)"/>
-                                    </t>
-                                  </td>
+                            <t t-set="iva_5" t-value="0"/>
+                            <t t-set="iva_10" t-value="0"/>
 
-                                </table>
-                              </tr>
+                            <!-- <div class="total_pagar_data"></div> -->
 
 
                               <table class="tab-articulos4">
                                  <td class="art-col41">
                                  </td>
                                  <td class="art-col43">
-                                                                <t t-if="o.currency_id.id == 166">
-                                                                    <div><span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/></div>
-                                                                </t>
-                                                                <t t-if="o.currency_id.id != 166">
-                                                                     <div><span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/></div>
-                                                                 </t>
-                                </td>
+                                        <t t-if="o.currency_id.id == 166">
+                                              <div><span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/></div>
+                                        </t>
+                                        <t t-if="o.currency_id.id != 166">
+                                              <div><span t-esc="convertir(o.amount_total,o.currency_id.en_letras)"/></div>
+                                        </t>
+                                 </td>
                                 <td class="art-col44"> </td>
                                 <td class="art-col45">
 

BIN
res_currency.pyc