Bladeren bron

Agregar en catalogo de productos unidad de medida y subtotales de mano de obra y materiales

Sebas 6 jaren geleden
bovenliggende
commit
dd1a7466bd
1 gewijzigde bestanden met toevoegingen van 69 en 15 verwijderingen
  1. 69 15
      presupuesto_venta_bioelectric.xml

+ 69 - 15
presupuesto_venta_bioelectric.xml

@@ -158,6 +158,31 @@
                         .art-col7{
                             width:1.5cm;
                             text-align: right;
+                        }
+                        .spad{
+                            width: 8.5cm;
+                            float: left;
+                            padding-top: 0.09cm;
+                            padding-bottom: 0.12cm;
+                            min-height: 0.4cm;
+                        }
+
+                        .subtotal_mat{
+                            width: 2.4cm;
+                            float: left;
+                            text-align: right;
+                            padding-top: 0.09cm;
+                            padding-left: 1cm;
+                            padding-bottom: 0.12cm;
+                            min-height: 0.4cm;
+                        }
+                        .subtotal_mo{
+                            width: 3cm;
+                            float: left;
+                            text-align: right;
+                            padding-top: 0.09cm;
+                            padding-bottom: 0.12cm;
+                            min-height: 0.4cm;
                         }
 						.logo1{
                             height: 2cm;
@@ -235,6 +260,7 @@
                                 <thead>
                                     <tr>
                                         <th class="text-center">Cantidad</th>
+                                        <th class="text-center">Medida</th>
                                         <th class="text-center">Descripción de material/servicio</th>
                                         <th class="text-center">Prec. Unitario</th>
                                         <th class="text-center">Parcial Materiales</th>
@@ -242,48 +268,76 @@
                                     </tr>
                                </thead>
                                <tbody class="sale_tbody">
+                                   <t t-set="valor_mat" t-value="0"/>
+                                   <t t-set="valor_mo" t-value="0"/>
                                     <tr t-foreach="o.order_line" t-as="l">
-                                        <td class="text-right">
+                                        <td class="text-center">
                                             <span t-esc="'%.0f'%l.product_uom_qty"/>
                                         </td>
+                                        <td>
+                                           <span t-field="l.product_uom"/>
+                                        </td>
                                         <td>
                                            <span t-field="l.name"/>
                                         </td>
                                         <td class="text-right">
 
                                                 <t t-if="o.currency_id.id == 166">
-                                                    <span t-esc="'{0:,.0f}'.format(l.price_unit)"/>
+                                                    <span t-esc="'{0:,.0f}'.format(l.product_uom_qty)"/>
                                                 </t>
                                                 <t t-if="o.currency_id.id != 166">
-                                                    <span t-esc="'{0:,.2f}'.format(l.price_unit)"/>
+                                                    <span t-esc="'{0:,.2f}'.format(l.product_uom_qty)"/>
                                                 </t>
 
                                         </td>
 
                                         <td class="text-right">
                                             <t t-if="l.product_id.type == 'product'">
-                                                <t t-if="o.currency_id.id == 166">
-                                                    <span t-esc="'{0:,.0f}'.format(l.price_unit*l.product_uom_qty)"/>
-                                                </t>
-                                                <t t-if="o.currency_id.id != 166">
-                                                    <span t-esc="'{0:,.2f}'.format(l.price_unit*l.product_uom_qty)"/>
-                                                </t>
+                                                <span t-if="o.currency_id.id == 166">
+                                                    <span t-esc= "'{0:,.0f}'.format(int(l.product_uom_qty * l.price_unit)).replace(',', '.')">
+                                                        <span t-value="valor_mat+(l.product_uom_qty * l.price_unit)"/></span>
+                                                        <t t-set="valor_mat" t-value="valor_mat+(l.product_uom_qty * l.price_unit)"/>
+                                                    </span>
+
+                                                <span t-if="o.currency_id.id != 166">
+                                                    <span t-esc="'{0:,.2f}'.format(int(l.price_unit*l.product_uom_qty)).replace(',', '.')">
+                                                        <span t-value="valor_mat+(l.product_uom_qty * l.price_unit)"/></span>
+                                                        <t t-set="valor_mat" t-value="valor_mat+(l.product_uom_qty * l.price_unit)"/>
+                                                    </span>
                                             </t>
                                         </td>
                                         <td class="text-right">
                                             <t t-if="l.product_id.type == 'service'">
-                                                <t t-if="o.currency_id.id == 166">
-                                                    <span t-esc="'{0:,.0f}'.format(l.price_unit*l.product_uom_qty)"/>
-                                                </t>
-                                                <t t-if="o.currency_id.id != 166">
-                                                    <span t-esc="'{0:,.2f}'.format(l.price_unit*l.product_uom_qty)"/>
-                                                </t>
+                                                <span t-if="o.currency_id.id == 166">
+                                                    <span t-esc= "'{0:,.0f}'.format(int(l.product_uom_qty * l.price_unit)).replace(',', '.')">
+                                                        <span t-value="valor_mo+(l.product_uom_qty * l.price_unit)"/></span>
+                                                        <t t-set="valor_mo" t-value="valor_mo+(l.product_uom_qty * l.price_unit)"/>
+                                                    </span>
+
+                                                <span t-if="o.currency_id.id != 166">
+                                                    <span t-esc="'{0:,.2f}'.format(int(l.price_unit*l.product_uom_qty)).replace(',', '.')">
+                                                        <span t-value="valor_mo+(l.product_uom_qty * l.price_unit)"/></span>
+                                                        <t t-set="valor_mo" t-value="valor_mo+(l.product_uom_qty * l.price_unit)"/>
+                                                    </span>
                                             </t>
                                         </td>
                                     </tr>
                                 </tbody>
                             </table>
 
+                            <div class="row">
+                                <div class="col-xs-4 pull-right">
+                                    <table class="table table-condensed">
+                                        <td class="subtotal_mat">
+                                            <span t-esc="'{0:,.0f}'.format(int(valor_mat)).replace(',', '.')"></span>
+                                        </td>
+                                        <td class="subtotal_mo">
+                                             <span t-esc="'{0:,.0f}'.format(int(valor_mo)).replace(',', '.')"></span>
+                                         </td>
+                                    </table>
+                                 </div>
+                            </div>
+
                             <div class="row">
                                 <div class="col-xs-4 pull-right">
                                     <table class="table table-condensed">