stock module latest today vadivel J 04-1-2025
This commit is contained in:
parent
aa166057d7
commit
c28461f5c2
4
api_test.http
Normal file
4
api_test.http
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
//$routes->match(['GET', 'POST'], 'trpProductionDetails', 'StockController::trpProductionDetails');
|
||||||
|
GET http://localhost/ci4/ria/trpProductionDetails
|
||||||
@ -1305,13 +1305,20 @@ class StockController extends BaseController
|
|||||||
|
|
||||||
$startDate = "$month-01";
|
$startDate = "$month-01";
|
||||||
$endDate = date("Y-m-t", strtotime($startDate));
|
$endDate = date("Y-m-t", strtotime($startDate));
|
||||||
|
|
||||||
$data['trpProductionDetails'] = $this->TrpProductionMaintenance_model
|
$data['trpProductionDetails'] = $this->TrpProductionMaintenance_model
|
||||||
->join('t_trpProduction', 't_trpProduction.date = t_trpProductionMaintenance.date')
|
->select('tpmd.*, tpd.*, tpwd.*')
|
||||||
->join('t_trpProductionWaste', 't_trpProductionWaste.date = t_trpProductionMaintenance.date')
|
->from('t_trpProductionMaintenanceDetails tpmd')
|
||||||
->where('date >=', $startDate)
|
->join('t_trpProductionDetails tpd', 'tpd.date = tpmd.date')
|
||||||
->where('date <=', $endDate)
|
->join('t_trpProductionWasteDetails tpwd', 'tpwd.date = tpmd.date')
|
||||||
->orderBy('date', 'asc')
|
// ->join('ip_invoice_items', 'ip_invoice_items.item_date_added = tpmd.date',' AND ip_invoice_items.item_name = "Core Sand Reclaimed"')
|
||||||
->findAll();
|
->where('tpmd.date >=', $startDate)
|
||||||
|
->where('tpmd.date <=', $endDate)
|
||||||
|
->orderBy('tpmd.date', 'asc')
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$date = DateTime::createFromFormat('Y-m', $month);
|
$date = DateTime::createFromFormat('Y-m', $month);
|
||||||
|
|
||||||
@ -1319,7 +1326,9 @@ class StockController extends BaseController
|
|||||||
|
|
||||||
$data['month'] = $formattedDate;
|
$data['month'] = $formattedDate;
|
||||||
|
|
||||||
return $this->loadViews("trpSandUseStockDetails", $this->global, $data, NULL);
|
return $this->response->setJSON($data);
|
||||||
|
|
||||||
|
// return $this->loadViews("trpSandUseStockDetails", $this->global, $data, NULL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user