diff --git a/app/Controllers/StockController.php b/app/Controllers/StockController.php
index a16a4e52..fb13d7d8 100644
--- a/app/Controllers/StockController.php
+++ b/app/Controllers/StockController.php
@@ -17,6 +17,8 @@ use App\Models\BagStockDetailsModel;
use App\Models\DustAndRoughModel;
use App\Models\ResinStockModel;
use App\Models\GasStockModel;
+use App\Models\TrpAbstract;
+use App\Models\TrpAbstractParticulars;
use App\Models\TrpSandUseStockModel;
use App\Models\TrpProductionModel;
use App\Models\TrpProductionMaintenanceModel;
@@ -27,6 +29,7 @@ use App\Models\PowerConsumptionSummaryModel;
+
use CodeIgniter\HTTP\ResponseInterface;
use DateTime;
use DatePeriod;
@@ -65,6 +68,11 @@ class StockController extends BaseController
protected $employeedetails_model;
+ protected $trpAbstractParticularsModel ;
+
+ protected $trpAbstractModel ;
+
+
/**
* This is default constructor of the class
*/
@@ -113,6 +121,10 @@ class StockController extends BaseController
$this->powerConsumptionSummary_model = new PowerConsumptionSummaryModel();
+ $this->trpAbstractParticularsModel = new TrpAbstractParticulars();
+
+ $this->trpAbstractModel = new TrpAbstract();
+
$this->session = session();
helper('form');
@@ -1749,11 +1761,9 @@ class StockController extends BaseController
{
- $postData = json_decode($this->request->getPost('updateTrpProductionDetails'));
-
-
- //converting std class object to associative array..
- $postData['updateTrpProductionDetails'] = json_decode(json_encode($postData), true);
+ $postData['updateTrpProductionDetails'] = json_decode($this->request->getPost('updateTrpProductionDetails'),true);
+
+
if (empty($postData['updateTrpProductionDetails'])) {
if (empty($inserts)) {
@@ -1907,6 +1917,7 @@ class StockController extends BaseController
{
$datesInMonth = [];
$inserts = [];
+ $trpAbstract = [] ;
$period = new DatePeriod(
new DateTime($startDate),
@@ -1920,6 +1931,25 @@ class StockController extends BaseController
foreach ($datesInMonth as $datesInMonthIndex => $dateInMonth) {
+ if($datesInMonthIndex == 0){
+
+ $trpAbstractParticulars =$this->trpAbstractParticularsModel->findAll();
+
+ foreach($trpAbstractParticulars as $index => $trpAbstractParticular){
+
+ $trpAbstract[] = [
+ 'date' => $dateInMonth ,
+ 'abs_opening_stock' => 0 ,
+ 'abs_physical_stock'=> 0 ,
+ 'abs_remarks' => " " ,
+ 'abs_particular_id' => $trpAbstractParticular['id'],
+ ];
+ }
+
+
+ }
+
+
$inserts[] = [
'Date' => $dateInMonth,
'openingTime' => " ",
diff --git a/app/Models/TrpAbstract.php b/app/Models/TrpAbstract.php
new file mode 100644
index 00000000..3df62676
--- /dev/null
+++ b/app/Models/TrpAbstract.php
@@ -0,0 +1,46 @@
+
-
-
-
-
-
+
+
+
+
+
+
@@ -1437,6 +1437,64 @@ $timeOtions[] = "12:00 AM";
+
+
+
+
+
+
+
+
+
+
+
+
Abstract for the month =$month?>
+
+
+
+
+
+
+ | Particulars |
+ Running Hours |
+ Per Hour |
+ Opening Stock |
+ Receipt |
+ Total |
+ Consumption |
+ Closing Stock |
+ Physical Stock |
+ Remarks |
+
+
+
+
+
+
+ | dummy |
+ dummy |
+ dummy |
+ dummy |
+ dummy |
+ dummy |
+ dummy |
+ dummy |
+ dummy |
+ dummy |
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1561,50 +1619,52 @@ $timeOtions[] = "12:00 AM";
Date : rowCells.eq(0).text().trim() ,
openingTime : openingTime ,
closingTime : closingTime ,
- totalHours : $(this).find(`td[data-id='${dateInYmD} totalHours']`),
- coldStart : $(this).find(`td[data-id='${dateInYmD} coldStart']`) ,
- breakdownHours : $(this).find(`td[data-id='${dateInYmD} breakdownHours']`) ,
- burnerFiringHours : $(this).find(`td[data-id='${dateInYmD} burnerFiringHours']`) ,
- sandFeedingHours : $(this).find(`td[data-id='${dateInYmD} sandFeedingHours']`) ,
- gasReceiptBg : $(this).find(`td[data-id='${dateInYmD} gasReceiptBg']`) ,
- gasReceiptPg : $(this).find(`td[data-id='${dateInYmD} gasReceiptPg']`) ,
- physicalGasConsumption : $(this).find(`td[data-id='${dateInYmD} physicalGasConsumption']`) ,
- trpPlusDrierGasConsumption : $(this).find(`td[data-id='${dateInYmD} trpPlusDrierGasConsumption']`) ,
- trpPhysicalGasPerTon : $(this).find(`td[data-id='${dateInYmD} trpPhysicalGasPerTon']`) ,
- panelGasConsumption : $(this).find(`td[data-id='${dateInYmD} panelGasConsumption']`) ,
- panelGasPerTon : $(this).find(`td[data-id='${dateInYmD} panelGasPerTon']`) ,
- edRunningHours : $(this).find(`td[data-id='${dateInYmD} edRunningHours']`) ,
- edProduction : $(this).find(`td[data-id='${dateInYmD} edProduction']`) ,
- edUsage : $(this).find(`td[data-id='${dateInYmD} edUsage']`) ,
- waterConsumption : $(this).find(`td[data-id='${dateInYmD} waterConsumption']`) ,
- trpProduction : $(this).find(`td[data-id='${dateInYmD} trpProduction']`) ,
- trpProductionPerHour : $(this).find(`td[data-id='${dateInYmD} trpProductionPerHour']`) ,
- waterReceipt : $(this).find(`td[data-id='${dateInYmD} waterReceipt']`) ,
- ebReading : $(this).find(`td[data-id='${dateInYmD} ebReading']`) ,
- ebReadingPerUnitTon : $(this).find(`td[data-id='${dateInYmD} ebReadingPerUnitTon']`) ,
- workingPersonEngineers : $(this).find(`td[data-id='${dateInYmD} workingPersonEngineers']`) ,
- workingPersonSupervisiors : $(this).find(`td[data-id='${dateInYmD} workingPersonSupervisiors']`) ,
- workingPersonOperators : $(this).find(`td[data-id='${dateInYmD} workingPersonOperators']`) ,
- rollerDrivers : $(this).find(`td[data-id='${dateInYmD} rollerDrivers']`) ,
- natureOfMaintenance : $(this).find(`td[data-id='${dateInYmD} natureOfMaintenance']`) ,
- location : $(this).find(`td[data-id='${dateInYmD} location']`) ,
- description : $(this).find(`td[data-id='${dateInYmD} description']`) ,
- msSeperation : $(this).find(`td[data-id='${dateInYmD} msSeperation']`) ,
- edWaste : $(this).find(`td[data-id='${dateInYmD} edWaste']`) ,
- coolerBags : $(this).find(`td[data-id='${dateInYmD} coolerBags']`) ,
- edPlus20Waste : $(this).find(`td[data-id='${dateInYmD} edPlus20Waste']`) ,
- cycloneWaste : $(this).find(`td[data-id='${dateInYmD} cycloneWaste']`) ,
+ totalHours : $(this).find(`td[data-id='${dateInYmD} totalHours']`).text(),
+ coldStart : $(this).find(`td[data-id='${dateInYmD} coldStart']`).text() ,
+ breakdownHours : $(this).find(`td[data-id='${dateInYmD} breakdownHours']`).text() ,
+ burnerFiringHours : $(this).find(`td[data-id='${dateInYmD} burnerFiringHours']`).text() ,
+ sandFeedingHours : $(this).find(`td[data-id='${dateInYmD} sandFeedingHours']`).text() ,
+ gasReceiptBg : $(this).find(`td[data-id='${dateInYmD} gasReceiptBg']`).text() ,
+ gasReceiptPg : $(this).find(`td[data-id='${dateInYmD} gasReceiptPg']`).text() ,
+ physicalGasConsumption : $(this).find(`td[data-id='${dateInYmD} physicalGasConsumption']`).text() ,
+ trpPlusDrierGasConsumption : $(this).find(`td[data-id='${dateInYmD} trpPlusDrierGasConsumption']`).text() ,
+ trpPhysicalGasPerTon : $(this).find(`td[data-id='${dateInYmD} trpPhysicalGasPerTon']`).text() ,
+ panelGasConsumption : $(this).find(`td[data-id='${dateInYmD} panelGasConsumption']`).text() ,
+ panelGasPerTon : $(this).find(`td[data-id='${dateInYmD} panelGasPerTon']`).text() ,
+ edRunningHours : $(this).find(`td[data-id='${dateInYmD} edRunningHours']`).text() ,
+ edProduction : $(this).find(`td[data-id='${dateInYmD} edProduction']`).text() ,
+ edUsage : $(this).find(`td[data-id='${dateInYmD} edUsage']`) .text() ,
+ waterConsumption : $(this).find(`td[data-id='${dateInYmD} waterConsumption']`) .text() ,
+ trpProduction : $(this).find(`td[data-id='${dateInYmD} trpProduction']`) .text() ,
+ trpProductionPerHour : $(this).find(`td[data-id='${dateInYmD} trpProductionPerHour']`).text() ,
+ waterReceipt : $(this).find(`td[data-id='${dateInYmD} waterReceipt']`) .text() ,
+ ebReading : $(this).find(`td[data-id='${dateInYmD} ebReading']`) .text() ,
+ ebReadingPerUnitTon : $(this).find(`td[data-id='${dateInYmD} ebReadingPerUnitTon']`) .text() ,
+ workingPersonEngineers : $(this).find(`td[data-id='${dateInYmD} workingPersonEngineers']`).text() ,
+ workingPersonSupervisiors : $(this).find(`td[data-id='${dateInYmD} workingPersonSupervisiors']`).text() ,
+ workingPersonOperators : $(this).find(`td[data-id='${dateInYmD} workingPersonOperators']`).text() ,
+ rollerDrivers : $(this).find(`td[data-id='${dateInYmD} rollerDrivers']`).text() ,
+ natureOfMaintenance : $(this).find(`td[data-id='${dateInYmD} natureOfMaintenance']`).text() ,
+ location : $(this).find(`td[data-id='${dateInYmD} location']`).text() ,
+ description : $(this).find(`td[data-id='${dateInYmD} description']`).text() ,
+ msSeperation : $(this).find(`td[data-id='${dateInYmD} msSeperation']`).text() ,
+ edWaste : $(this).find(`td[data-id='${dateInYmD} edWaste']`).text() ,
+ coolerBags : $(this).find(`td[data-id='${dateInYmD} coolerBags']`).text() ,
+ edPlus20Waste : $(this).find(`td[data-id='${dateInYmD} edPlus20Waste']`).text() ,
+ cycloneWaste : $(this).find(`td[data-id='${dateInYmD} cycloneWaste']`).text() ,
};
rows.push(rowData);
+
+
});
return JSON.stringify(rows, null, 2);
}
-
+