finished incoming silica module

This commit is contained in:
vadivel J 2024-10-22 14:26:34 +05:30
parent b614019747
commit 2e309f4343
2 changed files with 26 additions and 8 deletions

View File

@ -144,7 +144,19 @@ class StockController extends BaseController
public function loadView_incomingSilicaSandDetails(){ public function loadView_incomingSilicaSandDetails(){
$month='2024-09'; if ($this->request->getMethod() === 'POST'){
$month = $this->request->getPost('month');
$date = DateTime::createFromFormat('M-Y', $month);
$formattedDate = $date->format('Y-m');
$month=$formattedDate;
}
else{
$month = date('Y-m');
}
$data['month']=$month; $data['month']=$month;
$this->global['pageTitle']='Incoming Silica Sand Details'; $this->global['pageTitle']='Incoming Silica Sand Details';
@ -158,6 +170,12 @@ class StockController extends BaseController
$data['igrDetails'] = []; $data['igrDetails'] = [];
} }
$date = DateTime::createFromFormat('Y-m', $month);
$formattedDate = $date->format('M-Y');
$data['month']=$formattedDate;
return $this->loadViews("incomingSilicaSandDetails", $this->global, $data, NULL); return $this->loadViews("incomingSilicaSandDetails", $this->global, $data, NULL);
} }

View File

@ -200,8 +200,8 @@
<input type="text" name="month" id="month" value="<?php echo "$month" ?>" class="form-control" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1"> <input type="text" name="month" id="month" value="<?php echo "$month" ?>" class="form-control" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1">
</div> </div>
<div class="col-3"> <div class="form-group col-md-2">
<input type="submit" value="Change Month" class="btn btn-success" style="margin-top:0px;"> <button type="submit" class="btn btn-success"> Change Month </button>
</div> </div>
</div> </div>
</form> </form>
@ -273,12 +273,12 @@
</td> </td>
<!-- 'td:eq(2)' --> <!-- 'td:eq(2)' -->
<td class="celda_normal" contenteditable="true"> <td class="celda_normal" >
<?php echo $record['invoiceNo']??''; ?> <?php echo $record['invoiceNo']??''; ?>
</td> </td>
<!-- 'td:eq(3)' --> <!-- 'td:eq(3)' -->
<td class="celda_normal" contenteditable="true" > <td class="celda_normal" >
<?php <?php
$dateString = $record['invoiceDate']; $dateString = $record['invoiceDate'];
$date = new DateTime($dateString); $date = new DateTime($dateString);
@ -288,7 +288,7 @@
</td> </td>
<!-- 'td:eq(4)' --> <!-- 'td:eq(4)' -->
<td class="celda_normal" contenteditable="true" > <td class="celda_normal" >
<?php <?php
$dateString = $record['materialRecievedDate']; $dateString = $record['materialRecievedDate'];
$date = new DateTime($dateString); $date = new DateTime($dateString);
@ -314,14 +314,14 @@
</td> </td>
<!-- 'td:eq(8)' --> <!-- 'td:eq(8)' -->
<td class="celda_normal" contenteditable="true" > <td class="celda_normal" >
<?php echo $record['VehicleNo']??''; ?> <?php echo $record['VehicleNo']??''; ?>
</td> </td>
<!-- calculateRow() for every td change below --> <!-- calculateRow() for every td change below -->
<!-- 'td:eq(9)' --> <!-- 'td:eq(9)' -->
<td class="celda_normal" contenteditable="true" <td class="celda_normal"
onkeyup="calculateRow(this.parentNode.id);"> onkeyup="calculateRow(this.parentNode.id);">
<?php echo $record['Qty']??'0'; ?> <?php echo $record['Qty']??'0'; ?>
</td> </td>