FIX: order to shipment: FIX hidden conf SHIPMENT_GETS_ALL_ORDER_PRODUCTS (still not working when not preselecting a warehouse)
This commit is contained in:
parent
cde290c78a
commit
b110ca6ead
@ -1245,13 +1245,17 @@ if ($action == 'create')
|
|||||||
{
|
{
|
||||||
// Quantity to send
|
// Quantity to send
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
|
||||||
{
|
if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
||||||
if (GETPOST('qtyl'.$indiceAsked, 'int')) $deliverableQty = GETPOST('qtyl'.$indiceAsked, 'int');
|
if (GETPOST('qtyl'.$indiceAsked, 'int')) $deliverableQty = GETPOST('qtyl'.$indiceAsked, 'int');
|
||||||
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
|
|
||||||
print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$deliverableQty.'">';
|
print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$deliverableQty.'">';
|
||||||
|
} else {
|
||||||
|
if (! empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) {
|
||||||
|
print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">';
|
||||||
|
}
|
||||||
|
|
||||||
|
print $langs->trans("NA");
|
||||||
}
|
}
|
||||||
else print $langs->trans("NA");
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Stock
|
// Stock
|
||||||
@ -1420,8 +1424,13 @@ if ($action == 'create')
|
|||||||
{
|
{
|
||||||
print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$deliverableQty.'">';
|
print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$deliverableQty.'">';
|
||||||
print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_id.'">';
|
print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_id.'">';
|
||||||
|
} else {
|
||||||
|
if (! empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) {
|
||||||
|
print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">';
|
||||||
|
}
|
||||||
|
|
||||||
|
print $langs->trans("NA");
|
||||||
}
|
}
|
||||||
else print $langs->trans("NA");
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Stock
|
// Stock
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user