Browse Source

[FIX] limpieza de cofigo

Rodney Elpidio Enciso Arias 7 năm trước cách đây
mục cha
commit
c17fe5d0bd

+ 6 - 5
static/src/js/widgets/chart_ingreso_egreso.js

@@ -177,7 +177,7 @@ function chart_ingreso_egreso (widget) {
                 }),function(memo, num) {
                     return memo + num;
                 },0);
-                dataOut.push(total);
+                dataOut.push(Math.abs(total));
             }
             self.$el.unblock();
             self.$el.find('.widget-content.widget-loading').css('display','none');
@@ -209,7 +209,7 @@ function chart_ingreso_egreso (widget) {
                 }),function(memo, num) {
                     return memo + num;
                 },0);
-                dataOut.push(total);
+                dataOut.push(Math.abs(total));
             }
             self.$el.unblock();
             self.$el.find('.widget-content.widget-loading').css('display','none');
@@ -242,7 +242,7 @@ function chart_ingreso_egreso (widget) {
                 }),function(memo, num) {
                     return memo + num;
                 },0);
-                dataOut.push(total);
+                dataOut.push(Math.abs(total));
             }
             self.$el.unblock();
             self.$el.find('.widget-content.widget-loading').css('display','none');
@@ -284,7 +284,8 @@ function chart_ingreso_egreso (widget) {
                             fill: false,
                         },
                         {
-                            label: 'Egreso  ',                            
+                            label: 'Egreso  ',  
+                            borderDash: [5, 5],                          
                             data: bodyOut,
                             backgroundColor: '#c8e6c9',
                             borderColor: '#66bb6a',
@@ -304,7 +305,7 @@ function chart_ingreso_egreso (widget) {
                     },
                     layout: {
                         padding: {
-                            top: 5,
+                            top: 0,
                             bottom: 15,
                             left : 0,
                             rigth: 0,

+ 2 - 2
static/src/js/widgets/chart_pos_order_customer.js

@@ -213,8 +213,8 @@ function chart_pos_order_customer (widget) {
                     },
                     layout: {
                         padding: {
-                            top: 30,
-                            bottom: 0,
+                            top: 40,
+                            bottom: 10,
                             left : 0,
                             rigth: 0,
                         }

+ 2 - 2
static/src/js/widgets/chart_pos_order_product.js

@@ -241,8 +241,8 @@ function chart_pos_order_product (widget) {
                     },
                     layout: {
                         padding: {
-                            top: 20,
-                            bottom: 0,
+                            top: 30,
+                            bottom: 10,
                             left: 0,
                             rigth: 0,
                         }

+ 3 - 36
static/src/js/widgets/chart_pos_order_salesman.js

@@ -11,7 +11,7 @@ function chart_pos_order_salesman (widget) {
         modelId: [],
 
         events: {
-            // 'click canvas': 'showCustomers'
+            
         },
         init: function (parent) {
             this._super(parent, {
@@ -112,7 +112,6 @@ function chart_pos_order_salesman (widget) {
 
             return defer;
         },
-        // Obtener facturas por cada clientes
         getPosOrder:function(partner_id) {
             var self = this;
             return _.flatten(_.filter(self.PosOrder,function (inv) {
@@ -176,7 +175,6 @@ function chart_pos_order_salesman (widget) {
                 label.push(item.name);
                 body.push(item.countPosOrder);
             }
-            // console.log(body);
             // Global method for setting Y axis number format.
             Chart.scaleService.updateScaleDefaults('linear', {
               ticks: {
@@ -208,24 +206,14 @@ function chart_pos_order_salesman (widget) {
                 },
                 options: {
                     responsive: true,
-                    // title: {
-                    //     display: false,
-                    // },
                     hover: {
                         mode: 'nearest',
                         intersect: true
                     },
-                   // scales: {
-                   //     xAxes: [{ stacked: true }],
-                   //     yAxes: [{ stacked: true }],
-                   // },
-                   // legend: {
-                   //     display: false,
-                   // },
                     layout: {
                         padding: {
-                            top: 20,
-                            bottom: 0,
+                            top: 30,
+                            bottom: 10,
                             left : 0,
                             rigth: 0,
                         }
@@ -233,26 +221,5 @@ function chart_pos_order_salesman (widget) {
                 }
             });
         },
-        // llamar a la lista
-        // showCustomers: function (e) {
-        //     var self = this;
-        //     if (self.ranking.length === 0 ) {
-        //         model.web.notification.do_warn("Atención","Sin datos");
-        //         return
-        //     }
-        //     var hoy = moment().format('YYYY-MM-DD');
-        //     var partner_id = _.map(self.ranking,function(map){
-        //         return map.id;
-        //     })
-        //     this.do_action({
-        //         name: "Listado de clientes con más compras",
-        //         type: 'ir.actions.act_window',
-        //         res_model: "res.partner",
-        //         views: [[false,'list'],[self.modelId[1],'form']],
-        //         target: 'current',
-        //         domain: [['id', 'in', partner_id]],
-        //         context: {},
-        //     });
-        // }
     });
 }

+ 1 - 1
static/src/js/widgets/chart_purchase_expense.js

@@ -300,7 +300,7 @@ function chart_purchase_expense (widget) {
                     layout: {
                         padding: {
                             top: 5,
-                            bottom: 20,
+                            bottom: 15,
                             left : 0,
                             rigth: 0,
                         }

+ 1 - 1
static/src/xml/widgets/chart_ingreso_egreso.xml

@@ -9,7 +9,7 @@
                         <span>Ingreso - Egreso</span> 
                     </div>
                     <div class="col-xs-6">
-                        <div class="col-xs-6 col-xs-offset-9">
+                        <div class="col-xs-6 col-xs-offset-10">
                             <div class="btn-group btn-group-xs">
                                 <a type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                 <span class="caret"></span>

+ 1 - 1
static/src/xml/widgets/chart_pos_order.xml

@@ -10,7 +10,7 @@
                         <span>Ventas</span> 
                     </div>
                     <div class="col-xs-6">
-                        <div class="col-xs-6 col-xs-offset-9">
+                        <div class="col-xs-6 col-xs-offset-10">
                             <div class="btn-group btn-group-xs">
                                 <a type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                 <span class="caret"></span>

+ 1 - 1
static/src/xml/widgets/chart_purchase_expense.xml

@@ -10,7 +10,7 @@
                         <span>Compras y Gastos</span> 
                     </div>
                     <div class="col-xs-6">
-                        <div class="col-xs-6 col-xs-offset-9">
+                        <div class="col-xs-6 col-xs-offset-10">
                             <div class="btn-group btn-group-xs">
                                 <a type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                 <span class="caret"></span>

+ 2 - 2
static/src/xml/widgets/widget_bank.xml

@@ -2,12 +2,12 @@
 <template xml:space="preserve">
     <t t-name="WidgetBank">
         <div>
-            <div class="grid-stack-item-content reporting-dashboard balance">
+            <div class="grid-stack-item-content reporting-dashboard">
                 <h2 class="widget-title">
                     <div class="row">
                         <div class="col-xs-6">
                            <i class="fa fa-money" aria-hidden="true"> </i>
-                            Caja Banco
+                            Banco
                         </div>
                         <div class="col-xs-6">
                             <div class="col-xs-6 col-xs-offset-9">

+ 2 - 2
static/src/xml/widgets/widget_cash.xml

@@ -2,12 +2,12 @@
 <template xml:space="preserve">
     <t t-name="WidgetCash">
         <div>
-            <div class="grid-stack-item-content reporting-dashboard balance">
+            <div class="grid-stack-item-content reporting-dashboard">
                 <h2 class="widget-title">
                     <div class="row">
                         <div class="col-xs-6">
                            <i class="fa fa-money" aria-hidden="true"> </i>
-                            Caja Efectivo
+                            Efectivo
                         </div>
                         <div class="col-xs-6">
                             <div class="col-xs-6 col-xs-offset-9">