M3 Security Fixes for pass 29
This commit is contained in:
@@ -14,7 +14,6 @@ use Modules\M3\Http\Controllers\Controller;
|
||||
use Modules\M3\Http\Controllers\GetContentsController;
|
||||
use Str;
|
||||
|
||||
// use Request;
|
||||
class CloseShipment extends Controller
|
||||
{
|
||||
private const ZERO_PAD = '000000';
|
||||
@@ -55,7 +54,6 @@ class CloseShipment extends Controller
|
||||
$pdfFilePath = Config::get('arrays.PdfPath');
|
||||
$DELIVERYNO = $MANIFEST != '' ? $MANIFEST : self::ZERO_PAD;
|
||||
|
||||
// Log::channel('dailyCron')->info("Close Manifest:".$MANIFEST.'-WHS: '.$WHS."-CO:".$COMPANY);
|
||||
|
||||
if ($urlParams != '') {
|
||||
// Write to Logs : JSON
|
||||
@@ -65,7 +63,6 @@ class CloseShipment extends Controller
|
||||
'MANIFEST-MACPKR' => $MANIFEST,
|
||||
'TRANSTYPE' => $TRANSTYPE,
|
||||
]);
|
||||
// dd($JSONIN);
|
||||
|
||||
$data = [
|
||||
'SHMACPKR' => $DELIVERYNO,
|
||||
@@ -81,13 +78,11 @@ class CloseShipment extends Controller
|
||||
'SHWHS' => $WHS,
|
||||
];
|
||||
Helper::logToICM699M($data);
|
||||
// dd($JSONIN);
|
||||
|
||||
// Get Token
|
||||
$tokenResponse = Helper::checkReceiveTokenV2();
|
||||
|
||||
$tokenData = $tokenResponse->getData();
|
||||
// dd($IonToken->code);
|
||||
|
||||
if ($tokenData->code == '200') {
|
||||
$IonToken = isset($tokenData->token) ? $tokenData->token : '';
|
||||
@@ -160,14 +155,12 @@ class CloseShipment extends Controller
|
||||
->where('SHERROR', 'Z')
|
||||
->where('SHTYPE', 'M3-QtyChg')
|
||||
->get();
|
||||
// dd($ICM699MQtyChg);
|
||||
foreach ($ICM699MQtyChg as $key => $ICM699MQtyChgR) {
|
||||
$string = $ICM699MQtyChgR->SHDATA;
|
||||
$start = 'PickerLine:';
|
||||
$end = ' -';
|
||||
$LineAck[] = Helper::getSubstringBetween($string, $start, $end);
|
||||
}
|
||||
// dd($LineAck);
|
||||
} elseif ($TRANSTYPE == 'Z') {
|
||||
$ICM695M1PREP = DB::connection(config('m3.connection', 'pgsql'))->table('icm688m1')
|
||||
->select()
|
||||
@@ -179,7 +172,6 @@ class CloseShipment extends Controller
|
||||
}
|
||||
|
||||
$ICM695M1TMP = $ICM695M1PREP->get();
|
||||
// dump($ICM695M1TMP);
|
||||
// Log::channel('dailyCron')->info($ICM695M1TMP);
|
||||
|
||||
// PFC if MACKPKR already Closed : Case 671
|
||||
@@ -193,10 +185,8 @@ class CloseShipment extends Controller
|
||||
return trim($post->AYMACPKR);
|
||||
});
|
||||
}
|
||||
// dump($ICM695M1TMPCOLF);
|
||||
|
||||
$ICM695M1TMPCOLFA = $ICM695M1TMPCOLF->toArray();
|
||||
// dump($ICM695M1TMPCOLFA);
|
||||
|
||||
$ICM699MSuccess = DB::connection(config('m3.connection', 'pgsql'))->table('icm699m')
|
||||
->select('SHMACPKR')
|
||||
@@ -208,12 +198,10 @@ class CloseShipment extends Controller
|
||||
->where('SHTYPE', 'M3-Res-out')
|
||||
->where('SHDATA', 'like', '%Success%')
|
||||
->get();
|
||||
// dump($ICM699MSuccess);
|
||||
$ICM699MSuccessCol = collect($ICM699MSuccess);
|
||||
$ICM699MSuccessColF = $ICM699MSuccessCol->map(function ($post) {
|
||||
return $post->SHMACPKR;
|
||||
});
|
||||
// dump($ICM699MSuccessColF);
|
||||
$ICM699MSuccessColFAr = $ICM699MSuccessColF->toArray();
|
||||
|
||||
if ($TRANSTYPE == 'Z') {
|
||||
@@ -229,9 +217,7 @@ class CloseShipment extends Controller
|
||||
}
|
||||
$ICM695M1TMP = $ICM695M1TMPF;
|
||||
|
||||
// Log::channel('dailyCron')->info($ICM695M1TMP);
|
||||
|
||||
// dd($ICM695M1TMP);
|
||||
$FreightTermsTMP = DB::connection(config('m3.connection', 'pgsql'))->table('icm321m')
|
||||
->selectRaw('TRIM(ARCODE) as FREIGHTTERMS,ARCHARGE as BILLABLE')
|
||||
->get();
|
||||
@@ -311,7 +297,6 @@ class CloseShipment extends Controller
|
||||
->where('AYWHS', $AYWHS)
|
||||
->orderBy('AYINTBOX')
|
||||
->get();
|
||||
// dd($ICM695M1JOINTMP);
|
||||
|
||||
foreach ($ICM695M1JOINTMP as $key => $ICM695M1JOINR) {
|
||||
$A4SHIPVIA = isset($ICM695M1JOINR->A4SHIPVIA) ? trim(str_replace('&', '_', $ICM695M1JOINR->A4SHIPVIA)) : '';
|
||||
@@ -421,7 +406,6 @@ class CloseShipment extends Controller
|
||||
->first();
|
||||
|
||||
$AlreadySentToM3 = isset($ICM699MS->SHMACPKR) ? trim($ICM699MS->SHMACPKR) : '';
|
||||
// dump($AlreadySentToM3);
|
||||
|
||||
if ($AlreadySentToM3 != '') {
|
||||
// Add Message
|
||||
@@ -482,7 +466,6 @@ class CloseShipment extends Controller
|
||||
$DOCNUMT = $AYINTBOX;
|
||||
$PDFKey = $value . '/' . $value . '_' . $AYMACPKR . '_' . $DOCNUMT . '_' . $COMPANY . '_' . $WHS;
|
||||
$pdfFileName = $pdfFilePath . $PDFKey . '.pdf';
|
||||
// dd($pdfFileName);
|
||||
|
||||
if (File::exists($pdfFileName)) {
|
||||
$CarrierLabel = route('m3.M3GetPDFFromCache.index', ['MACPKR' => $AYMACPKR, 'DOCTYPE' => $DOCTYPE]);
|
||||
@@ -494,7 +477,6 @@ class CloseShipment extends Controller
|
||||
$DOCNUMT = $AYINTBOX;
|
||||
$PDFKey = $value . '/' . $value . '_' . $AYMACPKR . '_' . $DOCNUMT . '_' . $COMPANY . '_' . $WHS;
|
||||
$pdfFileName = $pdfFilePath . $PDFKey . '.pdf';
|
||||
// dd($pdfFileName);
|
||||
|
||||
if (File::exists($pdfFileName)) {
|
||||
$ContentLabel = route('m3.M3GetPDFFromCache.index', ['MACPKR' => $AYMACPKR, 'DOCTYPE' => $DOCTYPE]);
|
||||
@@ -535,7 +517,6 @@ class CloseShipment extends Controller
|
||||
'CONTENTLABELDOC' => $ContentLabel,
|
||||
];
|
||||
}
|
||||
// dump($PACKAGES);
|
||||
|
||||
// Check Packages array before proceeding with CloseShipment
|
||||
if (count($PACKAGES) > 0) {
|
||||
@@ -545,12 +526,10 @@ class CloseShipment extends Controller
|
||||
$DOCNUMT = $AYMACPKR;
|
||||
$PDFKey = $DOCTYPE . '/' . $DOCTYPE . '_' . $AYMACPKR . '_' . $DOCNUMT . '_' . $COMPANY . '_' . $WHS;
|
||||
$pdfFileName = $pdfFilePath . $PDFKey . '.pdf';
|
||||
// dd($pdfFileName);
|
||||
|
||||
if (File::exists($pdfFileName)) {
|
||||
$PackingList = route('m3.M3GetPDFFromCache.index', ['MACPKR' => $AYMACPKR, 'DOCTYPE' => $DOCTYPE]);
|
||||
}
|
||||
// dd($PackingList);
|
||||
|
||||
// Add Cocharge
|
||||
if (count($JSONCoCharge) > 0) {
|
||||
@@ -604,7 +583,6 @@ class CloseShipment extends Controller
|
||||
'ENDFLAG' => $EndFlag,
|
||||
]);
|
||||
}
|
||||
// dump($JSONCS);
|
||||
|
||||
// No Errors Proceed in Calling M3 CLose API
|
||||
if ($ErrorMsgs == '') {
|
||||
@@ -670,7 +648,6 @@ class CloseShipment extends Controller
|
||||
// Check M3 Response for Errors
|
||||
$responseResult = $responseContents->result;
|
||||
$M3Errors = Helper::checkM3Errors($responseResult);
|
||||
// dd($M3Errors);
|
||||
|
||||
// If you get a successful response, update database file ICM688M1/A4RATEm3=X
|
||||
// Update ICM688M1 : Change A4RATEM3
|
||||
@@ -811,7 +788,6 @@ class CloseShipment extends Controller
|
||||
}
|
||||
// Close Shipment for Zero Picks
|
||||
elseif (count($ICM695M1TMP) > 0 && $TRANSTYPE == 'Z') {
|
||||
// dd($ICM695M1TMP);
|
||||
$ErrorMsgs = '';
|
||||
|
||||
foreach ($ICM695M1TMP as $key => $ICM695M1JOINR) {
|
||||
@@ -825,7 +801,6 @@ class CloseShipment extends Controller
|
||||
$A4CLOSEM3 = trim($ICM695M1JOINR->A4CLOSEM3);
|
||||
$AYWHS = trim($ICM695M1JOINR->A4WHS);
|
||||
$AYCO = trim($ICM695M1JOINR->A4CO);
|
||||
// dump($AYMACPKR);
|
||||
|
||||
// Construct Json for CloseShipment Without PDF Files
|
||||
$JSONCS = json_encode([
|
||||
@@ -939,7 +914,6 @@ class CloseShipment extends Controller
|
||||
'SHCO' => $COMPANY,
|
||||
'SHWHS' => $WHS,
|
||||
];
|
||||
// dump($data);
|
||||
Helper::logToICM699M($data);
|
||||
// Add Message
|
||||
$ErrorMsgs = $ErrorMsgs . $M3Errors . '-';
|
||||
@@ -1031,7 +1005,6 @@ class CloseShipment extends Controller
|
||||
]);
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
// Log::error($th);
|
||||
$getCurlErrors = str_contains($th->getMessage(), 'cURL error');
|
||||
if ($getCurlErrors) {
|
||||
// dd($getCurlErrors);
|
||||
|
||||
@@ -19,7 +19,6 @@ class M3Controller extends Controller
|
||||
// Split Data and Write to ICM666M2
|
||||
public function insertToICM666M2($dataSplit, $commentData)
|
||||
{
|
||||
// dump($commentData);
|
||||
// dump($dataSplit);
|
||||
|
||||
$commentDataSS = explode("\n", $dataSplit);
|
||||
@@ -29,7 +28,6 @@ class M3Controller extends Controller
|
||||
$fullData = $commentData;
|
||||
$fullData['AXCOMMENT'] = $substring;
|
||||
$fullData['AXLINENO'] = $AXLINENO;
|
||||
// dump($fullData);
|
||||
$insertSQL = DB::connection(config('m3.connection', 'pgsql'))->table('icm666m2')->insert($fullData);
|
||||
|
||||
$AXLINENO++;
|
||||
@@ -217,12 +215,10 @@ class M3Controller extends Controller
|
||||
|
||||
$commentData = ['AXCO' => $AXCO, 'AXPLANT' => $AXPLANT, 'AXWHS' => $AXWHS, 'AXDELNO' => $AXDELNO, 'AXONO' => $AXONO,
|
||||
'AXRLNO' => $AXRLNO, 'AXSHNO' => $AXSHNO, 'AXDOCUMENT' => $AXDOCUMENT];
|
||||
// dump($commentData);
|
||||
|
||||
switch ($AXDOCUMENT) {
|
||||
case 'Picker':
|
||||
$Picker = isset($comment) ? Helper::sanityzeString($comment) : 'null';
|
||||
// dump($Picker);
|
||||
if ($Picker != 'null') {
|
||||
$this->insertToICM666M2($Picker, $commentData);
|
||||
}
|
||||
@@ -230,7 +226,6 @@ class M3Controller extends Controller
|
||||
|
||||
case 'Packer':
|
||||
$Packer = isset($comment) ? Helper::sanityzeString($comment) : 'null';
|
||||
// dump($Packer);
|
||||
if ($Packer != 'null') {
|
||||
$this->insertToICM666M2($Packer, $commentData);
|
||||
}
|
||||
@@ -238,7 +233,6 @@ class M3Controller extends Controller
|
||||
|
||||
case 'Carrier':
|
||||
$Carrier = isset($comment) ? Helper::sanityzeString($comment) : 'null';
|
||||
// dump($Carrier);
|
||||
if ($Carrier != 'null') {
|
||||
$this->insertToICM666M2($Carrier, $commentData);
|
||||
}
|
||||
@@ -246,7 +240,6 @@ class M3Controller extends Controller
|
||||
|
||||
case 'Other':
|
||||
$Other = isset($comment) ? Helper::sanityzeString($comment) : 'null';
|
||||
// dump($Other);
|
||||
if ($Other != 'null') {
|
||||
$this->insertToICM666M2($Other, $commentData);
|
||||
}
|
||||
@@ -399,7 +392,6 @@ class M3Controller extends Controller
|
||||
$InsertArray[$value[0]] = $fieldValue;
|
||||
}
|
||||
}
|
||||
// Log::info($InsertArray);
|
||||
|
||||
// Check ICM709M
|
||||
$ICM709MSEL = DB::connection(config('m3.connection', 'pgsql'))->table('icm709m')
|
||||
@@ -418,7 +410,6 @@ class M3Controller extends Controller
|
||||
$HazMat = isset($ICM709MSEL->AT9WRN) ? $ICM709MSEL->AT9WRN : '';
|
||||
$InsertArray['A1MATWRN'] = $HazMat;
|
||||
|
||||
// if ($PalletQty!='') {
|
||||
// $InsertArray['A1USRN01']=$palletQty;
|
||||
// }
|
||||
|
||||
@@ -461,7 +452,6 @@ class M3Controller extends Controller
|
||||
|
||||
// define several input/output params
|
||||
$params = [];
|
||||
// $params[] = $conn->AddParameterChar('out',7,'eqNumber');
|
||||
|
||||
// AddParameterChar($io, $size, $comment, $varName, $value, $varying, $dimension)
|
||||
// Add Warehouse Param
|
||||
@@ -473,7 +463,6 @@ class M3Controller extends Controller
|
||||
// Add Delivery Note Param
|
||||
$PickerNumberNoZero = ltrim(strval($PickerNumber), '0');
|
||||
$params[] = $conn->AddParameterChar('in', 11, 'PickerNumber', '', $PickerNumberNoZero);
|
||||
// $params[] = $conn->AddParameterZoned('in', 11, 0, 'ParamIn');
|
||||
|
||||
// Start Time Tracking
|
||||
$start = microtime(true);
|
||||
@@ -523,7 +512,6 @@ class M3Controller extends Controller
|
||||
'SHDATA' => 'General Catchable Error - ' . substr($th, 0, 300) . self::M3_LIST_SUFFIX . json_encode($jsonFile), 'SHUSER' => $REQKPKUS, 'SHSOURCE' => $SHSOURCE, 'SHCO' => $Company, 'SHWHS' => $Warehouse];
|
||||
Helper::logToICM699M($data);
|
||||
|
||||
// Log::error($th);
|
||||
return response()->json([
|
||||
'code' => '405',
|
||||
'status' => 'error',
|
||||
|
||||
@@ -56,7 +56,6 @@ class ReplenAPI extends Controller
|
||||
foreach ($PART as $key => $value) {
|
||||
$PARTS[] = ['PART' => $value, 'LOT' => ''];
|
||||
}
|
||||
// dump($PARTS);
|
||||
|
||||
$JSON = json_encode(['WHS' => $WHS, 'PARTS' => $PARTS]);
|
||||
|
||||
@@ -68,7 +67,6 @@ class ReplenAPI extends Controller
|
||||
// Get Token
|
||||
$tokenResponse = Helper::checkReceiveTokenV2();
|
||||
$tokenData = $tokenResponse->getData();
|
||||
// dd($IonToken->code);
|
||||
if ($tokenData->code == '200') {
|
||||
$IonToken = isset($tokenData->token) ? $tokenData->token : '';
|
||||
} else {
|
||||
@@ -106,9 +104,7 @@ class ReplenAPI extends Controller
|
||||
$JsonSanytized = Helper::sanityzeString($responseJSON);
|
||||
// Array
|
||||
$responseArray = json_decode($JsonSanytized, true);
|
||||
// LOG::info( $responseArray);
|
||||
$responseTMP = $responseArray['result'];
|
||||
// LOG::info($responseTMP);
|
||||
} else {
|
||||
$M3Errors = 'Error: No Response from M3';
|
||||
}
|
||||
@@ -135,7 +131,6 @@ class ReplenAPI extends Controller
|
||||
|
||||
$dataToWrite2 = [];
|
||||
foreach ($responseTMP as $key => $value) {
|
||||
// dump($value);
|
||||
$dataToWrite = [];
|
||||
|
||||
foreach ($value as $key2 => $content) {
|
||||
@@ -143,13 +138,11 @@ class ReplenAPI extends Controller
|
||||
$dataToWrite[$key2] = $content;
|
||||
} else {
|
||||
foreach ($content as $key3 => $content2) {
|
||||
// dump($content2);
|
||||
$dataToWrite2[] = array_merge($dataToWrite, $content2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// LOG::info($dataToWrite2);
|
||||
|
||||
// Delete Old Records from IC630M
|
||||
foreach ($dataToWrite2 as $key => $value) {
|
||||
@@ -167,12 +160,10 @@ class ReplenAPI extends Controller
|
||||
->where('WSELOC', $value['Warehouse'])
|
||||
->where('VLOCID', $value['Location'])
|
||||
->first();
|
||||
// dd($DE640MSQLSEL);
|
||||
|
||||
$LocationExist = isset($DE640MSQLSEL->VLOCID) ? trim($DE640MSQLSEL->VLOCID) : '';
|
||||
$WHExist = isset($DE640MSQLSEL->WSELOC) ? trim($DE640MSQLSEL->WSELOC) : '';
|
||||
$COExist = isset($DE640MSQLSEL->LVCO) ? trim($DE640MSQLSEL->LVCO) : '';
|
||||
// dd($LocationExist .': '.$WHExist.': '.$COExist);
|
||||
|
||||
// if No records Founds insert New Record
|
||||
if ($LocationExist == '' && $WHExist == '' && $COExist == '') {
|
||||
@@ -220,7 +211,6 @@ class ReplenAPI extends Controller
|
||||
|
||||
DB::connection(config('m3.connection', 'pgsql'))->table('ic630m')->insert($SQLInsertPrep630M);
|
||||
}
|
||||
// dump($SQLInsertPrep);
|
||||
|
||||
// Send Response
|
||||
return response()->json([
|
||||
@@ -273,7 +263,6 @@ class ReplenAPI extends Controller
|
||||
'SHDATA' => 'An Error Occured - ' . substr($th, 0, 300), 'SHUSER' => $SHUSER, 'SHSOURCE' => $SHSOURCE, 'SHCO' => $CO, 'SHWHS' => $WHS];
|
||||
Helper::logToICM699M($data);
|
||||
|
||||
// Log::error($th);
|
||||
return response()->json([
|
||||
'code' => '405',
|
||||
'status' => 'error',
|
||||
|
||||
@@ -26,7 +26,6 @@ class TransferAPI extends Controller
|
||||
ini_set('max_execution_time', Config::get('arrays.PHPTimeOut'));
|
||||
ini_set('max_input_time', Config::get('arrays.PHPTimeOut'));
|
||||
ini_set('default_socket_timeout', Config::get('arrays.PHPTimeOut'));
|
||||
// dd($request->all());
|
||||
|
||||
// Get the Calling User
|
||||
$SHUSER = m3_user() !== '' ? Str::upper(m3_user()) : 'WebUser';
|
||||
@@ -95,7 +94,6 @@ class TransferAPI extends Controller
|
||||
->where('SHERROR', 'X')
|
||||
->where('SHTYPE', $SHTYPE)
|
||||
->first();
|
||||
// dump($ICM699MS->SHDATA);
|
||||
|
||||
// Read The substring from SHDATA after M3-JSN-out
|
||||
$word = 'M3-JSN-out';
|
||||
@@ -120,10 +118,8 @@ class TransferAPI extends Controller
|
||||
$endPos = strrpos($SHDATAJSON, '}');
|
||||
// Extract the substring within the curly braces
|
||||
$SHDATAJSON = substr($SHDATAJSON, $startPos, $endPos - $startPos + 1);
|
||||
// dd($SHDATAJSON);
|
||||
|
||||
$JSONTR = $SHDATAJSON != '' ? json_decode($SHDATAJSON) : '';
|
||||
// dd($JSONTR);
|
||||
|
||||
if ($JSONTR != '') {
|
||||
$PART = isset($JSONTR->PART) ? $JSONTR->PART : '';
|
||||
@@ -140,7 +136,6 @@ class TransferAPI extends Controller
|
||||
$TYPE = isset($JSONTR->TYPE) ? $JSONTR->TYPE : '';
|
||||
$COLINESUFFIX = isset($JSONTR->COLINESUFFIX) ? $JSONTR->COLINESUFFIX : '';
|
||||
}
|
||||
// dd($JSONTR);
|
||||
|
||||
// Set SHERROR to Z in ICM699M
|
||||
$ICM699MU = DB::connection(config('m3.connection', 'pgsql'))->table('icm699m')
|
||||
@@ -171,7 +166,6 @@ class TransferAPI extends Controller
|
||||
$ICM688M2SLTMP->where('A5PKLN', $COLINENO);
|
||||
}
|
||||
$ICM688M2SL = $ICM688M2SLTMP->first();
|
||||
// dd($ICM688M2SL->A5BRADLN);
|
||||
|
||||
$A5BRADLINE = isset($ICM688M2SL->A5BRADLN) ? $ICM688M2SL->A5BRADLN : '';
|
||||
$COLINESUFFIX = isset($ICM688M2SL->A5PKSFX) ? $ICM688M2SL->A5PKSFX : ''; // Case 551 : $COLINESUFFIX
|
||||
@@ -213,7 +207,6 @@ class TransferAPI extends Controller
|
||||
'TYPE' => $TYPE,
|
||||
'COLINESUFFIX' => $COLINESUFFIX,
|
||||
], JSON_UNESCAPED_SLASHES);
|
||||
// dd($JSON);
|
||||
|
||||
// Write JSON Params to Logs Out
|
||||
$data = ['SHMACPKR' => $DELIVERYNO,
|
||||
@@ -273,12 +266,9 @@ class TransferAPI extends Controller
|
||||
$M3ResponseTimeTmp2 = floatval($M3ResponseTimeTmp) / 1000; // $M3ResponseTimeTmp / 1000;
|
||||
$dateTime = new DateTime;
|
||||
$dateTime->setTimestamp($M3ResponseTimeTmp2);
|
||||
// dump( $dateTime->format('d/m/Y H:i:s.v') );
|
||||
$M3ResponseTime = $M3ResponseTimeTmp != '' ? '-M3ResponseTime:' . $dateTime->format('d/m/Y H:i:s.v') : '-M3ResponseTime';
|
||||
// dump($M3ResponseTime);
|
||||
$transferStats = $response->transferStats;
|
||||
$M3transferTime = $transferStats->getTransferTime() != null ? '-M3transferTime:' . $transferStats->getTransferTime() : '-M3transferTime';
|
||||
// dd($M3transferTime);
|
||||
|
||||
if ($responseStatusCode == '200') {
|
||||
$responseContents = json_decode($response->getBody()->getContents());
|
||||
@@ -389,7 +379,6 @@ class TransferAPI extends Controller
|
||||
]);
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
// Log::error($th);
|
||||
$getCurlErrors = str_contains($th->getMessage(), 'cURL error');
|
||||
if ($getCurlErrors) {
|
||||
// Write to Logs Out : Failed
|
||||
@@ -447,7 +436,6 @@ class TransferAPI extends Controller
|
||||
ini_set('max_execution_time', Config::get('arrays.PHPTimeOut'));
|
||||
ini_set('max_input_time', Config::get('arrays.PHPTimeOut'));
|
||||
ini_set('default_socket_timeout', Config::get('arrays.PHPTimeOut'));
|
||||
// dd($request->all());
|
||||
|
||||
// Get the Calling User
|
||||
$SHUSER = m3_user() !== '' ? Str::upper(m3_user()) : 'WebUser';
|
||||
@@ -460,7 +448,6 @@ class TransferAPI extends Controller
|
||||
$DIVI = isset($urlParams['COMPANY']) ? $urlParams['COMPANY'] : '';
|
||||
$WHS = isset($urlParams['WHS']) ? $urlParams['WHS'] : '';
|
||||
$PLANT = isset($urlParams['PLANT']) ? $urlParams['PLANT'] : '';
|
||||
// dump($urlParams);
|
||||
|
||||
try {
|
||||
if ($urlParams != '') {
|
||||
@@ -468,7 +455,6 @@ class TransferAPI extends Controller
|
||||
$DELIVERYNO = isset($urlParams['DELIVERYNO']) ? $urlParams['DELIVERYNO'] : '';
|
||||
$TYPE = 'UpdateShipmentNumber';
|
||||
$allMacpkrs = [];
|
||||
// dd($A4SPR15A01);
|
||||
|
||||
if ($A4SPR15A01 != '') {
|
||||
// Read from ICM688M1
|
||||
@@ -503,7 +489,6 @@ class TransferAPI extends Controller
|
||||
'ENDFLAG' => '',
|
||||
|
||||
], JSON_UNESCAPED_SLASHES);
|
||||
// dd($JSON);
|
||||
|
||||
// Write JSON Params to Logs Out
|
||||
$data = ['SHMACPKR' => $DELIVERYNO,
|
||||
@@ -656,7 +641,6 @@ class TransferAPI extends Controller
|
||||
]);
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
// Log::error($th);
|
||||
$getCurlErrors = str_contains($th->getMessage(), 'cURL error');
|
||||
if ($getCurlErrors) {
|
||||
// Write to Logs Out : Failed
|
||||
|
||||
Reference in New Issue
Block a user