Преглед на файлове

Retocar informes de resumen de ventas Dna

root преди 3 години
родител
ревизия
453289ea5e

+ 2 - 0
models.py

@@ -53,6 +53,8 @@ class AccountInvoice(models.Model):
                 ],
 				'date_due': invoice.date_due,
 				'origin': invoice.origin,
+				'contado': invoice.contado,
+				'credito': invoice.credito,
 				'name': invoice.name,
 				'supplier_invoice_number': invoice.supplier_invoice_number,
 				'reference': invoice.reference,

BIN
models.pyc


+ 13 - 4
static/src/js/reports/report_cuenta_resumen_dna.js

@@ -482,6 +482,13 @@ function report_cuenta_resumen_dna(reporting){
             _.each(AccountInvoice,function(item2) {
               if(item2.is_anticipo == false){
               var total_sale = 0;
+              var forma = 'Contado';
+               if (item2.contado == true){
+                  forma = 'Contado'
+               };
+               if (item2.credito == true){
+                  forma = 'Credito'
+               };
               var partner= self.getResPartner(item2.partner_id[0]);
               var currency = self.getResCurrency(item2.company_currency[0]).shift();
                 data.push({
@@ -497,6 +504,7 @@ function report_cuenta_resumen_dna(reporting){
                   partner_mobile: self.valorNull(item2.partner_id[4]),
                   invoice_name : self.valorNull(item2.number),
                   supplier_invoice_number: self.valorNull(item2.supplier_invoice_number),
+                  forma: forma,
                   date_due:  moment(item2.date_due).format('DD/MM/YYYY'),
                   amount_total: accounting.formatMoney(item2.amount_total_currency, '', CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
                   amount_pagado:accounting.formatMoney(item2.amount_total - item2.residual,'',CurrencyBase.decimal_places,CurrencyBase.thousands_separator,CurrencyBase.decimal_separator),
@@ -517,7 +525,7 @@ function report_cuenta_resumen_dna(reporting){
                   decimal_separator: CurrencyBase.decimal_separator,
 
                 });
-              }  
+              }
             });
           });
 
@@ -596,9 +604,10 @@ function report_cuenta_resumen_dna(reporting){
                   partner_email: {columnWidth: 37, halign:'left'},
                   invoice_name : {columnWidth: 25, halign:'center'},
                   supplier_invoice_number : {columnWidth: 24, halign:'center'},
-                  date_due: {columnWidth: 24, halign:'center'},
-                  amount_total: {columnWidth: 21, halign:'right'},
-                  amount_pagado : {columnWidth: 21, halign:'right'},
+                  forma: forma,
+                  date_due: {columnWidth: 23, halign:'center'},
+                  amount_total: {columnWidth: 20, halign:'right'},
+                  amount_pagado : {columnWidth: 20, halign:'right'},
                   amount_residual : {columnWidth: 18, halign:'right'},
                   user_name : {columnWidth: 21, halign:'center'},
 

+ 11 - 2
static/src/js/reports/report_sale_resumen_dna.js

@@ -580,6 +580,13 @@ function report_sale_resumen_dna(reporting){
                   _.each(AccountInvoice,function(item2) {
                     var total_sale = 0;
                     var partner= self.getResPartner(item2.partner_id[0]);
+                    var forma = 'Contado';
+                     if (item.contado == true){
+                        forma = 'Contado'
+                     };
+                     if (item.credito == true){
+                        forma = 'Credito'
+                     };
                     var AccountInvoiceLine = self.getAccountInvoiceLine(item2.id);
                     _.each(AccountInvoiceLine, function(line_item){
                      if(item2.is_anticipo == false){
@@ -617,6 +624,7 @@ function report_sale_resumen_dna(reporting){
                         partner_email: self.valorNull(item2.partner_id[3]),
                         partner_mobile: self.valorNull(item2.partner_id[4]),
                         invoice_name : self.valorNull(item2.number),
+                        forma: forma,
                         supplier_invoice_number: self.valorNull(item2.supplier_invoice_number),
                         product_code : self.valorNull(line_item.product_id.default_code),
                         barcode : self.valorNull(line_item.product_id.ean13),
@@ -711,12 +719,13 @@ function report_sale_resumen_dna(reporting){
                   partner_name : {columnWidth: 23, halign:'center'},
                   invoice_name : {columnWidth: 25, halign:'center'},
                   supplier_invoice_number : {columnWidth: 28, halign:'center'},
+                  forma : {columnWidth: 13, halign:'center'},
                   product_brand_id : {columnWidth: 21, halign:'center'},
                   barcode : {columnWidth: 23, halign:'center'},
-                  product_code : {columnWidth: 21, halign:'center'},
+                  product_code : {columnWidth: 19, halign:'center'},
                   product_name : {columnWidth: 40, halign:'center'},
                   item_price : {columnWidth: 21, halign:'right'},
-                  qty : {columnWidth: 16, halign:'center'},
+                  qty : {columnWidth: 14, halign:'center'},
                   total_price : {columnWidth: 21, halign:'right'},
                   user_name : {columnWidth: 23, halign:'center'},
 

+ 1 - 0
static/src/reports/report_cuenta_resumen_dna.xml

@@ -98,6 +98,7 @@
                           <th data-field="partner_email" data-align="center">Email</th>
                           <th data-field="invoice_name" data-align="center">Referencia</th>
                           <th data-field="supplier_invoice_number" data-align="center">Factura</th>
+                          <th data-field="forma" data-align="center">Forma</th>
                           <th data-field="date_due" data-align="center">Vence</th>
                           <th data-field="amount_total" data-footer-formatter="totalTotalFormatter" data-align="right">Monto Total</th>
                           <th data-field="amount_pagado" data-footer-formatter="totalPagadoFormatter" data-align="right">Monto Pagado</th>

+ 1 - 0
static/src/reports/report_sale_resumen_dna.xml

@@ -100,6 +100,7 @@
                           <th data-field="partner_name" data-align="center">Cliente</th>
                           <th data-field="invoice_name" data-align="center">Referencia</th>
                           <th data-field="supplier_invoice_number" data-align="center">Factura</th>
+                          <th data-field="forma" data-align="center">Forma</th>
                           <th data-field="product_brand_id" data-align="center">Marca</th>
                           <th data-field="product_code" data-align="center">Cod. Producto</th>
                           <th data-field="barcode" data-align="center">Cod.Barra</th>