Browse Source

testing changes in dates, cashout index and sales report

jose miguel 7 years ago
parent
commit
e98a9eda9e

+ 2 - 2
app/views/cash_outs/index.html.erb

@@ -177,8 +177,8 @@
   });
 
   function cashOutByPointsaleDate() {
-    var start = moment($("#begin_date").data("date"), "DD-MM-YYYY").startOf('Day').format('YYYY-MM-DD HH:mm:ss');
-    var end = moment($("#end_date").data("date"), "DD-MM-YYYY").endOf('day').format('YYYY-MM-DD HH:mm:ss');
+    var start = moment($("#begin_date").data("date"), "DD-MM-YYYY").utc().format('YYYY-MM-DD HH:mm:ss');
+    var end = moment($("#end_date").data("date"), "DD-MM-YYYY").utcOffset("+360").format('YYYY-MM-DD HH:mm:ss');
     var pointsale = $('#pointsale').val();
     App.blockUI({
          target: $("#cash_outs_table"),

+ 4 - 2
app/views/sales/sales_per_month_report.html.erb

@@ -194,8 +194,10 @@
     //buscar ventas por periodo de tiempo
     function findSalesByPeriod() {
       var pointsale = $('#pointsale').val();
-      var start = moment($("#start").val(), "DD-MM-YYYY").startOf('Day').format('YYYY-MM-DD H:mm:ss');
-      var end = moment($("#end").val(), "DD-MM-YYYY").endOf('Day').format('YYYY-MM-DD H:mm:ss');
+      var start = moment($("#start").data("date"), "DD-MM-YYYY").utc().format('YYYY-MM-DD HH:mm:ss');
+      var end = moment($("#end").data("date"), "DD-MM-YYYY").utcOffset("+360").format('YYYY-MM-DD HH:mm:ss');
+      // var start = moment($("#start").val(), "DD-MM-YYYY").startOf('Day').format('YYYY-MM-DD H:mm:ss');
+      // var end = moment($("#end").val(), "DD-MM-YYYY").endOf('Day').format('YYYY-MM-DD H:mm:ss');
 
       if ($("#start").val() && $("#end").val()) {
         App.blockUI({