stock module latest today vadivel J 29-01-2025

This commit is contained in:
vadivelJ96 2025-01-29 14:17:40 +05:30
parent 2406b0fa71
commit 20a73ed18b
4 changed files with 24 additions and 21 deletions

View File

@ -6,7 +6,7 @@
// $routes->match(['GET', 'POST'], 'trpProductionDetails', 'StockController::trpProductionDetails'); // $routes->match(['GET', 'POST'], 'trpProductionDetails', 'StockController::trpProductionDetails');
# GET http://localhost/ci4/ria/trpProductionDetails GET http://localhost/ci4/ria/trpProductionDetails

View File

@ -496,7 +496,7 @@ class StockController extends BaseController
} else { } else {
$updated = $this->incomingSilicaSandDetails_model $updated = $this->incomingSilicaSandDetails_model
->insert($dbData); ->insert($dbData);
} }
if ($updated) { if ($updated) {

View File

@ -68,6 +68,8 @@ class TrpProductionModel extends Model
// Convert the array of material codes to a comma-separated string // Convert the array of material codes to a comma-separated string
$materialCodesString = "'" . implode("','", $materialCodes) . "'"; $materialCodesString = "'" . implode("','", $materialCodes) . "'";
// dd($materialCodes);
$sql = "SELECT $sql = "SELECT
@ -190,9 +192,9 @@ class TrpProductionModel extends Model
tigrd.CreatedDate , tigrd.CreatedDate ,
SUM(CASE WHEN ts.SupplierName = 'ASHOK LEYLAND LIMITED FOUNDRY DIVN - SPU' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS SUM(CASE WHEN ts.SupplierName = 'Ashok leyland limited foundry divn-SPU' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
`ALs_wcs`, `ALs_wcs`,
SUM(CASE WHEN ts.SupplierName = 'ASHOK LEYLAND LIMITED FOUNDRY DIVN - ENU' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS SUM(CASE WHEN ts.SupplierName = 'Ashok leyland limited foundry divn-ENU' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
`ALe_wcs`, `ALe_wcs`,
SUM(CASE WHEN ts.SupplierName = 'MADRAS ENGINEERING INDUSTRIES PRIVATE LIMITED' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS SUM(CASE WHEN ts.SupplierName = 'MADRAS ENGINEERING INDUSTRIES PRIVATE LIMITED' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
`ME_wcs`, `ME_wcs`,
@ -202,7 +204,7 @@ class TrpProductionModel extends Model
`caparo_wcs`, `caparo_wcs`,
SUM(CASE WHEN ts.SupplierName = 'NEMAK ALUMINIUM CASTING INDIA PVT LTD' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS SUM(CASE WHEN ts.SupplierName = 'NEMAK ALUMINIUM CASTING INDIA PVT LTD' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
`Nemak_wcs`, `Nemak_wcs`,
SUM(CASE WHEN ts.SupplierName = 'DR AXION INDIA PRIVATE LIMITED' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS SUM(CASE WHEN ts.SupplierName = 'DR Axion India Private Limited' THEN tigrd.QuantityAsPerInvoice ELSE 0 END) AS
`DR_wcs` `DR_wcs`
from t_igr_details tigrd from t_igr_details tigrd

View File

@ -570,7 +570,7 @@
<!-- td:eq(11) --> <!-- td:eq(11) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id=""> data-id="">
<?= $trpProductionDetail['drierGasConsumption'] ?> <?= $trpProductionDetail['drierGasConsumption'] == 0 ? " " : $trpProductionDetail['drierGasConsumption'] ?>
</td> </td>
<!-- coatingGasConsumption --> <!-- coatingGasConsumption -->
@ -612,18 +612,19 @@
<?= $trpProductionDetail['panelGasPerTon'] ?> <?= $trpProductionDetail['panelGasPerTon'] ?>
</td> </td>
<!-- AL(S) --> <!-- AL(S) -->
<!-- td:eq(17) --> <!-- td:eq(17) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id=""> data-id="">
<?= $trpProductionDetail['ALs_wcs'] ?> <?= $trpProductionDetail['ALs_wcs'] == 0 ? " " : $trpProductionDetail['ALs_wcs'] ?>
</td> </td>
<!-- AL(E) --> <!-- AL(E) -->
<!-- td:eq(18) --> <!-- td:eq(18) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id=""> data-id="">
<?= $trpProductionDetail['ALe_wcs'] ?> <?= $trpProductionDetail['ALe_wcs'] == 0 ? " " : $trpProductionDetail['ALe_wcs'] ?>
</td> </td>
<!-- ME --> <!-- ME -->
@ -631,21 +632,21 @@
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id="" data-id=""
contenteditable="true"> contenteditable="true">
<?= $trpProductionDetail['ME_wcs'] ?> <?= $trpProductionDetail['ME_wcs'] == 0 ? " " : $trpProductionDetail['ME_wcs'] ?>
</td> </td>
<!-- SI --> <!-- SI -->
<!-- td:eq(20) --> <!-- td:eq(20) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id=""> data-id="">
<?= $trpProductionDetail['SI_wcs'] ?> <?= $trpProductionDetail['SI_wcs'] == 0 ? " " : $trpProductionDetail['SI_wcs'] ?>
</td> </td>
<!-- Caparo --> <!-- Caparo -->
<!-- td:eq(21) --> <!-- td:eq(21) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id=""> data-id="">
<? $trpProductionDetail['caparo_wcs'] ?> <?= $trpProductionDetail['caparo_wcs'] == 0 ? " " : $trpProductionDetail['caparo_wcs'] ?>
</td> </td>
@ -653,14 +654,14 @@
<!-- td:eq(22) --> <!-- td:eq(22) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id=""> data-id="">
<?= $trpProductionDetail['Nemak_wcs'] ?> <?= $trpProductionDetail['Nemak_wcs'] == 0 ? " " : $trpProductionDetail['Nemak_wcs'] ?>
</td> </td>
<!-- DR --> <!-- DR -->
<!-- td:eq(23) --> <!-- td:eq(23) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id=""> data-id="">
<?= $trpProductionDetail['DR_wcs'] ?> <?= $trpProductionDetail['DR_wcs'] == 0 ? " " : $trpProductionDetail['DR_wcs'] ?>
</td> </td>
<!-- edRunningHours --> <!-- edRunningHours -->
@ -668,7 +669,7 @@
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id="" data-id=""
contenteditable="true"> contenteditable="true">
<?= $trpProductionDetail['edRunningHours'] ?> <?= $trpProductionDetail['edRunningHours'] ?>
</td> </td>
@ -709,42 +710,42 @@
<!-- td:eq(29) --> <!-- td:eq(29) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id=""> data-id="">
<?= $trpProductionDetail['coating'] ?> <?= $trpProductionDetail['coating'] == 0 ? " " : $trpProductionDetail['coating'] ?>
</td> </td>
<!-- Hindhuja --> <!-- Hindhuja -->
<!-- td:eq(30) --> <!-- td:eq(30) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id=""> data-id="">
<?= $trpProductionDetail['ALs_crs'] ?> <?= $trpProductionDetail['ALs_crs'] == 0 ? " " : $trpProductionDetail['ALs_crs'] ?>
</td> </td>
<!-- Nemak --> <!-- Nemak -->
<!-- td:eq(31) --> <!-- td:eq(31) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id=""> data-id="">
<?= $trpProductionDetail['Nemak_crs'] ?> <?= $trpProductionDetail['Nemak_crs'] == 0 ? " " : $trpProductionDetail['Nemak_crs'] ?>
</td> </td>
<!-- ME --> <!-- ME -->
<!-- td:eq(32) --> <!-- td:eq(32) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id="" data-id=""
contenteditable="true"> contenteditable="true">
<?= $trpProductionDetail['ME_crs'] ?> <?= $trpProductionDetail['ME_crs'] == 0 ? " " : $trpProductionDetail['ME_crs'] ?>
</td> </td>
<!-- BI --> <!-- BI -->
<!-- td:eq(33) --> <!-- td:eq(33) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id="" data-id=""
contenteditable="true"> contenteditable="true">
<?= $trpProductionDetail['BI_crs'] ?> <?= $trpProductionDetail['BI_crs'] == 0 ? " " : $trpProductionDetail['BI_crs'] ?>
</td> </td>
<!-- Karmen --> <!-- Karmen -->
<!-- td:eq(34) --> <!-- td:eq(34) -->
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id="" data-id=""
contenteditable="true"> contenteditable="true">
<?= $trpProductionDetail['Karmen_crs'] ?> <?= $trpProductionDetail['Karmen_crs'] == 0 ? " " : $trpProductionDetail['Karmen_crs'] ?>
</td> </td>
<!-- waterReceipt --> <!-- waterReceipt -->
@ -752,7 +753,7 @@
<td class="celda_normal trpProductionStock" <td class="celda_normal trpProductionStock"
data-id="" data-id=""
contenteditable="true"> contenteditable="true">
<?= $trpProductionDetail['waterReceipt'] ?> <?= $trpProductionDetail['waterReceipt'] ?>
</td> </td>
<!-- waterConsumption --> <!-- waterConsumption -->