stock changes-1 vadivel J 04-12-2024

This commit is contained in:
vadivelJ96 2024-12-05 09:32:50 +05:30
parent 9c5a41152c
commit c99566fd74
6 changed files with 62 additions and 22 deletions

View File

@ -259,7 +259,13 @@
foreach ($coatingMachineDetails as $record) { 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 <?php
$date = DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y'); $date = DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');

View File

@ -274,14 +274,22 @@
<?php if(!empty($groupedBagStockDetails)) <?php if(!empty($groupedBagStockDetails))
{ {
//dd($groupedBagStockDetails);
foreach($groupedBagStockDetails as $groupedBagStockDetailsIndex => $bagStockDetails){ 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 foreach($bagStockDetails as $bagStockIndex => $bagStock){ ?>
<?php if ($bagStockIndex == 0): ?> <?php if ($bagStockIndex == 0): ?>
<?php <?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"> <td class="celda_normal">
<?= $startDate ?> <?= $startDate ?>
@ -363,7 +371,15 @@
?> ?>
<?php foreach($datesInMonth as $datesInMonthIndex => $dateInMonth){ ?> <?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 <?php
foreach($bagMaterials as $bagMaterialIndex => $bagMaterial){ ?> foreach($bagMaterials as $bagMaterialIndex => $bagMaterial){ ?>
<!-- this will loop till materials present --> <!-- this will loop till materials present -->

View File

@ -245,15 +245,21 @@
<?php <?php
if(!empty($dustAndRoughStockDetails)){ if(!empty($dustAndRoughStockDetails)){
foreach($dustAndRoughStockDetails as $dustAndRoughStockDetailsIndex => $dustAndRoughStockDetail){ 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"> <td class="celda_normal">
<?php <?php
echo date("d-m-Y", strtotime($dustAndRoughStockDetail['date'])); echo date("d-m-Y", strtotime($dustAndRoughStockDetail['date']));
?> ?>
</td> </td>
<td class="celda_normal finalRough" <td class="celda_normal finalRough"
data-id="<?= $dustAndRoughStockDetail['date'] ?>" data-id="<?= $dustAndRoughStockDetail['date'] ?>"
@ -297,7 +303,13 @@
foreach($datesInMonth as $datesInMonthIndex => $dateInMonth){ 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"> <td class="celda_normal">
<?php <?php
echo date("d-m-Y", strtotime($dateInMonth)); echo date("d-m-Y", strtotime($dateInMonth));

View File

@ -288,16 +288,6 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
</div> </div>
</form> </form>
<!-- Add table-responsive for horizontal scroll --> <!-- Add table-responsive for horizontal scroll -->
<div class="table-responsive"> <div class="table-responsive">
<?php <?php

View File

@ -264,7 +264,15 @@
//dd($groupedResinStockDetails); //dd($groupedResinStockDetails);
foreach($groupedResinStockDetails as $groupedResinStockDetailsIndex => $resinStockDetails){ 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 foreach($resinStockDetails as $resinStockIndex => $resinStock){ ?>
<?php if ($resinStockIndex == 0): ?> <?php if ($resinStockIndex == 0): ?>
<?php <?php
@ -350,7 +358,15 @@
?> ?>
<?php foreach($datesInMonth as $datesInMonthIndex => $dateInMonth){ ?> <?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 <?php
foreach($resinMaterials as $resinMaterialIndex => $resinMaterial){ ?> foreach($resinMaterials as $resinMaterialIndex => $resinMaterial){ ?>
<!-- this will loop till materials present --> <!-- this will loop till materials present -->