changes in stock module -vadivelJ

This commit is contained in:
vadivel J 2024-11-16 17:24:56 +05:30
parent ab5e5b10a1
commit 1eb4ba2102
2 changed files with 15 additions and 4 deletions

View File

@ -772,6 +772,16 @@ public function loadView_gasStockDetails(){
$this->global['pageTitle'] = "Gas Stock Details";
$previousMonth = DateTime::createFromFormat('Y-m', $month)->modify('-1 month')->format('Y-m');
$previousMonthStartDate = "$previousMonth-01";
$previousMonthEndDate = date("Y-m-t", strtotime($previousMonthStartDate));
$data['previousMonthGasStockDetails'] = $this->gasStockDetails_model
->select('date,balanceStock')
->where('date =', $previousMonthEndDate)
->orderBy('date','desc')
->findAll();
$startDate = "$month-01";
$endDate = date("Y-m-t", strtotime($startDate));

View File

@ -328,7 +328,8 @@
foreach ($datesInMonth as $datesInMonthIndex => $dateInMonth) {
$dateInMonthDmYFormat = Datetime::createFromFormat('Y-m-d',$dateInMonth)->format('d-m-Y')
$dateInMonthDmYFormat = Datetime::createFromFormat('Y-m-d',$dateInMonth)->format('d-m-Y');
?>
<tr>
<td class="celda_normal"><?=$dateInMonthDmYFormat??'-'?></td>
@ -337,7 +338,7 @@
<?php if($datesInMonthIndex==0){echo"contenteditable='true'";}?>
oninput="openingStockChange(this)"
data-id="<?=$dateInMonth?>"
>0</td>
><?= $previousMonthGasStockDetails[0]['balanceStock'] ??'0' ?></td>
<td class="celda_normal purchaseBharath"
oninput="purchaseBharathStockChange(this)"
data-id="<?=$dateInMonth?>"
@ -353,10 +354,10 @@
>0</td>
<td class="celda_normal consumption"
data-id="<?=$dateInMonth?>"
contenteditable="true">0</td>
>0</td>
<td class="celda_normal balanceStock"
data-id="<?=$dateInMonth?>"
>0</td>
><?= $previousMonthGasStockDetails[0]['balanceStock'] ??'0' ?></td>
<td class="celda_normal">0</td>
<td class="celda_normal">0</td>
<td class="celda_normal">0</td>