diff --git a/app/Models/TrpProductionModel.php b/app/Models/TrpProductionModel.php index 5302d616..8b8366ae 100644 --- a/app/Models/TrpProductionModel.php +++ b/app/Models/TrpProductionModel.php @@ -166,38 +166,42 @@ class TrpProductionModel extends Model ->getResultArray(); - $crsClientList = array_column($crsClientList, 'client_name'); + $crsClientList = array_column($crsClientList, 'client_name'); - // Initialize an empty array for dynamic SQL conditions - $caseStatementsCrs = []; + // Initialize an empty array for dynamic SQL conditions + $caseStatementsCrs = []; + + // Loop through the client list and build dynamic SUM(CASE WHEN...) + foreach ($crsClientList as $index => $client) { + + $crsClientList[$index] = $client."_crs"; + $clientCrs = $client."_crs"; + + // Add the condition to the array + $caseStatementsCrs[] = "SUM(CASE WHEN clients.client_name = " . $this->db->escape($client) . " THEN invItems.item_quantity ELSE 0 END) AS `$clientCrs`"; + } + + // Convert array to a comma-separated string + $caseSQLCrs = implode(', ', $caseStatementsCrs); + + // Subquery: Get unique invoice_id with item_date_added and total item_quantity per invoice + $subquery = $this->db->table('ip_invoice_items') + ->select('invoice_id, item_date_added, item_quantity') + ->whereIn('item_product_id', [81, 93]) + ->groupBy(['invoice_id']) + ->getCompiledSelect(); // Convert to raw SQL for subquery + + // Main Query: Use the subquery as invItems and join with ip_invoices and ip_clients + $subquery3 = $this->db->table("($subquery) invItems") + ->select(array_merge(['invItems.item_date_added'], $caseStatementsCrs)) // Add dynamic SUM(CASE WHEN..) + ->join('ip_invoices inv', 'inv.invoice_id = invItems.invoice_id', 'left') + ->join('ip_clients clients', 'clients.client_id = inv.client_id', 'left') + ->where("invItems.item_date_added BETWEEN '$startDate' AND '$endDate'", null, false) // Use BETWEEN for date filtering + ->groupBy('invItems.item_date_added') + ->getCompiledSelect(false); // Convert Query Builder to raw SQL; + - // Loop through the client list and build dynamic SUM(CASE WHEN...) - foreach ($crsClientList as $index => $client) { - - $crsClientList[$index] = $client."_crs"; - $clientCrs = $client."_crs"; - - // Add the condition to the array - $caseStatementsCrs[] = "SUM(CASE WHEN clients.client_name = " . $this->db->escape($client) . " THEN invItems.item_quantity ELSE 0 END) AS `$clientCrs`"; - } - - // Convert array to a comma-separated string - $caseSQLCrs = implode(', ', $caseStatementsCrs); - - - - $subquery3 = $this->db->table('ip_invoice_items invItems') - ->select([ - 'invItems.item_date_added', - $caseSQLCrs - ]) - ->join('ip_invoices inv', 'inv.invoice_id = invItems.invoice_id', 'left') - ->join('ip_clients clients', 'clients.client_id = inv.client_id', 'left') - ->whereIn('invItems.item_product_id', [81, 93]) - ->where("invItems.item_date_added BETWEEN '$startDate' AND '$endDate'", null, false) // Use BETWEEN for date filtering - ->groupBy('invItems.item_date_added') - - ->getCompiledSelect(false); // Convert Query Builder to raw SQL; + $builder->join("({$subquery3}) invItems", 'invItems.item_date_added = tpmd.date', 'left'); diff --git a/app/Views/stock/CoatingMachineDetail.php b/app/Views/stock/CoatingMachineDetail.php index 28473619..6fe97770 100644 --- a/app/Views/stock/CoatingMachineDetail.php +++ b/app/Views/stock/CoatingMachineDetail.php @@ -43,8 +43,15 @@ } .fht-table td:hover { - background-color: #50bbd9; - color: #ffffff; + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); + transform: scale(1.25); /* Increases size by 25% */ + transition: transform 0.2s ease-in-out; /* Smooth scaling effect */ + } + + .fht-table tr:hover { + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); } .fht-table { @@ -226,7 +233,7 @@ .table-responsive { overflow-y: auto; - max-height: 500px; + max-height: 700px; } .fht-table thead th { @@ -239,6 +246,13 @@ background-color:rgb(235, 236, 203); } + body[data-layout-mode = horizontal] .container-fluid{ + max-width: 100%; + } + .card-body{ padding-bottom: 0;} + .card{ margin-bottom: 5px;} + +
@@ -267,10 +281,7 @@ Add Production Batch Card --> - +
@@ -292,46 +303,54 @@
-
+
-
+
+ value="" name="month" + class="form-control monthpicker" id="monthpicker" readonly> +
+ +
+ + + + + +
+ + +
+ + + +
+ +
+ +
-
- -
- -
- -
- @@ -1548,6 +1567,11 @@ \ No newline at end of file + + + diff --git a/app/Views/stock/bagStockDetails.php b/app/Views/stock/bagStockDetails.php index 3c9bfb45..8944fde6 100644 --- a/app/Views/stock/bagStockDetails.php +++ b/app/Views/stock/bagStockDetails.php @@ -26,8 +26,15 @@ } .fht-table td:hover { - background-color: #50bbd9; - color: #ffffff; + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); + transform: scale(1.25); /* Increases size by 25% */ + transition: transform 0.2s ease-in-out; /* Smooth scaling effect */ + } + + .fht-table tr:hover { + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); } .fht-table { @@ -239,6 +246,14 @@ background-color:rgb(235, 236, 203); } + body[data-layout-mode = horizontal] .container-fluid{ + max-width: 100%; + } + .card-body{ + padding-top : 0; + padding-bottom: 0; + } + .card{ margin-bottom: 5px;} @@ -302,46 +317,67 @@
-
-
+ -
- " - class="form-control mt-2" - data-date-format="M-yyyy" data-date-min-view-mode="1" readonly> -
-
- - - - - - +
+
+ " + class="form-control mt-2" + style="z-index:30;" readonly> +
-
-
- -
+ - + + + + + + +
+ + + +
+ +
+ + + +
+ + + +
+
+ + + + +
+ + + +
+ +
@@ -422,16 +458,14 @@
- " - class="form-control mt-2" data-provide="datepicker" - data-date-format="M-yyyy" data-date-min-view-mode="1"> + " >
-
+
@@ -712,14 +746,6 @@
-
- -
-
- -
-
-
@@ -1291,6 +1317,10 @@ + + \ No newline at end of file diff --git a/app/Views/stock/drierMachineDetails.php b/app/Views/stock/drierMachineDetails.php index 0c9b55cc..5340bf52 100644 --- a/app/Views/stock/drierMachineDetails.php +++ b/app/Views/stock/drierMachineDetails.php @@ -46,8 +46,15 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); } .fht-table td:hover { - background-color: #50bbd9; - color: #ffffff; + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); + transform: scale(1.25); /* Increases size by 25% */ + transition: transform 0.2s ease-in-out; /* Smooth scaling effect */ + } + + .fht-table tr:hover { + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); } .fht-table { @@ -242,6 +249,15 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y'); background-color:rgb(235, 236, 203); } + body[data-layout-mode = horizontal] .container-fluid{ + max-width: 100%; + } + .card-body{ + padding-top : 10px; + padding-bottom: 0; + } + .card{ margin-bottom: 5px;} +
@@ -261,12 +277,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
-
- -
+
@@ -293,33 +304,41 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
-
+
-
+
-
-
- +
+ + - -
-
+ +
+ + + + +
+ +
+ + +
+
@@ -327,7 +346,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
- +
@@ -1355,3 +1374,39 @@ function convertToDate(dateString) { + + + + + + \ No newline at end of file diff --git a/app/Views/stock/dustAndRoughStockDetails.php b/app/Views/stock/dustAndRoughStockDetails.php index a1499b11..3796827b 100644 --- a/app/Views/stock/dustAndRoughStockDetails.php +++ b/app/Views/stock/dustAndRoughStockDetails.php @@ -31,8 +31,15 @@ } */ .fht-table td:hover { - background-color: #50bbd9; - color: #ffffff; + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); + transform: scale(1.25); /* Increases size by 25% */ + transition: transform 0.2s ease-in-out; /* Smooth scaling effect */ + } + + .fht-table tr:hover { + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); } .fht-table { @@ -241,6 +248,19 @@ } + body[data-layout-mode = horizontal] .container-fluid{ + max-width: 100%; + } + + .card-body{ + padding-top : 0; + padding-bottom : 0; + } + + .card{ margin-bottom: 5px;} + + + @@ -277,30 +297,37 @@
-
-
+ + + +
-
- " - class="form-control datepicker mt-2 " data-provide="datepicker" - data-date-format="M-yyyy" data-date-min-view-mode="1" readonly> +
+ + +
+ + -
- +
+
-
- + +
+
-
+ +
@@ -308,7 +335,7 @@
-
+
@@ -460,14 +487,6 @@
-
- -
-
- -
-
-
@@ -731,16 +750,22 @@ diff --git a/app/Views/stock/gasStockDetails.php b/app/Views/stock/gasStockDetails.php index 4318183e..950b81f0 100644 --- a/app/Views/stock/gasStockDetails.php +++ b/app/Views/stock/gasStockDetails.php @@ -18,8 +18,15 @@ } .fht-table td:hover { - background-color: #50bbd9; - color: #ffffff; + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); + transform: scale(1.25); /* Increases size by 25% */ + transition: transform 0.2s ease-in-out; /* Smooth scaling effect */ + } + + .fht-table tr:hover { + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); } .fht-table { @@ -208,7 +215,7 @@ .table-responsive { overflow-x: auto; overflow-y: auto; - max-height: 500px; /* Adjust as needed */ + max-height: 700px; /* Adjust as needed */ position: relative; } @@ -221,6 +228,11 @@ background-color:rgb(235, 236, 203); } + body[data-layout-mode = horizontal] .container-fluid{ + max-width: 100%; + } + .card-body{ padding-bottom: 0;} + .card{ margin-bottom: 5px;} @@ -259,42 +271,48 @@
-
+
-
- " - class="form-control mt-2" data-provide="datepicker" - data-date-format="M-yyyy" data-date-min-view-mode="1" readonly> +
+ + + +
+ + -
- + +
+ + +
-
- +
+ + +
- +
- - +
- +
@@ -638,15 +656,8 @@
-
-
- -
-
- -
-
+ @@ -1199,4 +1210,12 @@ function convertToDate(dateString) { } }); + + + \ No newline at end of file diff --git a/app/Views/stock/incomingSilicaSandDetails.php b/app/Views/stock/incomingSilicaSandDetails.php index ba75ec5f..011e99f8 100644 --- a/app/Views/stock/incomingSilicaSandDetails.php +++ b/app/Views/stock/incomingSilicaSandDetails.php @@ -25,10 +25,18 @@ } .fht-table td:hover { - background-color: #50bbd9; - color: #ffffff; + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); + transform: scale(1.25); /* Increases size by 25% */ + transition: transform 0.2s ease-in-out; /* Smooth scaling effect */ } + .fht-table tr:hover { + background-color: rgb(170, 222, 167) ; + color:rgb(2, 2, 2); + } + + /* .fht-table td[contenteditable="true"] { background-color: lightyellow; color:rgb(13, 7, 7); @@ -214,7 +222,7 @@ .table-responsive { overflow-y: auto; - max-height: 500px; + max-height: 700px; } .fht-table thead th { @@ -235,12 +243,18 @@ #meshTableId tbody tr td{ padding : 3px !important ; } - + + body[data-layout-mode = horizontal] .container-fluid{ + max-width: 100%; + } + .card-body{ padding-bottom: 0;} + .card{ margin-bottom: 5px;} +
@@ -291,51 +305,39 @@ -
+
-
+
- -
+
- -
+
- - " class="form-control mt-2" data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1" readonly> + " class="form-control " data-provide="datepicker" data-date-format="M-yyyy" data-date-min-view-mode="1" readonly>
-
- + -
- +
+
+
+
- - - - - - -
- - +
+ @@ -458,8 +460,9 @@ - @@ -728,13 +731,6 @@ -
- -
-
- -
-
@@ -1890,4 +1886,13 @@ $(document).ready(function() { $('#reportNotice').text("* Please save the changes to download"); }) - \ No newline at end of file + + + + diff --git a/app/Views/stock/powerConsumptionDetails.php b/app/Views/stock/powerConsumptionDetails.php index a4f8ce03..24f32516 100644 --- a/app/Views/stock/powerConsumptionDetails.php +++ b/app/Views/stock/powerConsumptionDetails.php @@ -25,16 +25,19 @@ cursor: grabbing; /* Closed-hand cursor when dragging */ } - /* .fht-table td[contenteditable="true"] { - background-color: lightyellow; - color:rgb(13, 7, 7); - } */ - .fht-table td:hover { - background-color: #50bbd9; - color: #ffffff; + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); + transform: scale(1.25); /* Increases size by 25% */ + transition: transform 0.2s ease-in-out; /* Smooth scaling effect */ } + .fht-table tr:hover { + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); + } + + .fht-table { border: 0 none; height: auto; @@ -226,7 +229,7 @@ .table-responsive { overflow-x: auto; overflow-y: auto; - max-height: 500px; + max-height: 700px; /* Adjust as needed */ position: relative; } @@ -240,6 +243,15 @@ background-color:rgb(235, 236, 203); } + body[data-layout-mode = horizontal] .container-fluid{ + max-width: 100%; + } + .card-body{ + padding-top : 0; + padding-bottom: 0; + } + .card{ margin-bottom: 5px;} + @@ -302,46 +314,66 @@ foreach ($period as $day) {
-
-
+ -
- " - class="form-control mt-2" data-provide="datepicker" - style="z-index:30;" - data-date-format="M-yyyy" data-date-min-view-mode="1" readonly> -
-
- +
- - - - - +
+ " + class="form-control mt-2" + style="z-index:30;" readonly> +
-
-
- -
+ + + + + + + +
+ + + +
+ +
+ + + +
+ + + +
+
+ + + + +
+ + + +
+
@@ -423,16 +455,15 @@ foreach ($period as $day) {
- " - class="form-control mt-2" data-provide="datepicker" - data-date-format="M-yyyy" data-date-min-view-mode="1"> + " + >
-
- + +
+
@@ -501,7 +532,7 @@ foreach ($period as $day) { $currentDate = date('d-m-Y'); $dateInMonthDmYFormat = DateTime::createFromFormat('Y-m-d', $powerStockDetails[0]['date'])->format('d-m-Y'); if ($dateInMonthDmYFormat === $currentDate) { - echo 'style="background: #cef0ad;"'; + echo 'style="background: rgb(232, 245, 231);"'; } ?>> @@ -736,7 +767,7 @@ foreach ($period as $day) { $currentDate = date('d-m-Y'); $dateInMonthDmYFormat = DateTime::createFromFormat('Y-m-d', $dateInMonth)->format('d-m-Y'); if ($dateInMonthDmYFormat === $currentDate) { - echo 'style="background: #cef0ad;"'; + echo 'style="background: rgb(232, 245, 231);"'; } ?>> @@ -879,15 +910,7 @@ foreach ($period as $day) {
-
- -
- -
-
- -
-
+
@@ -1541,4 +1564,18 @@ foreach ($period as $day) { $('#customizeHeader').select2(); }) + + + \ No newline at end of file diff --git a/app/Views/stock/resinStockDetails.php b/app/Views/stock/resinStockDetails.php index b4c12ed4..3c626781 100644 --- a/app/Views/stock/resinStockDetails.php +++ b/app/Views/stock/resinStockDetails.php @@ -18,8 +18,15 @@ } .fht-table td:hover { - background-color: #50bbd9; - color: #ffffff; + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); + transform: scale(1.25); /* Increases size by 25% */ + transition: transform 0.2s ease-in-out; /* Smooth scaling effect */ + } + + .fht-table tr:hover { + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); } .grab { @@ -226,7 +233,7 @@ .table-responsive { overflow-x: auto; overflow-y: auto; - max-height: 500px; + max-height: 700px; /* Adjust as needed */ position: relative; } @@ -239,6 +246,19 @@ tfoot tr { background-color:rgb(235, 236, 203); } + + + body[data-layout-mode = horizontal] .container-fluid{ + max-width: 100%; + } + + .card-body{ + padding-top : 0; + padding-bottom : 0; + } + + .card{ margin-bottom: 5px;} + @@ -294,55 +314,73 @@ foreach ($period as $day) { -
+
-
-
+ -
- " - class="form-control mt-2" data-provide="datepicker" - data-date-format="M-yyyy" data-date-min-view-mode="1" readonly> -
-
- +
- - +
+ " + class="form-control mt-2" + style="z-index:30;" readonly> +
- - - -
-
- -
+ - + + + +
+ + + +
+ +
+ + + +
+ + + +
+
+ + + + +
+ + + +
+ +
@@ -432,8 +470,8 @@ foreach ($period as $day) { -
- +
+
@@ -487,7 +525,7 @@ foreach ($period as $day) { $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;"'; + echo 'style="background: rgb(232, 245, 231);"'; } ?>> $resinStock) { @@ -609,7 +647,7 @@ foreach ($period as $day) { $currentDate = date('d-m-Y'); $dateInMonthDmYFormat = DateTime::createFromFormat('Y-m-d', $dateInMonth)->format('d-m-Y'); if ($dateInMonthDmYFormat === $currentDate) { - echo 'style="background: #cef0ad;"'; + echo 'style="background: rgb(232, 245, 231);"'; } ?>> -
- -
-
- -
-
- @@ -1243,4 +1273,18 @@ foreach ($period as $day) { $('#customizeHeader').select2(); }) + + + \ No newline at end of file diff --git a/app/Views/stock/trpProductionStockDetails.php b/app/Views/stock/trpProductionStockDetails.php index d49d994d..17355936 100644 --- a/app/Views/stock/trpProductionStockDetails.php +++ b/app/Views/stock/trpProductionStockDetails.php @@ -19,8 +19,15 @@ } .fht-table td:hover { - background-color: #50bbd9; - color: #ffffff; + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); + transform: scale(1.25); /* Increases size by 25% */ + transition: transform 0.2s ease-in-out; /* Smooth scaling effect */ + } + + .fht-table tr:hover { + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); } .fht-table { @@ -226,6 +233,18 @@ background-color:rgb(235, 236, 203); } + + body[data-layout-mode = horizontal] .container-fluid{ + max-width: 100%; + } + + .card-body{ + padding-top : 0; + padding-bottom : 0; + } + + .card{ margin-bottom: 5px;} + @@ -343,7 +362,7 @@ $timeOtions[] = "12:00 AM";
-
+
@@ -1326,7 +1345,7 @@ $timeOtions[] = "12:00 AM";
-
+
diff --git a/app/Views/stock/trpSandUseStockDetails.php b/app/Views/stock/trpSandUseStockDetails.php index a60188c9..59e8770f 100644 --- a/app/Views/stock/trpSandUseStockDetails.php +++ b/app/Views/stock/trpSandUseStockDetails.php @@ -18,8 +18,15 @@ } .fht-table td:hover { - background-color: #50bbd9; - color: #ffffff; + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); + transform: scale(1.25); /* Increases size by 25% */ + transition: transform 0.2s ease-in-out; /* Smooth scaling effect */ + } + + .fht-table tr:hover { + background-color: rgb(170, 222, 167); + color:rgb(2, 2, 2); } .fht-table { @@ -227,6 +234,21 @@ background-color:rgb(235, 236, 203); } + + + body[data-layout-mode = horizontal] .container-fluid{ + max-width: 100%; + } + + .card-body{ + padding-top : 0; + padding-bottom : 0; + } + + .card{ margin-bottom: 5px;} + + + @@ -264,37 +286,45 @@
- -
+ -
- " - class="form-control mt-2" data-provide="datepicker" + +
+ +
+ + +
+ +
+ + + + + +
+ +
+ +
+ +
+ +
+
-
- -
-
-
- -
-
+ +
-
Particulars
+
@@ -485,13 +515,6 @@
-
- -
-
- -
-
@@ -759,4 +782,22 @@ +