stock module latest today vadivel J 23-01-2025
This commit is contained in:
parent
36ef2b7b99
commit
7cd9665eea
@ -1173,15 +1173,15 @@ class StockController extends BaseController
|
|||||||
foreach ($resultExists as $index => $result) {
|
foreach ($resultExists as $index => $result) {
|
||||||
|
|
||||||
if ($index == 0) {
|
if ($index == 0) {
|
||||||
$result['consumption'] = $result['consumption'] + ($consumption);
|
$result['consumption'] = (float)($result['consumption']) + (float)($consumption);
|
||||||
$result['total'] = $result['opening'] + $result['purchaseBharath'] + $result['purchaseIndian'];
|
$result['total'] = (float)$result['opening'] + (float)$result['purchaseBharath'] + (float)$result['purchaseIndian'];
|
||||||
$result['balanceStock'] = $result['total'] - $result['consumption'];
|
$result['balanceStock'] = $result['total'] - $result['consumption'];
|
||||||
$updatedOpeningStock = $result['balanceStock'];
|
$updatedOpeningStock = (int)$result['balanceStock'];
|
||||||
} else {
|
} else {
|
||||||
$result['opening'] = $updatedOpeningStock;
|
$result['opening'] = (float)$updatedOpeningStock;
|
||||||
$result['total'] = $result['opening'] + $result['purchaseBharath'] + $result['purchaseIndian'];
|
$result['total'] = (float)$result['opening'] + (float)$result['purchaseBharath'] + (float)$result['purchaseIndian'];
|
||||||
$result['balanceStock'] = $result['total'] - $result['consumption'];
|
$result['balanceStock'] = (float)$result['total'] - (float)$result['consumption'];
|
||||||
$updatedOpeningStock = $result['balanceStock'];
|
$updatedOpeningStock = (int)$result['balanceStock'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1248,9 +1248,9 @@ class StockController extends BaseController
|
|||||||
$inserts[] = [
|
$inserts[] = [
|
||||||
'date' => $dateInMonth,
|
'date' => $dateInMonth,
|
||||||
'opening' => $opening,
|
'opening' => $opening,
|
||||||
'purchaseBharath' => 0,
|
'purchaseBharath' => Null,
|
||||||
'purchaseIndian' => 0,
|
'purchaseIndian' => Null,
|
||||||
'total' => 0,
|
'total' => Null,
|
||||||
'consumption' => $consumptionForDate,
|
'consumption' => $consumptionForDate,
|
||||||
'balanceStock' => $balanceStock
|
'balanceStock' => $balanceStock
|
||||||
];
|
];
|
||||||
|
|||||||
@ -207,6 +207,40 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fht-table th:nth-child(1)
|
||||||
|
{
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
background-color: #00a65a;
|
||||||
|
z-index: 7!important;
|
||||||
|
border-right: 2px solid #ddd;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.fht-table td:nth-child(1)
|
||||||
|
{
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
background-color: #00a65a;
|
||||||
|
z-index: 2;
|
||||||
|
border-right: 2px solid #ddd;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-responsive {
|
||||||
|
overflow-y: auto;
|
||||||
|
max-height: 450px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fht-table thead th {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 5!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -462,7 +496,8 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
|||||||
|
|
||||||
<thead >
|
<thead >
|
||||||
<tr>
|
<tr>
|
||||||
<th class="celda_encabezado_total" style="padding: 10px;">Date value</th>
|
<th class="celda_encabezado_total"
|
||||||
|
style="padding: 10px; border:#ffffff; background-color: #ffffff;">Date value</th>
|
||||||
<th class="celda_encabezado_total" style="padding: 10px;">Drier On Time </th>
|
<th class="celda_encabezado_total" style="padding: 10px;">Drier On Time </th>
|
||||||
<th class="celda_encabezado_total" style="padding: 10px;">Drier Off Time</th>
|
<th class="celda_encabezado_total" style="padding: 10px;">Drier Off Time</th>
|
||||||
<th class="celda_encabezado_total" style="padding: 10px;">Running Hrs</th>
|
<th class="celda_encabezado_total" style="padding: 10px;">Running Hrs</th>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user