diff --git a/app/Views/bagStockDetails.php b/app/Views/bagStockDetails.php
index 33c2e357..06a27484 100644
--- a/app/Views/bagStockDetails.php
+++ b/app/Views/bagStockDetails.php
@@ -108,6 +108,17 @@
padding: 6px 10px;;
text-align: center;
}
+
+
+ .celda_encabezado_total {
+ background-color:#ffffff;
+ border: 1px solid #ccc;
+ color: #ffffff;
+ font-weight: bold;
+ padding: 6px 10px;
+ ;
+ text-align: center;
+ }
._Separador {
@@ -166,6 +177,30 @@
color: #ffffff;
}
+
+
+ #bagStockDetailsTableSummaryId th:nth-child(1),
+ #bagStockDetailsTableSummaryId 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;
+ }
+
+ .fht-table thead th {
+ top: 0;
+ z-index: 5!important;
+ }
+
+
@@ -260,7 +295,7 @@
-
+
@@ -312,8 +347,11 @@
$bagStockDetails){
+ foreach($groupedBagStockDetails as $groupedBagStockDetailsIndex => $bagStockDetails){
+
?>
-
+ "-" ,
+ 'receipt' => 0 ,
+ 'used' => 0 ,
+ 'balanceStock' => 0 ,
+ ];
+ }
+
+ // Sum values for the material
+
+ $summary[$materialCode]['opening'] = "-" ;
+ $summary[$materialCode]['receipt'] += $bagStock['receipt'] == '-' ? 0 : $bagStock['receipt'] ;
+ $summary[$materialCode]['used'] += $bagStock['used'] == '-' ? 0 : $bagStock['used'] ;
+ $summary[$materialCode]['balanceStock'] = $bagStock['balanceStock'] == '-' ? 0 : $bagStock['balanceStock'] ;
+
+
+ } ?>
+
+
+
+
+
+ | Total Sum |
+
+ Opening Stock |
+ Receipt |
+ Used |
+ Balance Stock |
+
+
+
+
+
+
+
+ |
+ Total
+ |
+
+
+
+
+ =$each['opening']?> |
+ =$each['receipt']?> |
+ =$each['used']?> |
+ =$each['balanceStock']?> |
+
+
+
+
+
+
+
+
+
+
diff --git a/app/Views/dieselStockDetails.php b/app/Views/dieselStockDetails.php
index 4dc84772..40648ada 100644
--- a/app/Views/dieselStockDetails.php
+++ b/app/Views/dieselStockDetails.php
@@ -110,6 +110,16 @@
text-align: center;
}
+ .celda_encabezado_total {
+ background-color:#ffffff;
+ border: 1px solid #ccc;
+ color: #ffffff;
+ font-weight: bold;
+ padding: 6px 10px;
+ ;
+ text-align: center;
+ }
+
._Separador {
background-color: #fff;
@@ -166,6 +176,18 @@
border-right: 2px solid #ddd;
color: #ffffff;
}
+
+
+ #dieselStockDetailsTableSummaryId th:nth-child(1),
+ #dieselStockDetailsTableSummaryId td:nth-child(1) {
+ position: sticky;
+ left: 0;
+ background-color: #ffffff;
+ z-index: 2;
+ border-right: 2px solid #ddd;
+ color: #ffffff;
+ }
+
.modal {
padding-right: 30% ! important;
@@ -311,8 +333,12 @@ foreach ($period as $day) {
$dieselStockDetails) {
+
+
?>
+
+
@@ -447,12 +491,105 @@ foreach ($period as $day) {
-
+ "-" ,
+ 'closing_reading' => 0 ,
+ 'filling_diesel' => 0 ,
+ 'consumption' => 0 ,
+ 'running_hours' => 0 ,
+ 'mileage' => 0 ,
+ ];
+ }
+
+ // Sum values for the material
+
+ $summary["machineId_$machineId"]['opening_reading'] = 0 ;
+ $summary["machineId_$machineId"]['closing_reading'] = $dieselStock['closing_reading'] == '-' ? 0 : $dieselStock['closing_reading'] ;
+ $summary["machineId_$machineId"]['filling_diesel'] += $dieselStock['filling_diesel'] == '-' ? 0 : $dieselStock['filling_diesel'] ;
+ $summary["machineId_$machineId"]['consumption'] += $dieselStock['consumption'] == '-' ? 0 : $dieselStock['consumption'] ;
+ $summary["machineId_$machineId"]['running_hours'] += $dieselStock['running_hours'] == '-' ? 0 : $dieselStock['running_hours'] ;
+ $summary["machineId_$machineId"]['mileage'] += $dieselStock['mileage'] == '-' ? 0 : $dieselStock['mileage'] ;
+
+
+ } ?>
+
-
+
-
@@ -763,7 +900,7 @@ foreach ($period as $day) {
const readingsRowPart = [];
const allRow = [] ;
- //this table to json is customized for bagstock not for all
+ //this table to json is customized for dieselStock not for all
table.find('tbody tr').each(function(index) {
diff --git a/app/Views/dustAndRoughStockDetails.php b/app/Views/dustAndRoughStockDetails.php
index a4be7346..83b4d88e 100644
--- a/app/Views/dustAndRoughStockDetails.php
+++ b/app/Views/dustAndRoughStockDetails.php
@@ -166,6 +166,15 @@
color: #ffffff;
}
+ .celda_encabezado_total {
+ background-color:#ffffff;
+ border: 1px solid #ccc;
+ color: #ffffff;
+ font-weight: bold;
+ padding: 6px 10px;
+ text-align: center;
+ }
+
.modal {
padding-right: 30% ! important;
}
@@ -279,9 +288,10 @@
- }else{
+
@@ -312,38 +332,7 @@ foreach ($period as $day) {
"-" ,
- 'receipt' => 0,
- 'used' => 0,
- 'balanceStock' => 0,
- ];
- }
-
- // Sum values for the material
- ;
- $summary[$materialCode]['opening'] = "-" ;
- $summary[$materialCode]['receipt'] += $resinStock['receipt'] == '-' ? 0 :$resinStock['receipt'] ;
- $summary[$materialCode]['used'] += $resinStock['used'] == '-' ? 0 :$resinStock['used'] ;
- $summary[$materialCode]['balanceStock'] = $resinStock['balanceStock'] == '-' ? 0 :$resinStock['balanceStock'] ;
- }
- }
-
- return $summary;
- }
-
- // Example usage:
- $summary = sumMaterialValues($groupedResinStockDetails);
-
+ $summary = [];
foreach ($groupedResinStockDetails as $groupedResinStockDetailsIndex => $resinStockDetails) {
@@ -412,7 +401,33 @@ foreach ($period as $day) {
= $resinStock['balanceStock'] ?>
-
+
+
+ "-" ,
+ 'receipt' => 0,
+ 'used' => 0,
+ 'balanceStock' => 0,
+ ];
+ }
+
+ // Sum values for the material
+ ;
+ $summary[$materialCode]['opening'] = "-" ;
+ $summary[$materialCode]['receipt'] += $resinStock['receipt'] == '-' ? 0 :$resinStock['receipt'] ;
+ $summary[$materialCode]['used'] += $resinStock['used'] == '-' ? 0 :$resinStock['used'] ;
+ $summary[$materialCode]['balanceStock'] = $resinStock['balanceStock'] == '-' ? 0 :$resinStock['balanceStock'] ;
+
+ } ?>
+
diff --git a/app/Views/trpSandUseStockDetails.php b/app/Views/trpSandUseStockDetails.php
index c3395bad..f80b7894 100644
--- a/app/Views/trpSandUseStockDetails.php
+++ b/app/Views/trpSandUseStockDetails.php
@@ -166,6 +166,15 @@
color: #ffffff;
}
+ .celda_encabezado_total {
+ background-color:#ffffff;
+ border: 1px solid #ccc;
+ color: #ffffff;
+ font-weight: bold;
+ padding: 6px 10px;
+ text-align: center;
+ }
+
.modal {
padding-right: 30% ! important;
}
@@ -236,8 +245,8 @@
style="width: 100px;"
class="celda_encabezado_general" >Date
Rough Kgs |
- Fine kgs |
- Total kgs |
+ Fine Kgs |
+ Total Kgs |
Customer Name |
@@ -247,7 +256,11 @@
$trpSandUseStockDetail){
+
?>
= $trpSandUseStockDetail['total_kgs'] ?>
- | = $trpSandUseStockDetail['customer_name'] ?> |
@@ -292,9 +305,54 @@
+
+
+
+
+
+
+ | Total |
+ Rough Kgs |
+ Fine Kgs |
+ Total Kgs |
+
+
+
+
+
+
+ |
+ Total
+ |
+
+ =$summary['rough_kgs']?> |
+ =$summary['fine_kgs']?> |
+ =$summary['total_kgs']?> |
+
+
+
+
+
+
+
+
+
+
+