M3 Integration fixes

This commit is contained in:
Mark Gregory
2026-09-21 11:33:28 +01:00
parent d8d970baad
commit 9368dd2f10
10 changed files with 46 additions and 38 deletions
@@ -442,26 +442,26 @@ class M3Controller extends Controller
$conn->setOptions(['persistent' => false, 'stateless' => true, 'debug' => true, 'debugLogFile' => env('TOOLKIT_DEBUG_LOG')]);
// Add LIB
// $result = $conn->CLCommand('ADDLIBLE LIB(MPDAT10)');
// $result = $conn->clCommand('ADDLIBLE LIB(MPDAT10)');
// define several input/output params
$params = [];
// AddParameterChar($io, $size, $comment, $varName, $value, $varying, $dimension)
// Add Warehouse Param
$params[] = $conn->AddParameterChar('in', 3, 'Company', '', $company);
$params[] = $conn->addParameterChar('in', 3, 'Company', '', $company);
$params[] = $conn->AddParameterChar('in', 3, 'Warehouse', '', $warehouse);
$params[] = $conn->addParameterChar('in', 3, 'Warehouse', '', $warehouse);
// AddParameterPackDec($io, $length, $scale, $comment, $varName, $value,$dimension)
// Add Delivery Note Param
$pickerNumberNoZero = ltrim(strval($pickerNumber), '0');
$params[] = $conn->AddParameterChar('in', 11, 'PickerNumber', '', $pickerNumberNoZero);
$params[] = $conn->addParameterChar('in', 11, 'PickerNumber', '', $pickerNumberNoZero);
// Start Time Tracking
// ICM700C EWOBJTST ICM700C ICM700CSBM
$result = $conn->PgmCall('ICM700CSBM', env('OBJLIB'), $params, [], []);
$result = $conn->pgmCall('ICM700CSBM', env('OBJLIB'), $params, [], []);
if (! $result) {
$pGMERRORS = 'Error calling program. Code: ' . $conn->getErrorCode() . ' - Msg: ' . $conn->getErrorMsg();