diff --git a/app/Controllers/StockController.php b/app/Controllers/StockController.php index 28bbc206..fb4e4320 100644 --- a/app/Controllers/StockController.php +++ b/app/Controllers/StockController.php @@ -48,23 +48,6 @@ class StockController extends BaseController public function addNewCoatingMachineDetails(){ $postData=$this->request->getPost(); - - $machineOnTime = $postData['machineOnTime']; - $machineOffTime = $postData['machineOffTime']; - - $onTime = new DateTime($machineOnTime); - $offTime = new DateTime($machineOffTime); - - $timeDifference = $onTime->diff($offTime); - - $machineRunningInHrs = $timeDifference->h ; - - $postData['machineRunningInHrs'] = $machineRunningInHrs; - $postData['perHourGasConsumption'] = number_format((float)$postData['totalGasConsumption'] / $machineRunningInHrs, 2, '.', ''); - $postData['perHourCoatingSandQTY'] = number_format((float)$postData['totalCoatingSandInKg'] / $machineRunningInHrs, 2, '.', ''); - - - $inserted= $this->coatingMachineDetails_model->insert($postData); diff --git a/app/Views/CoatingMachineDetail.php b/app/Views/CoatingMachineDetail.php index 77447c76..3bf67dce 100644 --- a/app/Views/CoatingMachineDetail.php +++ b/app/Views/CoatingMachineDetail.php @@ -206,25 +206,25 @@ * + name="date" value="" required>
* + name="shift" value="" required>
* - +
* - +
@@ -234,27 +234,32 @@ * + name="customerName" value="" required>
* + name="totalCoating" value="" required>
* + name="totalCoatingSandInKg" value="" required>
* + name="totalGasConsumption" value="" required>
+ + + + + @@ -292,26 +297,26 @@ * + name="date" value="" required>
* + name="shift" value="" required>
* + name="machineOnTime" value="" required>
* + name="machineOffTime" value="" required>
@@ -321,28 +326,33 @@ * + name="customerName" value="" required>
* + name="totalCoating" value="" required>
* + name="totalCoatingSandInKg" value="" required>
* + name="totalGasConsumption" value="" required>
+ + + + + @@ -427,9 +437,7 @@ $(document).ready(function() { - - - + + + + + + + + + + + + + + + + +