stock module latest today vadivel J 23-01-2025

This commit is contained in:
vadivelJ96 2025-01-23 14:27:39 +05:30
parent 36ef2b7b99
commit 7cd9665eea
2 changed files with 46 additions and 11 deletions

View File

@ -1173,15 +1173,15 @@ class StockController extends BaseController
foreach ($resultExists as $index => $result) {
if ($index == 0) {
$result['consumption'] = $result['consumption'] + ($consumption);
$result['total'] = $result['opening'] + $result['purchaseBharath'] + $result['purchaseIndian'];
$result['consumption'] = (float)($result['consumption']) + (float)($consumption);
$result['total'] = (float)$result['opening'] + (float)$result['purchaseBharath'] + (float)$result['purchaseIndian'];
$result['balanceStock'] = $result['total'] - $result['consumption'];
$updatedOpeningStock = $result['balanceStock'];
$updatedOpeningStock = (int)$result['balanceStock'];
} else {
$result['opening'] = $updatedOpeningStock;
$result['total'] = $result['opening'] + $result['purchaseBharath'] + $result['purchaseIndian'];
$result['balanceStock'] = $result['total'] - $result['consumption'];
$updatedOpeningStock = $result['balanceStock'];
$result['opening'] = (float)$updatedOpeningStock;
$result['total'] = (float)$result['opening'] + (float)$result['purchaseBharath'] + (float)$result['purchaseIndian'];
$result['balanceStock'] = (float)$result['total'] - (float)$result['consumption'];
$updatedOpeningStock = (int)$result['balanceStock'];
}
@ -1248,9 +1248,9 @@ class StockController extends BaseController
$inserts[] = [
'date' => $dateInMonth,
'opening' => $opening,
'purchaseBharath' => 0,
'purchaseIndian' => 0,
'total' => 0,
'purchaseBharath' => Null,
'purchaseIndian' => Null,
'total' => Null,
'consumption' => $consumptionForDate,
'balanceStock' => $balanceStock
];

View File

@ -207,6 +207,40 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
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 >
<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 Off Time</th>
<th class="celda_encabezado_total" style="padding: 10px;">Running Hrs</th>