Merge branch '688-disable-motiv' into 'master'
Add check to see if motiv reply is valid #688 Closes #688 See merge request jankstudio/resq!803
This commit is contained in:
commit
4e728fd59a
1 changed files with 18 additions and 10 deletions
|
|
@ -2425,13 +2425,17 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
|
|||
$mres = $motiv->getInventory($branch_codes, $skus);
|
||||
foreach ($mres as $mres_item)
|
||||
{
|
||||
$bcode = $mres_item['BranchCode'];
|
||||
$inv_count = $mres_item['Quantity'];
|
||||
if (isset($inv_data[$bcode]))
|
||||
// check if we have a valid response from motiv, ignore otherwise
|
||||
if (isset($mres_item['BranchCode']))
|
||||
{
|
||||
$hub_id = $inv_data[$bcode]['hub_id'];
|
||||
$bcode = $mres_item['BranchCode'];
|
||||
$inv_count = $mres_item['Quantity'];
|
||||
if (isset($inv_data[$bcode]))
|
||||
{
|
||||
$hub_id = $inv_data[$bcode]['hub_id'];
|
||||
|
||||
$params['hubs'][$hub_id]['inventory'] = $inv_count;
|
||||
$params['hubs'][$hub_id]['inventory'] = $inv_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2728,13 +2732,17 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
|
|||
$mres = $motiv->getInventory($branch_codes, $skus);
|
||||
foreach ($mres as $mres_item)
|
||||
{
|
||||
$bcode = $mres_item['BranchCode'];
|
||||
$inv_count = $mres_item['Quantity'];
|
||||
if (isset($inv_data[$bcode]))
|
||||
// check if we have a valid response from motiv, ignore otherwise
|
||||
if (isset($mres_item['BranchCode']))
|
||||
{
|
||||
$hub_id = $inv_data[$bcode]['hub_id'];
|
||||
$bcode = $mres_item['BranchCode'];
|
||||
$inv_count = $mres_item['Quantity'];
|
||||
if (isset($inv_data[$bcode]))
|
||||
{
|
||||
$hub_id = $inv_data[$bcode]['hub_id'];
|
||||
|
||||
$params['hubs'][$hub_id]['inventory'] = $inv_count;
|
||||
$params['hubs'][$hub_id]['inventory'] = $inv_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue