Bladeren bron

[FIX] Resuelto problema con el filtro de fecha

Rodney Elpidio Enciso Arias 7 jaren geleden
bovenliggende
commit
4dc623ae90
1 gewijzigde bestanden met toevoegingen van 5 en 7 verwijderingen
  1. 5 7
      static/src/js/widgets/pos_order_today_counters.js

+ 5 - 7
static/src/js/widgets/pos_order_today_counters.js

@@ -9,8 +9,8 @@ function pos_order_today_counters(widget) {
         accountInvoice: [],
 
         events: {
-            'click a': 'showCustomers',
-            'click h2': 'showCustomers',
+            'click a': 'showOrders',
+            'click h2': 'showOrders',
         },
         init: function (parent) {
             this._super(parent, {
@@ -60,7 +60,7 @@ function pos_order_today_counters(widget) {
             var self = this;
             var defer = $.Deferred();
             var hoy = moment().format('YYYY-MM-DD h:mm:ss');
-            // console.log(hoy)
+            // console.log(hoy);
             var fields = ['id', 'name','date_order'];
             var domain = [['state', 'in', ['paid','done','invoiced']],['date_order', '>=', hoy]];
             var PosOrder = new model.web.Model('pos.order');
@@ -74,22 +74,20 @@ function pos_order_today_counters(widget) {
             var self = this;
             var fecha = new Date();
             var cat = 0;
-
             if (PosOrder.length > 0) {
                 cat = PosOrder.length;
             }
-
             self.$el.find('.widget-content.widget-loading').css('display','none');
             self.$el.find('.widget-content').find('a').text(accounting.formatNumber(cat, ".", ","));
             self.$el.find('#morosidad').unblock();
         },
-        showCustomers: function (e) {
+        showOrders: function (e) {
             var self = this;
             if (self.PosOrder.length === 0) {
                 model.web.notification.do_warn("Atención","Sin datos");
                 return
             }
-            var hoy = moment().format('YYYY-MM-DD 00:00:00');
+            var hoy = moment().format('YYYY-MM-DD 03:00:00');
             this.do_action({
                 name: "Pedidos realizados hoy",
                 type: 'ir.actions.act_window',