M3 Integration fixes
This commit is contained in:
@@ -224,7 +224,7 @@ class CloseShipment extends Controller
|
||||
// Close Shipment for Manifest or Single MacPKR
|
||||
if (count($iCM695M1TMP) > 0 && ($tRANSTYPE == 'M' || $tRANSTYPE == 'P')) {
|
||||
// Loop the Results from $ICM595M1TMP
|
||||
foreach ($iCM695M1TMP as $key => $ICM695M1R) {
|
||||
foreach ($iCM695M1TMP as $ICM695M1R) {
|
||||
$pACKAGES = [];
|
||||
$aYWHS = trim($ICM695M1R->AYWHS);
|
||||
$aYCO = trim($ICM695M1R->AYCO);
|
||||
|
||||
@@ -283,7 +283,7 @@ class OrderLinesOfClosedOrder extends Controller
|
||||
if (Storage::disk('publicCL')->exists($fileName)) {
|
||||
// File exists, retrieve content or URL
|
||||
// $content = Storage::disk('publicCL')->get($fileName);
|
||||
$fileNameOnly = strpos($fileName, '/') != false ? substr($fileName, strpos($fileName, '/') + 1) : $fileName;
|
||||
$fileNameOnly = strpos($fileName, '/') !== false ? substr($fileName, strpos($fileName, '/') + 1) : $fileName;
|
||||
|
||||
// Download the file
|
||||
return Storage::disk('publicCL')->download($fileName, $fileNameOnly);
|
||||
|
||||
@@ -11,15 +11,10 @@ use Modules\M3\Services\PostgresProgramBridge;
|
||||
|
||||
class UserControlController extends Controller
|
||||
{
|
||||
private const AUTH_FAILURE_MESSAGE = 'Could not connect due to wrong user or password.';
|
||||
|
||||
private const DATABASE_NOT_FOUND_MESSAGE = 'Database not found. Try WRKRDBDIRE to check.';
|
||||
|
||||
private const CONNECTION_ERROR_PREFIX = 'Could not connect. Error: ';
|
||||
|
||||
private const PROGRAM_ERROR_PREFIX = 'Error calling program. Code: ';
|
||||
|
||||
private const MESSAGE_SEPARATOR = ' Msg: ';
|
||||
|
||||
public static function index(Request $request)
|
||||
{
|
||||
@@ -176,19 +171,7 @@ class UserControlController extends Controller
|
||||
} catch (\Throwable $e) {
|
||||
// Determine reason for failure.
|
||||
// Probably database authentication error or invalid or unreachable database.
|
||||
$code = $e->getCode();
|
||||
$msg = $e->getMessage();
|
||||
|
||||
switch ($code) {
|
||||
case 8001:
|
||||
// "Authorization failure on distributed database connection attempt"
|
||||
// Usually means a wrong DB2 user or password
|
||||
break;
|
||||
case 42705:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return self::programBridgeConnectionError($e);
|
||||
}
|
||||
|
||||
// Add LIB
|
||||
@@ -250,19 +233,7 @@ class UserControlController extends Controller
|
||||
try {
|
||||
$conn = app(PostgresProgramBridge::class);
|
||||
} catch (\Throwable $e) {
|
||||
$code = $e->getCode();
|
||||
$msg = $e->getMessage();
|
||||
|
||||
switch ($code) {
|
||||
case 8001:
|
||||
// "Authorization failure on distributed database connection attempt"
|
||||
// Usually means a wrong DB2 user or password
|
||||
break;
|
||||
case 42705:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return self::programBridgeConnectionError($e);
|
||||
}
|
||||
|
||||
$result = $conn->CLCommand('QSYS/CHGUSRPRF USRPRF(' . $request->R428US_PWD . ') PASSWORD(' . $request->NEW_PASSWORD . ') STATUS(*ENABLED) PWDEXP(*NO)');
|
||||
|
||||
@@ -52,11 +52,6 @@ class ShipTo extends Model
|
||||
$existingRecord->where($this->getKeyName(), '!=', $this->getKey());
|
||||
}
|
||||
|
||||
if ($existingRecord->count() > 0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
||||
}
|
||||
return $existingRecord->count() === 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,17 +14,6 @@ class RouteServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected $moduleNamespace = 'Modules\M3\Http\Controllers';
|
||||
|
||||
/**
|
||||
* Called before routes are registered.
|
||||
*
|
||||
* Register any model bindings or pattern based filters.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<div class="col-6">
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Warehouse:</label>
|
||||
<select class="form-select" id="WHDDA" aria-label="WHDD" tabindex="4" required>
|
||||
<select class="form-select" id="WHDDA" aria-label="WHDD" tabindex="0" required>
|
||||
<option value="">Select Warehouse</option>
|
||||
@foreach ($IC670M as $key => $IC670MR)
|
||||
<option value="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}"
|
||||
@@ -215,7 +215,7 @@
|
||||
<div class="col-6">
|
||||
<div class="mb-3">
|
||||
<label for="recipient-name" class="col-form-label">Warehouse:</label>
|
||||
<select class="form-select" id="WHDD" aria-label="WHDD" tabindex="4" disabled>
|
||||
<select class="form-select" id="WHDD" aria-label="WHDD" tabindex="0" disabled>
|
||||
<option value="">Select Warehouse</option>
|
||||
@foreach ($IC670M as $key => $IC670MR)
|
||||
<option value="{{ trim($IC670MR->WDCO).trim($IC670MR->WDPL).trim($IC670MR->WDWHS) }}"
|
||||
|
||||
Reference in New Issue
Block a user