M3 Security Fixes for Pass 40
This commit is contained in:
@@ -15,6 +15,7 @@ use Str;
|
||||
class ReplenAPI extends Controller
|
||||
{
|
||||
private const ZERO_PAD = '000000';
|
||||
|
||||
private const JSON_CONTENT_TYPE = 'application/json';
|
||||
|
||||
// M3Replenishement with URL Params
|
||||
@@ -53,7 +54,7 @@ class ReplenAPI extends Controller
|
||||
Helper::logToICM699M($data);
|
||||
|
||||
$pART = explode(',', $pARTNO);
|
||||
foreach ($pART as $key => $value) {
|
||||
foreach ($pART as $value) {
|
||||
$pARTS[] = ['PART' => $value, 'LOT' => ''];
|
||||
}
|
||||
|
||||
@@ -84,9 +85,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'))
|
||||
@@ -130,7 +131,7 @@ class ReplenAPI extends Controller
|
||||
}
|
||||
|
||||
$dataToWrite2 = [];
|
||||
foreach ($responseTMP as $key => $value) {
|
||||
foreach ($responseTMP as $value) {
|
||||
$dataToWrite = [];
|
||||
|
||||
foreach ($value as $key2 => $content) {
|
||||
@@ -145,15 +146,15 @@ class ReplenAPI extends Controller
|
||||
}
|
||||
|
||||
// Delete Old Records from IC630M
|
||||
foreach ($dataToWrite2 as $key => $value) {
|
||||
$iCM630MDeleteSQL = DB::connection(config('m3.connection', 'pgsql'))->table('ic630m')
|
||||
foreach ($dataToWrite2 as $value) {
|
||||
DB::connection(config('m3.connection', 'pgsql'))->table('ic630m')
|
||||
->where('LLCO', $cO)
|
||||
->where('LLWHNO', $wHS)
|
||||
->where('LLPPN', trim($value['PartNumber']))
|
||||
->delete();
|
||||
}
|
||||
|
||||
foreach ($dataToWrite2 as $key => $value) {
|
||||
foreach ($dataToWrite2 as $value) {
|
||||
// Check if Location exist in DE640M $value['Location']
|
||||
$dE640MSQLSEL = DB::connection(config('m3.connection', 'pgsql'))->table('de640m')
|
||||
->where('LVCO', $cO)
|
||||
|
||||
Reference in New Issue
Block a user