stock changes-1 vadivel J 04-12-2024
This commit is contained in:
parent
9c5a41152c
commit
c99566fd74
@ -1460,7 +1460,7 @@ class StockController extends BaseController
|
||||
$data['powerConsumptionDetails'] = $this->getElectricConsumptionPivot($data['machineDetails'], $data['startDate'], $data['endDate']);
|
||||
if (!count($data['powerConsumptionDetails'])) {
|
||||
//insert empty data
|
||||
$tempInsert = [];
|
||||
$tempInsert = [];
|
||||
foreach ($monthData as $key => $value) {
|
||||
array_push($tempInsert, ['date' => $value['database'], 'machine_id' => $data['machineDetails'][0]['id']]);
|
||||
}
|
||||
|
||||
@ -259,7 +259,13 @@
|
||||
|
||||
foreach ($coatingMachineDetails as $record) {
|
||||
?>
|
||||
<tr data-id="<?php echo $record['id']; ?>">
|
||||
<tr data-id="<?php echo $record['id']; ?>"
|
||||
<?php
|
||||
$currentDate = date('d-m-Y');
|
||||
$dateInMonthDmYFormat=DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');
|
||||
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
||||
?>
|
||||
>
|
||||
|
||||
<?php
|
||||
$date = DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');
|
||||
|
||||
@ -274,14 +274,22 @@
|
||||
|
||||
<?php if(!empty($groupedBagStockDetails))
|
||||
{
|
||||
//dd($groupedBagStockDetails);
|
||||
|
||||
foreach($groupedBagStockDetails as $groupedBagStockDetailsIndex => $bagStockDetails){
|
||||
?>
|
||||
<tr>
|
||||
<tr
|
||||
|
||||
<?php
|
||||
|
||||
$currentDate = date('d-m-Y');
|
||||
$dateInMonthDmYFormat= DateTime::createFromFormat('Y-m-d', $bagStockDetails[0]['date'])->format('d-m-Y');
|
||||
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
||||
?>
|
||||
>
|
||||
<?php foreach($bagStockDetails as $bagStockIndex => $bagStock){ ?>
|
||||
<?php if ($bagStockIndex == 0): ?>
|
||||
<?php
|
||||
$startDate =DateTime::createFromFormat('Y-m-d', $bagStock['date'])->format('d-m-Y');
|
||||
$startDate = DateTime::createFromFormat('Y-m-d', $bagStock['date'])->format('d-m-Y');
|
||||
?>
|
||||
<td class="celda_normal">
|
||||
<?= $startDate ?>
|
||||
@ -363,7 +371,15 @@
|
||||
?>
|
||||
|
||||
<?php foreach($datesInMonth as $datesInMonthIndex => $dateInMonth){ ?>
|
||||
<tr>
|
||||
<tr
|
||||
|
||||
<?php
|
||||
|
||||
$currentDate = date('d-m-Y');
|
||||
$dateInMonthDmYFormat=DateTime::createFromFormat('Y-m-d', $dateInMonth)->format('d-m-Y');
|
||||
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
||||
?>
|
||||
>
|
||||
<?php
|
||||
foreach($bagMaterials as $bagMaterialIndex => $bagMaterial){ ?>
|
||||
<!-- this will loop till materials present -->
|
||||
|
||||
@ -245,15 +245,21 @@
|
||||
|
||||
<?php
|
||||
if(!empty($dustAndRoughStockDetails)){
|
||||
|
||||
foreach($dustAndRoughStockDetails as $dustAndRoughStockDetailsIndex => $dustAndRoughStockDetail){
|
||||
?>
|
||||
<tr>
|
||||
<tr
|
||||
<?php
|
||||
$currentDate = date('d-m-Y');
|
||||
$dateInMonthDmYFormat=DateTime::createFromFormat('Y-m-d', $dustAndRoughStockDetail['date'])->format('d-m-Y');
|
||||
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
||||
?>
|
||||
>
|
||||
|
||||
<td class="celda_normal">
|
||||
<?php
|
||||
echo date("d-m-Y", strtotime($dustAndRoughStockDetail['date']));
|
||||
?>
|
||||
</td>
|
||||
</td>
|
||||
|
||||
<td class="celda_normal finalRough"
|
||||
data-id="<?= $dustAndRoughStockDetail['date'] ?>"
|
||||
@ -297,7 +303,13 @@
|
||||
|
||||
foreach($datesInMonth as $datesInMonthIndex => $dateInMonth){
|
||||
?>
|
||||
<tr>
|
||||
<tr
|
||||
<?php
|
||||
$currentDate = date('d-m-Y');
|
||||
$dateInMonthDmYFormat=date("d-m-Y", strtotime($dateInMonth));
|
||||
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
||||
?>
|
||||
>
|
||||
<td class="celda_normal">
|
||||
<?php
|
||||
echo date("d-m-Y", strtotime($dateInMonth));
|
||||
|
||||
@ -288,16 +288,6 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Add table-responsive for horizontal scroll -->
|
||||
<div class="table-responsive">
|
||||
<?php
|
||||
|
||||
@ -264,7 +264,15 @@
|
||||
//dd($groupedResinStockDetails);
|
||||
foreach($groupedResinStockDetails as $groupedResinStockDetailsIndex => $resinStockDetails){
|
||||
?>
|
||||
<tr>
|
||||
<tr
|
||||
|
||||
<?php
|
||||
|
||||
$currentDate = date('d-m-Y');
|
||||
$dateInMonthDmYFormat= DateTime::createFromFormat('Y-m-d', $resinStockDetails[0]['date'])->format('d-m-Y');
|
||||
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
||||
?>
|
||||
>
|
||||
<?php foreach($resinStockDetails as $resinStockIndex => $resinStock){ ?>
|
||||
<?php if ($resinStockIndex == 0): ?>
|
||||
<?php
|
||||
@ -350,7 +358,15 @@
|
||||
?>
|
||||
|
||||
<?php foreach($datesInMonth as $datesInMonthIndex => $dateInMonth){ ?>
|
||||
<tr>
|
||||
<tr
|
||||
|
||||
<?php
|
||||
|
||||
$currentDate = date('d-m-Y');
|
||||
$dateInMonthDmYFormat= DateTime::createFromFormat('Y-m-d', $dateInMonth)->format('d-m-Y');
|
||||
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
||||
?>
|
||||
>
|
||||
<?php
|
||||
foreach($resinMaterials as $resinMaterialIndex => $resinMaterial){ ?>
|
||||
<!-- this will loop till materials present -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user