diff --git a/Modules/Helpdesk/Resources/views/livewire/ticket-show.blade.php b/Modules/Helpdesk/Resources/views/livewire/ticket-show.blade.php index 676bafc4..8f4b9062 100755 --- a/Modules/Helpdesk/Resources/views/livewire/ticket-show.blade.php +++ b/Modules/Helpdesk/Resources/views/livewire/ticket-show.blade.php @@ -482,7 +482,7 @@
{!! $oldCommentBody !!}
diff --git a/Modules/M3/Console/GenerateGS1Cmd.php b/Modules/M3/Console/GenerateGS1Cmd.php index 2676e631..39302611 100755 --- a/Modules/M3/Console/GenerateGS1Cmd.php +++ b/Modules/M3/Console/GenerateGS1Cmd.php @@ -69,183 +69,8 @@ class GenerateGS1Cmd extends Command 'PackagesArray' => ['package 1', 'package 2'], ]; - if ($sHUSER != '') { - // Get User CO & WH from Table ICM428M - $iCM428M = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m') - ->select('R428US', 'R428CO', 'R428WH', 'R428PL') - ->where('R428US', '=', $sHUSER) - ->first(); - - $cOMPANY = isset($iCM428M->R428CO) ? $iCM428M->R428CO : ''; // Company - $wHS = isset($iCM428M->R428WH) ? $iCM428M->R428WH : ''; // WareHouse - - $macpkr = $gSArray['Macpkr']; - $packageType = '0'; - $manufactID = '0826528'; // MAK : get ID from Nvent and save to Config File - $total_length = 9; - - $html = ' - - - - - '; - - // Get number of Pallets - $packageCount = count($gSArray['PackagesArray']); - $packageNum = 1; - while ($packageNum <= $packageCount) { - $table_style = $packageNum < $packageCount ? ' style="page-break-after: always;" ' : ''; - - if (Cache::has('GS1SEQUENCE')) { - $gS1SEQUENCE = Cache::get('GS1SEQUENCE'); - $gS1SEQUENCE++; - $gS1SEQUENCEID = str_pad($gS1SEQUENCE, $total_length, '0', STR_PAD_LEFT); - } - // Box Number Not Found Get it from DB - else { - $gS1SEQUENCE = 1; - $gS1SEQUENCEID = str_pad($gS1SEQUENCE, $total_length, '0', STR_PAD_LEFT); - } - Cache::forever('GS1SEQUENCE', $gS1SEQUENCEID); - $this->info('>>> GS1 sequence Id: ' . $gS1SEQUENCEID); - - $gs1_128_bc_1 = '00' . $packageType . $manufactID . $gS1SEQUENCEID; - - // Calculate Check Digit - $digits = str_split($gs1_128_bc_1); - $sum = 0; - $length = count($digits); - - // Loop through each digit starting from the right - for ($i = 0; $i < $length; $i++) { - $digit = $digits[$length - $i - 1]; - // Assign a weight of 3 or 1 alternately - $weight = ($i % 2 == 0) ? 3 : 1; - // Add the product of the digit and its weight to the sum - $sum += $digit * $weight; - } - // Calculate the remainder when sum is divided by 10 - $remainder = $sum % 10; - // If remainder is 0, check digit is 0; otherwise, subtract remainder from 10 - $checkDigit = ($remainder == 0) ? 0 : 10 - $remainder; - - $gs1_128_bc_desc = '(00)' . $packageType . $manufactID . $gS1SEQUENCEID . $checkDigit; - - $data = [ - 'ship_to' => $gSArray['Recipient_CompanyName'] . '
' . $gSArray['Recipient_Address1'] . '
' . - $gSArray['Recipient_City'] . ',' . $gSArray['Recipient_State'] - . '
' . $gSArray['Recipient_PostalCode'], - 'from' => $gSArray['Sender_CompanyName'] . '
' . $gSArray['Sender_Address1'] . '
' . - $gSArray['Sender_City'] . ',' . $gSArray['Sender_State'] - . '
' . $gSArray['Sender_PostalCode'], - 'ship_to_lbl' => '420' . $gSArray['Recipient_PostalCode'], - 'ship_to_desc' => '(420)' . $gSArray['Recipient_PostalCode'], - 'pro' => '190071217845706', - 'item_number' => '10000B', - 'upc' => '098506095310', - 'quantity' => '1', - 'serial_shipping_container' => $gs1_128_bc_desc, - ]; - - // Initialize barcode generator - $generator = new BarcodeGeneratorPNG; - - // Generate barcodes - $shipToPostalCodeBarcode = $generator->getBarcode($data['ship_to_lbl'], $generator::TYPE_CODE_128); - $serialShippingContainerBarcode = $generator->getBarcode($data['serial_shipping_container'], $generator::TYPE_CODE_128, 2, 50); - - // HTML content for the label - $html .= ' - - - - - - - - - - - - - - - - -
- FROM:
' . $data['from'] . ' -
- SHIP TO:
' . $data['ship_to'] . ' -
-
- ' . $data['ship_to_desc'] . ' -
- Carrier: ' . $gSArray['CarrierName'] . '
- PRO #: ' . $gSArray['ShipmentPONumber'] . '
- B/L #: ' . $gSArray['BOLnumber'] . ' -
- PURCHASE ORDER: ' . $gSArray['Macpkr'] . '
- Vendor: ' . $manufactID . ' -
- Pallet # : ' . $packageNum . ' of ' . $packageCount . ' -
-
- ' . $data['serial_shipping_container'] . ' -
'; - - $packageNum++; - } - - $html .= ' '; - - ob_start(); - - // Initialize Dompdf - $dompdf = new Dompdf; - $dompdf->loadHtml($html); - $dompdf->setPaper('a6', 'portrait'); - // Render the HTML as PDF - $dompdf->render(); - - // Output the generated PDF to Browser - // $dompdf->stream(); - - $pdfContent = $dompdf->output(); - - $labelsPath = Config::get('arrays.PdfPath'); - // Put the PDF in labels/CarrierLabel - $gSFolder = 'GSLabel'; - $carrierFileName = $gSFolder . '_' . $macpkr . '_' . $cOMPANY . '_' . $wHS; - file_put_contents($labelsPath . $gSFolder . '/' . $carrierFileName . '.pdf', $pdfContent); - - // Check if the PDF was generated correctly - // if (!file_exists($tempPdfPath) || filesize($tempPdfPath) === 0) { - // throw new Exception('PDF generation failed.'); - // } - - ob_end_clean(); + if ($sHUSER !== '') { + $this->generateLabels($sHUSER, $gSArray); } Log::channel('LabelCron')->info('<<< GS1-128...End of Label Creation'); @@ -255,4 +80,194 @@ class GenerateGS1Cmd extends Command Log::channel('LabelCron')->error($th); } } + + private function generateLabels(string $sHUSER, array $gSArray): void + { + // Get User CO & WH from Table ICM428M + $iCM428M = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m') + ->select('R428US', 'R428CO', 'R428WH', 'R428PL') + ->where('R428US', '=', $sHUSER) + ->first(); + + $cOMPANY = isset($iCM428M->R428CO) ? $iCM428M->R428CO : ''; // Company + $wHS = isset($iCM428M->R428WH) ? $iCM428M->R428WH : ''; // WareHouse + + $macpkr = $gSArray['Macpkr']; + $packageType = '0'; + $manufactID = '0826528'; // MAK : get ID from Nvent and save to Config File + $total_length = 9; + + $html = $this->buildLabelHtml($gSArray, $packageType, $manufactID, $total_length); + + ob_start(); + + // Initialize Dompdf + $dompdf = new Dompdf; + $dompdf->loadHtml($html); + $dompdf->setPaper('a6', 'portrait'); + // Render the HTML as PDF + $dompdf->render(); + + // Output the generated PDF to Browser + // $dompdf->stream(); + + $pdfContent = $dompdf->output(); + + $labelsPath = Config::get('arrays.PdfPath'); + // Put the PDF in labels/CarrierLabel + $gSFolder = 'GSLabel'; + $carrierFileName = $gSFolder . '_' . $macpkr . '_' . $cOMPANY . '_' . $wHS; + file_put_contents($labelsPath . $gSFolder . '/' . $carrierFileName . '.pdf', $pdfContent); + + // Check if the PDF was generated correctly + // if (!file_exists($tempPdfPath) || filesize($tempPdfPath) === 0) { + // throw new Exception('PDF generation failed.'); + // } + + ob_end_clean(); + + } + + + private function buildLabelHtml(array $gSArray, string $packageType, string $manufactID, int $totalLength): string + { + $html = ' + + + + + '; + + // Get number of Pallets + $packageCount = count($gSArray['PackagesArray']); + $packageNum = 1; + while ($packageNum <= $packageCount) { + $table_style = $packageNum < $packageCount ? ' style="page-break-after: always;" ' : ''; + + if (Cache::has('GS1SEQUENCE')) { + $gS1SEQUENCE = Cache::get('GS1SEQUENCE'); + $gS1SEQUENCE++; + $gS1SEQUENCEID = str_pad($gS1SEQUENCE, $totalLength, '0', STR_PAD_LEFT); + } + // Box Number Not Found Get it from DB + else { + $gS1SEQUENCE = 1; + $gS1SEQUENCEID = str_pad($gS1SEQUENCE, $totalLength, '0', STR_PAD_LEFT); + } + Cache::forever('GS1SEQUENCE', $gS1SEQUENCEID); + $this->info('>>> GS1 sequence Id: ' . $gS1SEQUENCEID); + + $gs1_128_bc_1 = '00' . $packageType . $manufactID . $gS1SEQUENCEID; + + // Calculate Check Digit + $digits = str_split($gs1_128_bc_1); + $sum = 0; + $length = count($digits); + + // Loop through each digit starting from the right + for ($i = 0; $i < $length; $i++) { + $digit = $digits[$length - $i - 1]; + // Assign a weight of 3 or 1 alternately + $weight = ($i % 2 == 0) ? 3 : 1; + // Add the product of the digit and its weight to the sum + $sum += $digit * $weight; + } + // Calculate the remainder when sum is divided by 10 + $remainder = $sum % 10; + // If remainder is 0, check digit is 0; otherwise, subtract remainder from 10 + $checkDigit = ($remainder == 0) ? 0 : 10 - $remainder; + + $gs1_128_bc_desc = '(00)' . $packageType . $manufactID . $gS1SEQUENCEID . $checkDigit; + + $data = [ + 'ship_to' => $gSArray['Recipient_CompanyName'] . '
' . $gSArray['Recipient_Address1'] . '
' . + $gSArray['Recipient_City'] . ',' . $gSArray['Recipient_State'] + . '
' . $gSArray['Recipient_PostalCode'], + 'from' => $gSArray['Sender_CompanyName'] . '
' . $gSArray['Sender_Address1'] . '
' . + $gSArray['Sender_City'] . ',' . $gSArray['Sender_State'] + . '
' . $gSArray['Sender_PostalCode'], + 'ship_to_lbl' => '420' . $gSArray['Recipient_PostalCode'], + 'ship_to_desc' => '(420)' . $gSArray['Recipient_PostalCode'], + 'pro' => '190071217845706', + 'item_number' => '10000B', + 'upc' => '098506095310', + 'quantity' => '1', + 'serial_shipping_container' => $gs1_128_bc_desc, + ]; + + // Initialize barcode generator + $generator = new BarcodeGeneratorPNG; + + // Generate barcodes + $shipToPostalCodeBarcode = $generator->getBarcode($data['ship_to_lbl'], $generator::TYPE_CODE_128); + $serialShippingContainerBarcode = $generator->getBarcode($data['serial_shipping_container'], $generator::TYPE_CODE_128, 2, 50); + + // HTML content for the label + $html .= ' + + + + + + + + + + + + + + + + +
+ FROM:
' . $data['from'] . ' +
+ SHIP TO:
' . $data['ship_to'] . ' +
+
+ ' . $data['ship_to_desc'] . ' +
+ Carrier: ' . $gSArray['CarrierName'] . '
+ PRO #: ' . $gSArray['ShipmentPONumber'] . '
+ B/L #: ' . $gSArray['BOLnumber'] . ' +
+ PURCHASE ORDER: ' . $gSArray['Macpkr'] . '
+ Vendor: ' . $manufactID . ' +
+ Pallet # : ' . $packageNum . ' of ' . $packageCount . ' +
+
+ ' . $data['serial_shipping_container'] . ' +
'; + + $packageNum++; + } + + $html .= ' '; + + return $html; + } + } diff --git a/Modules/M3/Resources/public/liberty-theme/css/styles.css b/Modules/M3/Resources/public/liberty-theme/css/styles.css index 274d8cf4..f93703ef 100755 --- a/Modules/M3/Resources/public/liberty-theme/css/styles.css +++ b/Modules/M3/Resources/public/liberty-theme/css/styles.css @@ -2237,6 +2237,7 @@ div.table-responsive > table > tbody > tr:last-child > td{ border-inline-end-width: 1px; border-radius: 0; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + padding: 0.375rem 0.75rem; } @media (prefers-reduced-motion: reduce) { .form-control::file-selector-button, .dataTable-input::file-selector-button { @@ -2246,9 +2247,6 @@ div.table-responsive > table > tbody > tr:last-child > td{ .form-control:hover:not(:disabled):not([readonly])::file-selector-button, .dataTable-input:hover:not(:disabled):not([readonly])::file-selector-button { background-color: #dde0e3; } -@media (prefers-reduced-motion: reduce) { -} - .form-control-plaintext { display: block; width: 100%; @@ -3640,13 +3638,11 @@ textarea.form-control-lg { border-right: 0; border-bottom: 0.3em solid transparent; border-left: 0.3em solid; + vertical-align: 0; } .dropend .dropdown-toggle:empty::after { margin-left: 0; } -.dropend .dropdown-toggle::after { - vertical-align: 0; -} .dropstart .dropdown-menu[data-bs-popper] { top: 0; @@ -3660,8 +3656,6 @@ textarea.form-control-lg { margin-left: 0.255em; vertical-align: 0.255em; content: ""; -} -.dropstart .dropdown-toggle::after { display: none; } .dropstart .dropdown-toggle::before { @@ -3672,13 +3666,11 @@ textarea.form-control-lg { border-top: 0.3em solid transparent; border-right: 0.3em solid; border-bottom: 0.3em solid transparent; + vertical-align: 0; } .dropstart .dropdown-toggle:empty::after { margin-left: 0; } -.dropstart .dropdown-toggle::before { - vertical-align: 0; -} .dropdown-divider { height: 0; @@ -3744,7 +3736,7 @@ textarea.form-control-lg { } .dropdown-menu-dark .dropdown-item:hover, .dropdown-menu-dark .dropdown-item:focus { color: #fff; - background-color: rgba(255, 255, 255, 0.15); + background-color: #495057; } .dropdown-menu-dark .dropdown-item.active, .dropdown-menu-dark .dropdown-item:active { color: #fff; @@ -4707,6 +4699,9 @@ textarea.form-control-lg { padding: 0 0; margin-bottom: 1rem; list-style: none; + border: 1px solid #f3f3f3; + background-color: transparent; + border-radius: 0.25rem; } .breadcrumb-item + .breadcrumb-item { @@ -4772,9 +4767,6 @@ textarea.form-control-lg { border-color: #dee2e6; } -.page-link, .dataTable-pagination a { - padding: 0.375rem 0.75rem; -} .page-item:first-child .page-link, .page-item:first-child .dataTable-pagination a, .dataTable-pagination .page-item:first-child a, .dataTable-pagination li:first-child .page-link, .dataTable-pagination li:first-child a { border-top-left-radius: 0.25rem; @@ -11585,19 +11577,6 @@ body { border-color: #dbe3e6 } -.breadcrumb { - border: 1px solid #f3f3f3 -} - -.breadcrumb { - display: flex; - flex-wrap: wrap; - padding: 0.56rem 1.13rem; - margin-bottom: 1rem; - list-style: none; - background-color: transparent; - border-radius: 0.25rem -} nav { display: block @@ -11665,12 +11644,6 @@ a:link { text-decoration: none } -.breadcrumb-item+.breadcrumb-item::before { - display: inline-block; - padding-right: 0.5rem; - color: #6c757d; - content: "/" -} .highcharts-figure, .highcharts-data-table table { diff --git a/public/css/wms-dashboard.css b/public/css/wms-dashboard.css index 8c7ef139..e0d36149 100755 --- a/public/css/wms-dashboard.css +++ b/public/css/wms-dashboard.css @@ -102,7 +102,7 @@ align-items: center; background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(37, 99, 235, 0.12)); border-radius: 18px; - color: #0f766e; + color: #075e59; display: flex; font-size: 1.35rem; height: 56px; @@ -117,7 +117,7 @@ } .wms-chart-card__eyebrow { - color: #0f766e; + color: #075e59; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; diff --git a/resources/css/app.css b/resources/css/app.css index aa8dc738..e17e00ae 100755 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -185,7 +185,7 @@ select:focus[data-flux-control] { .dark .wms-mobile-menu { border-color: rgb(103 232 249 / 0.22); background: linear-gradient(135deg, rgb(24 24 27), rgb(8 47 73)); - color: rgb(165 243 252); + color: rgb(207 250 254); } .wms-sidebar-toggle { @@ -201,7 +201,7 @@ select:focus[data-flux-control] { .wms-mobile-close:hover, .wms-mobile-menu:hover { border-color: rgb(8 81 99); - color: rgb(14 116 144); + color: rgb(7 89 110); } .dark .wms-sidebar-toggle, @@ -260,12 +260,12 @@ select:focus[data-flux-control] { .wms-sidebar-link:hover { background: rgb(244 244 245); - color: rgb(14 116 144); + color: rgb(7 89 110); } .wms-sidebar-link.is-active { background: rgb(236 254 255); - color: rgb(14 116 144); + color: rgb(7 89 110); } .dark .wms-sidebar-link { @@ -319,12 +319,12 @@ select:focus[data-flux-control] { } .wms-user-card-button:hover { - border-color: rgb(14 116 144); + border-color: rgb(7 89 110); background: rgb(244 244 245); } .dark .wms-user-card-button:hover { - border-color: rgb(14 116 144); + border-color: rgb(7 89 110); background: rgb(48 48 52); } @@ -482,7 +482,7 @@ select:focus[data-flux-control] { border: 1px solid rgb(255 255 255 / 0.18); background: rgb(255 255 255 / 0.10); padding: 0.7rem 0.85rem; - color: rgb(219 234 254 / 0.90); + color: rgb(255 255 255); box-shadow: 0 10px 24px rgb(0 0 0 / 0.18); } @@ -758,7 +758,7 @@ select:focus[data-flux-control] { border-radius: 999px; border: 1px solid rgb(14 116 144 / 0.24); background: linear-gradient(135deg, rgb(14 116 144 / 0.14), rgb(37 99 235 / 0.12)); - color: rgb(14 116 144); + color: rgb(7 89 110); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.12em; @@ -767,7 +767,7 @@ select:focus[data-flux-control] { .dark .wms-mobile-badge { border-color: rgb(103 232 249 / 0.26); background: linear-gradient(135deg, rgb(8 145 178 / 0.26), rgb(37 99 235 / 0.20)); - color: rgb(165 243 252); + color: rgb(207 250 254); } .wms-page-hero { @@ -846,7 +846,7 @@ select:focus[data-flux-control] { border-radius: 0.9rem; border: 1px solid rgb(14 116 144 / 0.28); background: linear-gradient(135deg, rgb(255 255 255), rgb(236 254 255)); - color: rgb(14 116 144); + color: rgb(7 89 110); font-size: 1.05rem; box-shadow: 0 12px 28px rgb(14 116 144 / 0.16); } @@ -854,7 +854,7 @@ select:focus[data-flux-control] { .dark .wms-mobile-menu { border-color: rgb(103 232 249 / 0.30); background: linear-gradient(135deg, rgb(24 24 27), rgb(8 47 73)); - color: rgb(165 243 252); + color: rgb(207 250 254); } .wms-mobile-title { @@ -883,7 +883,7 @@ select:focus[data-flux-control] { border-radius: 999px; border: 1px solid rgb(14 116 144 / 0.24); background: linear-gradient(135deg, rgb(14 116 144 / 0.14), rgb(37 99 235 / 0.12)); - color: rgb(14 116 144); + color: rgb(7 89 110); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.12em; @@ -892,7 +892,7 @@ select:focus[data-flux-control] { .dark .wms-mobile-badge { border-color: rgb(103 232 249 / 0.26); background: linear-gradient(135deg, rgb(8 145 178 / 0.26), rgb(37 99 235 / 0.20)); - color: rgb(165 243 252); + color: rgb(207 250 254); } .wms-sidebar { @@ -1483,13 +1483,13 @@ html[data-wms-sidebar="collapsed"] .wms-sidebar { } .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { - background: rgb(8 145 178); + background: rgb(14 116 144); color: white; } .select2-container--default .select2-results__option--selected { background: rgb(236 254 255); - color: rgb(14 116 144); + color: rgb(7 89 110); } .dark .wms-select2-field .select2-container--default .select2-selection--single { @@ -1523,7 +1523,7 @@ html[data-wms-sidebar="collapsed"] .wms-sidebar { .dark .select2-container--default .select2-results__option--selected { background: rgb(8 47 73); - color: rgb(165 243 252); + color: rgb(207 250 254); } } diff --git a/resources/css/wms-dashboard.css b/resources/css/wms-dashboard.css index 8c7ef139..e0d36149 100755 --- a/resources/css/wms-dashboard.css +++ b/resources/css/wms-dashboard.css @@ -102,7 +102,7 @@ align-items: center; background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(37, 99, 235, 0.12)); border-radius: 18px; - color: #0f766e; + color: #075e59; display: flex; font-size: 1.35rem; height: 56px; @@ -117,7 +117,7 @@ } .wms-chart-card__eyebrow { - color: #0f766e; + color: #075e59; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; diff --git a/resources/js/Pages/Auth/Register.vue b/resources/js/Pages/Auth/Register.vue index 090408d4..53df2c5e 100755 --- a/resources/js/Pages/Auth/Register.vue +++ b/resources/js/Pages/Auth/Register.vue @@ -41,7 +41,6 @@ const submit = () => { class="mt-1 block w-full" required autofocus - autocomplete="name" /> diff --git a/resources/views/livewire/settings/profile.blade.php b/resources/views/livewire/settings/profile.blade.php index 234c6178..afae7daf 100755 --- a/resources/views/livewire/settings/profile.blade.php +++ b/resources/views/livewire/settings/profile.blade.php @@ -5,7 +5,7 @@
- +