Bläddra i källkod

[FIX] Reducir tamanho de nombre de los productos y disminuir la cantidad de renking a 5

adrielso 8 år sedan
förälder
incheckning
c2bb0265bd

+ 1 - 2
static/src/js/widgets/payments_today_counters.js

@@ -151,12 +151,11 @@ function payments_today_counters (widget) {
             if (moneda.id != 166){
                 residual = accounting.formatNumber(residual, 2, ".", ",");
             }else{
-                residual = accounting.formatNumber(residual, 2, ".", ",");
+                residual = accounting.formatNumber(residual, ",", ".");
             }
 
             self.$el.find('.widget-content.widget-loading').css('display','none');
             self.$el.find('.widget-content').find('a').text(residual).append(' <small>'+moneda.symbol+'</small>');
-            // self.$el.find('.widget-footer').find('span').text("Monto en "+ company);
             self.$el.find('#morosidad').unblock();
         },
         showCustomers: function (e) {

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

@@ -113,8 +113,8 @@ function ranking_sales_partner (widget) {
             var label = [];
             var body = [];
             var item;
-            var rank = 10;
-            if (ranking.length < 10)
+            var rank = 5;
+            if (ranking.length < rank)
                 rank= ranking.length;
 
             for (var i = 0; i < rank; i++) {

+ 8 - 8
static/src/js/widgets/ranking_sales_product.js

@@ -113,9 +113,9 @@ function ranking_sales_product (widget) {
                         }, 0);
                         lineUnik = itemLine.shift();
                         ranking.push({
-                            product: lineUnik.product_id[1],
-                            qty: cat,
-                            id: lineUnik.product_id[0]
+                                    product : itemProduct.name_template,
+                                    qty : cat,
+                                    id : lineUnik.product_id[0]
                         });
                     }
                 }
@@ -128,7 +128,6 @@ function ranking_sales_product (widget) {
             var fecha = new Date();
             var meses = new Array ("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
             self.$el.find('.widget-title').find('span').text("Ranking de productos más vendidos del mes de " + meses[fecha.getMonth()]);
-            // self.$el.find('.widget-title').find('span').text("Ranking de productos más vendidos");
             self.ranking=ranking;
             self.fetchChart(ranking);
         },
@@ -145,8 +144,8 @@ function ranking_sales_product (widget) {
             var label = [];
             var body = [];
             var item;
-            var rank = 10;
-            if (ranking.length < 10)
+            var rank = 5;
+            if (ranking.length < rank)
                 rank= ranking.length;
 
             for (var i = 0; i < rank; i++) {
@@ -158,13 +157,11 @@ function ranking_sales_product (widget) {
                 body.push(item.qty);
             }
             var chart = new Chart(this.$el.find(".widget-content").find('canvas'), {
-                // type: 'doughnut',
                 type: 'pie',
                 data: {
                     labels: label,
                     datasets: [
                         {
-                            // backgroundColor: ['#01579B','#0277BD','#0288D1','#039BE5','#03A9F4','#29B6F6','#4FC3F7','#81D4FA','#B3E5FC','#E1F5FE'],
                             backgroundColor: [  '#EF5350', '#EC407A', '#AB47BC', '#7E57C2', '#5C6BC0', '#42A5F5', '#26C6DA', '#26A69A', '#66BB6A', '#9CCC65'],
                             borderWidth	:0,
                             data: body,
@@ -183,6 +180,9 @@ function ranking_sales_product (widget) {
                     legend: {
                         display: false,
                     },
+                    tooltips:{
+                        titleFontSize:7,
+                    }
                 }
             });
         },