diff --git a/app/Controllers/StockController.php b/app/Controllers/StockController.php index cb31f1e9..52678f66 100644 --- a/app/Controllers/StockController.php +++ b/app/Controllers/StockController.php @@ -1322,8 +1322,7 @@ class StockController extends BaseController $consumption = $row['Tot Gas Consumption']; $dateToBeInserted = $data['date']; $this->updateGasStockConsumption($dateToBeInserted, $consumption); - - + $inserts[] = $data; } diff --git a/app/Views/drierMachineDetails.php b/app/Views/drierMachineDetails.php index 6ad5fcca..ce18fbed 100644 --- a/app/Views/drierMachineDetails.php +++ b/app/Views/drierMachineDetails.php @@ -447,34 +447,58 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); - - +
- + @@ -621,17 +645,22 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); var alldata = $("#drierTable").tableToJSON(); - $('#drierTable tbody tr').each(function(index) { + console.log('alldata', alldata); + $('#drierTable tbody tr:visible').each(function(index) { + + if (alldata[index]) { let row = alldata[index]; // Get the selected values from dropdowns row['Drier On Time'] = $(this).find('.drier_on_time').val(); row['Drier Off Time'] = $(this).find('.drier_off_time').val(); row['Supplier Name'] = $(this).find('.supplier_name').val(); + } + }); - + alldata = JSON.stringify(alldata); @@ -911,7 +940,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');