diff --git a/Modules/M3/Config/arrays.php b/Modules/M3/Config/arrays.php index c627eb8f..4dc301d9 100644 --- a/Modules/M3/Config/arrays.php +++ b/Modules/M3/Config/arrays.php @@ -8,7 +8,7 @@ return [ #'nonWorkingHourCode' => ['73,85,89,90,91,92,86,99'], 'autorefresh_all' => ['00:15'], 'autorefresh_notall' => ['00:15'], - + 'payrollCodes' => ['33,49,75,94,98,102,171'], 'min_work_hours_for_break' => ['4'], @@ -57,7 +57,7 @@ return [ 'PHPTimeOutCL'=> 1000, 'maxRecDL' => 20000, 'maxRecCL' => 55000, - 'BadChars' => ['–','\t','\n','\u20134807','\u20131','\u201333','\u2013671' ,'Ÿ','á', 'é', 'í', 'ó' ,'ú','“','”'], + 'BadChars' => ['–','\t','\n','\u20134807','\u20131','\u201333','\u2013671' ,'Ÿ','á', 'é', 'í', 'ó' ,'ú','“','”'], 'PdfPath' => env('M3_LABELS_PATH', storage_path('app/m3/labels') . DIRECTORY_SEPARATOR), # Warning : The path for PDF storage is shared by all Instances and should not be altered 'DUMMYPDF' => '', 'uom_size' => ['110-142-303'=>'mm', @@ -68,7 +68,7 @@ return [ '110-143-322'=>'lbs'], # unit of mesure for boxes weight kg or lbs #STATUS ARRAY FOR ICM688M1 -'status_ICM688M1_array' => [ +'status_ICM688M1_array' => [ "P"=>"Pending error checking by splitting (OP510E2)", "H"=>"Hold as error found (OP510E3)", "L"=>"Ready to pick", @@ -81,18 +81,17 @@ return [ "A"=>"ShipConfirmed" ], 'whsePerf_targets' => [ - 'all_notes'=>'90', 'all_dollars'=>'85', 'all_weight'=>'90', + 'all_notes'=>'90', 'all_dollars'=>'85', 'all_weight'=>'90', 'ltl_notes'=>'90', 'ltl_dollars'=>'95', 'ltl_weight'=>'99', 'parcel_notes'=>'90', 'parcel_dollars'=>'75', 'parcel_weight'=>'80' ], '2Ship' => [ # 2Ship WS_Key - # live $TwoShip_Key="FED945D1-5DC7-415E-BDAB-16347E7C1304"; - # test $TwoShip_Key="45027F2A-EDA6-4C16-8AD4-9BC70CE94AB8"; + # live $TwoShip_Key="FED945D1-5DC7-415E-BDAB-16347E7C1304"; + # test $TwoShip_Key="45027F2A-EDA6-4C16-8AD4-9BC70CE94AB8"; 'TwoShip_Key' => "45027F2A-EDA6-4C16-8AD4-9BC70CE94AB8", 'end_point' =>"https://euroapi.2ship.com/api/", 'hold_update' =>"UpdateOnHoldOrder_V1", ], ]; - \ No newline at end of file diff --git a/Modules/M3/Config/arrays_custom.php b/Modules/M3/Config/arrays_custom.php index 8ffea5c0..fac2f222 100644 --- a/Modules/M3/Config/arrays_custom.php +++ b/Modules/M3/Config/arrays_custom.php @@ -14,7 +14,7 @@ return [ '171'=>'17' ] - + ]; # '75'=>'26', # '75'=>'23', @@ -22,19 +22,19 @@ return [ # Found in BLDPERFST rpg pgm in EWRPGSRC / EWSRCTST # PICKING stats -# when a5sentview in ('7','9') then 33 -# when a5sentview = 5 then 49 -# when a5sentview = 12 then 98 -# when a5sentview in ('2','10') then 75 -# when a5sentview in ('1','3','4','11') then 94 -# when a5sentview = 8 then 102 -# when a5sentview = 6 then 171 -# else 999 +# when a5sentview in ('7','9') then 33 +# when a5sentview = 5 then 49 +# when a5sentview = 12 then 98 +# when a5sentview in ('2','10') then 75 +# when a5sentview in ('1','3','4','11') then 94 +# when a5sentview = 8 then 102 +# when a5sentview = 6 then 171 +# else 999 # PACKING stats -# case when (select AYTYPE from ICM695M1 -# where AYINTBOX=AZINTBOX -# and AYSENTPKR=AZSENTPKR FETCH FIRST ROW ONLY) +# case when (select AYTYPE from ICM695M1 +# where AYINTBOX=AZINTBOX +# and AYSENTPKR=AZSENTPKR FETCH FIRST ROW ONLY) # in ('','BX') then '16' else '66' end as AYTYPE, ?> \ No newline at end of file diff --git a/Modules/M3/Console/CallCloseAPI.php b/Modules/M3/Console/CallCloseAPI.php index d9043c71..be3bdbbf 100644 --- a/Modules/M3/Console/CallCloseAPI.php +++ b/Modules/M3/Console/CallCloseAPI.php @@ -65,7 +65,7 @@ class CallCloseAPI extends Command // dump($ICM705M1); if (count($ICM705M1)>0) { - # Loop the Results from $ICM705M1 + # Loop the Results from $ICM705M1 foreach ($ICM705M1 as $key => $ICM705M1R) { $MANIFESTNum = $ICM705M1R->APMANIFEST; @@ -76,7 +76,7 @@ class CallCloseAPI extends Command $ICM705M1U = DB::connection(config('m3.connection', 'pgsql'))->table('icm705m1') ->where('APMANIFEST',$MANIFESTNum) ->where('APCO',$USERCO) - ->where('APWHS',$USERWH) + ->where('APWHS',$USERWH) ->update(["APSPARE2"=>"P"]); $myRequest = new Request(); @@ -86,7 +86,7 @@ class CallCloseAPI extends Command 'COMPANY' => $USERCO, 'TRANSTYPE' => 'M', 'MANIFEST' => $MANIFESTNum - ]); + ]); $callCloseShipment = CloseShipment::CloseShipmentCoChargeAPI($myRequest); $responseData = $callCloseShipment->getData(); $jsonData = json_encode($responseData); @@ -109,7 +109,7 @@ class CallCloseAPI extends Command $ICM705M1U = DB::connection(config('m3.connection', 'pgsql'))->table('icm705m1') ->where('APMANIFEST',$MANIFESTNum) ->where('APCO',$APCO) - ->where('APWHS',$APWHS) + ->where('APWHS',$APWHS) ->update(["APSPARE2"=>"P"]); $myRequest = new Request(); diff --git a/Modules/M3/Console/ClosedOrderSaveXls.php b/Modules/M3/Console/ClosedOrderSaveXls.php index 872b6bef..8a6e9ae5 100644 --- a/Modules/M3/Console/ClosedOrderSaveXls.php +++ b/Modules/M3/Console/ClosedOrderSaveXls.php @@ -68,7 +68,7 @@ class ClosedOrderSaveXls extends Command $PPL = $this->argument('pl'); $PLANT = isset($PPL) ? trim($PPL) : ''; - # Generate last Month Report + # Generate last Month Report $date = new \DateTime('FIRST DAY OF THIS MONTH'); $date->modify('-1 month'); $fromPreviousMonth = $date->format('Y-m-d'); @@ -108,10 +108,10 @@ class ClosedOrderSaveXls extends Command (SELECT A4SHSHNM FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) AS A4SHSHNM , CASE WHEN SHDT IS NULL THEN (SELECT SHDATA FROM ICM699M WHERE SHMACPKR=A5MACPKR AND SHTYPE='M3-Res-out' AND SHSOURCE='CloseShipmentCoChargeAPI' ORDER BY SHDT DESC, SHTIME DESC FETCH FIRST 1 ROWS ONLY) ELSE '' END AS REASON, A1SHCURR, - CASE - WHEN (SELECT A4SHIPTYPE FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) = 'LTL' + CASE + WHEN (SELECT A4SHIPTYPE FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) = 'LTL' THEN (SELECT A4RATETCP FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) * ".(100.00 - Config::get('arrays.misc.discountCarrierRateForCustomerPriceLTL'))/100 ." - ELSE (SELECT A4RATETCP FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) * ".(100.00 - Config::get('arrays.misc.discountCarrierRateForCustomerPriceParcel') )/100 ." + ELSE (SELECT A4RATETCP FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) * ".(100.00 - Config::get('arrays.misc.discountCarrierRateForCustomerPriceParcel') )/100 ." END AS FREIGHT FROM ICM688M2 LEFT JOIN ICM699M ON SHMACPKR=A5MACPKR AND SHTYPE='M3-Res-out' AND SHDATA LIKE 'Success%' AND SHSOURCE='CloseShipmentCoChargeAPI' @@ -120,7 +120,7 @@ class ClosedOrderSaveXls extends Command WHERE A5MACPKR IN ( SELECT DISTINCT AYMACPKR FROM ICM695M1 - WHERE AYSTATUS IN ('Z','z') AND AYAPR8N002 BETWEEN $reportDate AND $toreportDate + WHERE AYSTATUS IN ('Z','z') AND AYAPR8N002 BETWEEN $reportDate AND $toreportDate ) AND A5CO=$COMPANY AND A5WHS=$WHS AND A5PLANT=$PLANT "); @@ -140,7 +140,7 @@ class ClosedOrderSaveXls extends Command # Count records before exporting to excel : Max 55K records are allowed $ICM688M2Count = $ICM688M2Col->count(); - # Set Max allowed records + # Set Max allowed records $maxRecords = Config::get('arrays.maxRecCL'); if ($ICM688M2Count>$maxRecords) { Log::channel('dailyCron')->info('Maximum allowed records for Excel export is: '.number_format($maxRecords).' current records: '.number_format($ICM688M2Count)); @@ -162,7 +162,7 @@ class ClosedOrderSaveXls extends Command Log::channel('dailyCron')->info("Monthly report, no records found: Nothing to save..."); } - # Generate current Month Report + # Generate current Month Report $now = new \DateTime(); $first_day_of_month = $now->format('Y-m-01'); $current_date = $now->format('Y-m-d'); @@ -197,10 +197,10 @@ class ClosedOrderSaveXls extends Command (SELECT A4SHSHNM FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) AS A4SHSHNM , CASE WHEN SHDT IS NULL THEN (SELECT SHDATA FROM ICM699M WHERE SHMACPKR=A5MACPKR AND SHTYPE='M3-Res-out' AND SHSOURCE='CloseShipmentCoChargeAPI' ORDER BY SHDT DESC, SHTIME DESC FETCH FIRST 1 ROWS ONLY) ELSE '' END AS REASON, A1SHCURR, - CASE - WHEN (SELECT A4SHIPTYPE FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) = 'LTL' + CASE + WHEN (SELECT A4SHIPTYPE FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) = 'LTL' THEN (SELECT A4RATETCP FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) * ".(100.00 - Config::get('arrays.misc.discountCarrierRateForCustomerPriceLTL'))/100 ." - ELSE (SELECT A4RATETCP FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) * ".(100.00 - Config::get('arrays.misc.discountCarrierRateForCustomerPriceParcel') )/100 ." + ELSE (SELECT A4RATETCP FROM ICM688M1 WHERE A4MACPKR=A5MACPKR) * ".(100.00 - Config::get('arrays.misc.discountCarrierRateForCustomerPriceParcel') )/100 ." END AS FREIGHT FROM ICM688M2 LEFT JOIN ICM699M ON SHMACPKR=A5MACPKR AND SHTYPE='M3-Res-out' AND SHDATA LIKE 'Success%' AND SHSOURCE='CloseShipmentCoChargeAPI' @@ -209,7 +209,7 @@ class ClosedOrderSaveXls extends Command WHERE A5MACPKR IN ( SELECT DISTINCT AYMACPKR FROM ICM695M1 - WHERE AYSTATUS IN ('Z','z') AND AYAPR8N002 BETWEEN $reportDate2 AND $toreportDate2 + WHERE AYSTATUS IN ('Z','z') AND AYAPR8N002 BETWEEN $reportDate2 AND $toreportDate2 ) AND A5CO=$COMPANY AND A5WHS=$WHS AND A5PLANT=$PLANT "); @@ -229,7 +229,7 @@ class ClosedOrderSaveXls extends Command # Count records before exporting to excel : Max 55K records are allowed $ICM688M2Count = $ICM688M2Col2->count(); - # Set Max allowed records + # Set Max allowed records $maxRecords = Config::get('arrays.maxRecCL'); if ($ICM688M2Count>$maxRecords) { Log::channel('dailyCron')->info('Maximum allowed records for Excel export is: '.number_format($maxRecords).' current records: '.number_format($ICM688M2Count)); diff --git a/Modules/M3/Console/DeleteOldLabels.php b/Modules/M3/Console/DeleteOldLabels.php index cab162a2..073440ae 100644 --- a/Modules/M3/Console/DeleteOldLabels.php +++ b/Modules/M3/Console/DeleteOldLabels.php @@ -66,8 +66,8 @@ class DeleteOldLabels extends Command foreach ($subFolders as $key => $subFolder) { $labelsDirectory = $labelsDirectoryTmp.$subFolder; - $this->info("Getting Files From Directory: ".$labelsDirectory); - Log::channel('dailyCron')->info("Getting Files From Directory: ".$labelsDirectory); + $this->info("Getting Files From Directory: ".$labelsDirectory); + Log::channel('dailyCron')->info("Getting Files From Directory: ".$labelsDirectory); exec('find '.$labelsDirectory.' -ctime +180 -type f -exec rm {} \;'); # exec('find '.$labelsDirectory.' -ctime +190 -type f -print | wc -l'); @@ -92,7 +92,7 @@ class DeleteOldLabels extends Command // $this->info("Files to Delete..."); // dump($filesToDeleteArr); - + # Delete Old Files File::delete($filesToDeleteArr); diff --git a/Modules/M3/Console/GenerateGS1Cmd.php b/Modules/M3/Console/GenerateGS1Cmd.php index efbdcaec..9d9dc60a 100644 --- a/Modules/M3/Console/GenerateGS1Cmd.php +++ b/Modules/M3/Console/GenerateGS1Cmd.php @@ -81,7 +81,7 @@ class GenerateGS1Cmd extends Command $GSArray1 = $this->option('gsarray'); $GSArray = json_decode($GSArray1, true); // dump($GSArray); - + # MAK : Used for debug only $GSArray = ["Macpkr"=> "55555","Recipient_Address1"=>"9571 Pan American DR", "Recipient_Address2"=>"C/O AEE Solar","Recipient_City"=>"El Paso", "Recipient_CompanyName"=>"SNAPRACK EL PASO PRODUCTION","Recipient_CountryCode"=>"US","Recipient_PostalCode"=>"79927","Recipient_State"=>"TX", @@ -98,7 +98,7 @@ class GenerateGS1Cmd extends Command ->select('R428US','R428CO', 'R428WH','R428PL') ->where('R428US','=',$SHUSER) ->first(); - + $R428US = isset($ICM428M->R428US) ? $ICM428M->R428US : ''; # User $COMPANY = isset($ICM428M->R428CO) ? $ICM428M->R428CO : ''; # Company $PLANT = isset($ICM428M->R428PL) ? $ICM428M->R428PL : ''; # Plant @@ -119,25 +119,25 @@ class GenerateGS1Cmd extends Command .border_rght { border-right: 1px solid; } - + .margin_t { padding-top : 10px; } - + .align_lft { text-align: left; } .align_center { text-align: center; } - + @page { margin: 5px; } body { margin: 0px; }
'; - # Get number of Pallets + # Get number of Pallets $packageCount = count($GSArray['PackagesArray']); $packageNum = 1; foreach ($GSArray['PackagesArray'] as $key => $value) { @@ -157,7 +157,7 @@ class GenerateGS1Cmd extends Command $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; @@ -181,10 +181,10 @@ class GenerateGS1Cmd extends Command $data = [ 'ship_to' => $GSArray["Recipient_CompanyName"].'