M3 Security Fixes for Pass 39
This commit is contained in:
@@ -17,9 +17,7 @@ use Str;
|
||||
class CloseShipment extends Controller
|
||||
{
|
||||
private const ZERO_PAD = '000000';
|
||||
|
||||
private const JSON_CONTENT_TYPE = 'application/json';
|
||||
|
||||
private const NULL_M3_RESPONSE = 'M3 API responded with null value';
|
||||
|
||||
// CloseShipmentCoChargeAPI : with URL PARAMS COCharge
|
||||
@@ -56,6 +54,7 @@ class CloseShipment extends Controller
|
||||
$pdfFilePath = Config::get('arrays.PdfPath');
|
||||
$dELIVERYNO = $mANIFEST != '' ? $mANIFEST : self::ZERO_PAD;
|
||||
|
||||
|
||||
if ($urlParams != '') {
|
||||
// Write to Logs : JSON
|
||||
$jSONIN = json_encode([
|
||||
@@ -217,6 +216,7 @@ class CloseShipment extends Controller
|
||||
}
|
||||
$iCM695M1TMP = $iCM695M1TMPF;
|
||||
|
||||
|
||||
$freightTermsTMP = DB::connection(config('m3.connection', 'pgsql'))->table('icm321m')
|
||||
->selectRaw('TRIM(ARCODE) as FREIGHTTERMS,ARCHARGE as BILLABLE')
|
||||
->get();
|
||||
@@ -261,9 +261,7 @@ class CloseShipment extends Controller
|
||||
|
||||
// PFC : Check that Picked / Packed are all Equal
|
||||
foreach ($iCM688M2SL as $key => $ICM688M2SLR) {
|
||||
$a5PACKED = isset($ICM688M2SLR->A5PACKED) ? $ICM688M2SLR->A5PACKED : 0;
|
||||
$a5PICKED = isset($ICM688M2SLR->A5PICKED) ? $ICM688M2SLR->A5PICKED : 0;
|
||||
$a5PKLN = isset($ICM688M2SLR->A5PKLN) ? $ICM688M2SLR->A5PKLN : 0;
|
||||
$a5RSVQTY = isset($ICM688M2SLR->A5RSVQTY) ? $ICM688M2SLR->A5RSVQTY : 0;
|
||||
$a5ShortShipQty = (int) $a5RSVQTY - (int) $a5PICKED;
|
||||
|
||||
@@ -607,10 +605,10 @@ class CloseShipment extends Controller
|
||||
Helper::logToICM699M($data);
|
||||
|
||||
$response = Http::withHeaders([
|
||||
'accept' => self::JSON_CONTENT_TYPE,
|
||||
'Content-Type' => self::JSON_CONTENT_TYPE,
|
||||
'Connection' => 'close',
|
||||
])
|
||||
'accept' => self::JSON_CONTENT_TYPE,
|
||||
'Content-Type' => self::JSON_CONTENT_TYPE,
|
||||
'Connection' => 'close',
|
||||
])
|
||||
->withToken($token)
|
||||
->withBody($jSONCS, self::JSON_CONTENT_TYPE)
|
||||
->timeout(Config::get('arrays.curlTimeOut'))
|
||||
@@ -828,10 +826,10 @@ class CloseShipment extends Controller
|
||||
Helper::logToICM699M($data);
|
||||
|
||||
$response = Http::withHeaders([
|
||||
'accept' => self::JSON_CONTENT_TYPE,
|
||||
'Content-Type' => self::JSON_CONTENT_TYPE,
|
||||
'Connection' => 'close',
|
||||
])
|
||||
'accept' => self::JSON_CONTENT_TYPE,
|
||||
'Content-Type' => self::JSON_CONTENT_TYPE,
|
||||
'Connection' => 'close',
|
||||
])
|
||||
->withToken($token)
|
||||
->withBody($jSONCS, self::JSON_CONTENT_TYPE)
|
||||
->timeout(Config::get('arrays.curlTimeOut'))
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Modules\M3\Http\Controllers\API;
|
||||
use Config;
|
||||
use DB;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
use Modules\M3\Helpers\Helper;
|
||||
use Modules\M3\Http\Controllers\Controller;
|
||||
use Modules\M3\Services\PostgresProgramBridge;
|
||||
@@ -13,7 +14,6 @@ use Str;
|
||||
class M3Controller extends Controller
|
||||
{
|
||||
private const FIELD_PREFIX = 'Field: ';
|
||||
|
||||
private const M3_LIST_SUFFIX = ' M3-Lis-JSN';
|
||||
|
||||
// Split Data and Write to ICM666M2
|
||||
@@ -258,14 +258,12 @@ class M3Controller extends Controller
|
||||
$partNumber = isset($product['PartNumber']) ? $product['PartNumber'] : '';
|
||||
$orderLine = isset($product['OrderLine']) ? $product['OrderLine'] : '';
|
||||
$partWeight = isset($product['PartWeight']) ? $product['PartWeight'] : '';
|
||||
$pickerLine = isset($product['PickerLine']) ? $product['PickerLine'] : '';
|
||||
$primaryLocation = isset($product['PrimaryLocation']) ? $product['PrimaryLocation'] : '';
|
||||
$allocation = isset($product['Allocation']) ? $product['Allocation'] : '';
|
||||
$allocatedTo = isset($product['AllocatedTo']) ? $product['AllocatedTo'] : '';
|
||||
$locationSeq = isset($product['LocationSeq']) ? $product['LocationSeq'] : '';
|
||||
$zone = isset($product['Zone']) ? $product['Zone'] : '';
|
||||
$baseUnitPrice = isset($product['BaseUnitPrice']) ? $product['BaseUnitPrice'] : '';
|
||||
$frgnUnitPrice = isset($product['FrgnUnitPrice']) ? $product['FrgnUnitPrice'] : '';
|
||||
$sellUOM = isset($product['SellUOM']) ? $product['SellUOM'] : '';
|
||||
$partConv = isset($product['PartConv']) ? $product['PartConv'] : '';
|
||||
$uOM = isset($product['UOM']) ? $product['UOM'] : '';
|
||||
@@ -461,7 +459,6 @@ class M3Controller extends Controller
|
||||
$params[] = $conn->AddParameterChar('in', 11, 'PickerNumber', '', $pickerNumberNoZero);
|
||||
|
||||
// Start Time Tracking
|
||||
$start = microtime(true);
|
||||
|
||||
// ICM700C EWOBJTST ICM700C ICM700CSBM
|
||||
$result = $conn->PgmCall('ICM700CSBM', env('OBJLIB'), $params, [], []);
|
||||
|
||||
@@ -15,7 +15,6 @@ use Str;
|
||||
class ReplenAPI extends Controller
|
||||
{
|
||||
private const ZERO_PAD = '000000';
|
||||
|
||||
private const JSON_CONTENT_TYPE = 'application/json';
|
||||
|
||||
// M3Replenishement with URL Params
|
||||
@@ -85,9 +84,9 @@ class ReplenAPI extends Controller
|
||||
$token = $ionToken;
|
||||
|
||||
$response = Http::withHeaders([
|
||||
'accept' => self::JSON_CONTENT_TYPE,
|
||||
'Content-Type' => self::JSON_CONTENT_TYPE,
|
||||
])
|
||||
'accept' => self::JSON_CONTENT_TYPE,
|
||||
'Content-Type' => self::JSON_CONTENT_TYPE,
|
||||
])
|
||||
->withToken($token)
|
||||
->withBody($jSON, self::JSON_CONTENT_TYPE)
|
||||
->timeout(Config::get('arrays.curlTimeOut'))
|
||||
@@ -138,7 +137,7 @@ class ReplenAPI extends Controller
|
||||
if ($key2 != 'Locations') {
|
||||
$dataToWrite[$key2] = $content;
|
||||
} else {
|
||||
foreach ($content as $key3 => $content2) {
|
||||
foreach ($content as $content2) {
|
||||
$dataToWrite2[] = array_merge($dataToWrite, $content2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,11 +16,8 @@ use Str;
|
||||
class TransferAPI extends Controller
|
||||
{
|
||||
private const ZERO_PAD = '000000';
|
||||
|
||||
private const JSON_CONTENT_TYPE = 'application/json';
|
||||
|
||||
private const ORDER_CATEGORY_LABEL = ' Order Category: ';
|
||||
|
||||
private const NO_URL_PARAMETERS = 'No URL Parameters Sent';
|
||||
|
||||
// TransferAPIURL : with URL PARAMS
|
||||
@@ -474,7 +471,7 @@ class TransferAPI extends Controller
|
||||
}
|
||||
$iCM688M1SL = $iCM688M1SLTMP->get();
|
||||
// Loop ICM688M1 to get all A4MACPKR
|
||||
foreach ($iCM688M1SL as $key => $ICM688M1) {
|
||||
foreach ($iCM688M1SL as $ICM688M1) {
|
||||
$allMacpkrs[] = $ICM688M1->A4MACPKR;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user