Merge pull request #16949 from artis-auxilium/fix_13024
Fix #13024 wrong line is used for reception
This commit is contained in:
commit
768b5a34fd
@ -317,11 +317,16 @@ if (empty($reshook)) {
|
|||||||
//var_dump($_POST);exit;
|
//var_dump($_POST);exit;
|
||||||
for ($i = 1; $i <= $num; $i++) {
|
for ($i = 1; $i <= $num; $i++) {
|
||||||
$lineToTest = '';
|
$lineToTest = '';
|
||||||
|
$lineId = GETPOST($idl, 'int');
|
||||||
foreach ($objectsrc->lines as $linesrc) {
|
foreach ($objectsrc->lines as $linesrc) {
|
||||||
if ($linesrc->id == GETPOST($idl, 'int')) {
|
if ($linesrc->id == $lineId) {
|
||||||
$lineToTest = $linesrc;
|
$lineToTest = $linesrc;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (empty($lineToTest)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$qty = "qtyl".$i;
|
$qty = "qtyl".$i;
|
||||||
$comment = "comment".$i;
|
$comment = "comment".$i;
|
||||||
$eatby = "dlc".$i;
|
$eatby = "dlc".$i;
|
||||||
@ -340,7 +345,7 @@ if (empty($reshook)) {
|
|||||||
if ($entrepot_id < 0) {
|
if ($entrepot_id < 0) {
|
||||||
$entrepot_id = '';
|
$entrepot_id = '';
|
||||||
}
|
}
|
||||||
if (!($linesrc->fk_product > 0) && empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
if (!($lineToTest->fk_product > 0) && empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
||||||
$entrepot_id = 0;
|
$entrepot_id = 0;
|
||||||
}
|
}
|
||||||
$eatby = GETPOST($eatby, 'alpha');
|
$eatby = GETPOST($eatby, 'alpha');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user