Pārlūkot izejas kodu

Agregar en la fidelización ciudad en el reporte.

sebas 3 gadi atpakaļ
vecāks
revīzija
686cc189cc

+ 12 - 6
controller/helpers/account_invoice.py

@@ -32,7 +32,8 @@ def get_account_invoice_sale_type_baco(): #historico de venta
             customer.mobile,
             customer.email,
             invoice.is_delivery,
-            invoice.delivery_type
+            invoice.delivery_type,
+            customer.city
         FROM account_invoice AS invoice
         LEFT JOIN res_store_journal_rel AS journal
         ON journal.journal_id = invoice.journal_id
@@ -70,7 +71,8 @@ def get_account_invoice_sale_type_baco(): #historico de venta
             invoice.supplier_invoice_number,
             customer.phone,
             customer.mobile,
-            customer.email
+            customer.email,
+            customer.city
     '''
 
     query2 = '''
@@ -100,7 +102,8 @@ def get_account_invoice_sale_type_baco(): #historico de venta
             customer.mobile,
             customer.email,
             invoice.is_delivery,
-            invoice.delivery_type
+            invoice.delivery_type,
+            customer.city
         FROM account_invoice AS invoice
         LEFT JOIN res_store_journal_rel AS journal
         ON journal.journal_id = invoice.journal_id
@@ -138,7 +141,8 @@ def get_account_invoice_sale_type_baco(): #historico de venta
             invoice.supplier_invoice_number,
             customer.phone,
             customer.mobile,
-            customer.email
+            customer.email,
+            customer.city
     '''
 
     r.cr.execute(validate_columns)
@@ -174,7 +178,8 @@ def get_account_invoice_sale_type_baco(): #historico de venta
             'mobile':j[22],
             'email':j[23],
             'is_delivery':j[24],
-            'delivery_type':j[25]
+            'delivery_type':j[25],
+            'city':j[26]
         } for j in r.cr.fetchall()]
     else:
         r.cr.execute(query1,(tuple([company_currency_rate,company_currency_rate])))
@@ -202,5 +207,6 @@ def get_account_invoice_sale_type_baco(): #historico de venta
             'mobile':j[20],
             'email':j[21],
             'is_delivery':j[22],
-            'delivery_type':j[23]
+            'delivery_type':j[23],
+            'city':j[24]
         } for j in r.cr.fetchall()]

+ 1 - 5
static/src/js/reports/report_ventas_fidelizacion.js

@@ -80,7 +80,6 @@ function report_ventas_fidelizacion(reporting){
                 =================================
                 */
                 self.ResStore = IntialSQL.stores;
-                // console.log(self.ResStore);
                 if(self.ResStore.length > 1){
                     self.$el.find('#current-store').append('<option value="9999999">Todas las sucursales</option>');
                     _.each(self.ResStore,function(item){
@@ -480,12 +479,10 @@ function report_ventas_fidelizacion(reporting){
         getStoreName:function(store_id){
           var self = this;
 
-          // console.log(store_id);
           var ResStore =  _.filter(self.ResStore,function (item) {
                   return item.id == store_id;
           });
-          // console.log(ResStore);
-          //return ResStore[0].name;
+
           return ResStore.name;
         },
 
@@ -503,7 +500,6 @@ function report_ventas_fidelizacion(reporting){
             var suma = PosOrder[1] + AccountInvoice[1];
 
             _.each(PosOrder[0], function(item){
-                console.log(item);
                 var utc = moment.utc(item.date,'YYYY-MM-DD h:mm:ss A');
 
                 data.push({