From b110ca6eadf146881ff57e5609c0f6f7c723efc4 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Wed, 12 Jan 2022 16:40:43 +0100 Subject: [PATCH] FIX: order to shipment: FIX hidden conf SHIPMENT_GETS_ALL_ORDER_PRODUCTS (still not working when not preselecting a warehouse) --- htdocs/expedition/card.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 3e76b2bb12a..0b32229ae65 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1245,13 +1245,17 @@ if ($action == 'create') { // Quantity to send print ''; - if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - if (GETPOST('qtyl'.$indiceAsked, 'int')) $deliverableQty = GETPOST('qtyl'.$indiceAsked, 'int'); - print ''; + print ''; + if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + if (GETPOST('qtyl'.$indiceAsked, 'int')) $deliverableQty = GETPOST('qtyl'.$indiceAsked, 'int'); print ''; + } else { + if (! empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) { + print ''; + } + + print $langs->trans("NA"); } - else print $langs->trans("NA"); print ''; // Stock @@ -1420,8 +1424,13 @@ if ($action == 'create') { print ''; print ''; + } else { + if (! empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) { + print ''; + } + + print $langs->trans("NA"); } - else print $langs->trans("NA"); print ''; // Stock