diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index fb43b68de95..c326d033de8 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2818,7 +2818,7 @@ class CommandeFournisseur extends CommonOrder /** - * Calc status regarding dispatch stock + * Calc status regarding to dispatched stock * * @param User $user User action * @param int $closeopenorder Close if received diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index c87b3a62bed..b7e3830ad5c 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -467,16 +467,14 @@ if ($id > 0 || ! empty($ref)) { if ($remaintodispatch || empty($conf->global->SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED)) { $nbproduct++; - $var = ! $var; - // To show detail cref and description value, we must make calculation by cref // print ($objp->cref?' ('.$objp->cref.')':''); // if ($objp->description) print '
'.nl2br($objp->description); $suffix = '_0_' . $i; print "\n"; - print '' . "\n"; - print ""; + print '' . "\n"; + print ''; $linktoprod = '' . img_object($langs->trans("ShowProduct"), 'product') . ' ' . $objp->ref . ''; $linktoprod .= ' - ' . $objp->label . "\n"; @@ -500,7 +498,7 @@ if ($id > 0 || ! empty($ref)) { print ""; } - $var = ! $var; + // Define unit price for PMP calculation $up_ht_disc = $objp->subprice; if (! empty($objp->remise_percent) && empty($conf->global->STOCK_EXCLUDE_DISCOUNT_FOR_PMP)) $up_ht_disc = price2num($up_ht_disc * (100 - $objp->remise_percent) / 100, 'MU'); @@ -517,11 +515,21 @@ if ($id > 0 || ! empty($ref)) { print ''; // Warehouse column print ''; - print ''; + print ''; print ''; print ''; print ''; - print ''; + + print ''; + if (! empty($conf->global->SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT)) // Not tested ! + { + print $langs->trans("BuyingPrice").': '; + } + else + { + print ''; + } + // hidden fields for js function print ''; print ''; @@ -544,11 +552,22 @@ if ($id > 0 || ! empty($ref)) { print '' . img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'onClick="addDispatchLine(' . $i . ',\'' . $type . '\')"') . ''; // Dispatch column print ''; print ''; - print ''; + + print ''; print ''; print ''; print ''; - print ''; + + print ''; + if (! empty($conf->global->SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT)) // Not tested ! + { + print $langs->trans("BuyingPrice").': '; + } + else + { + print ''; + } + // hidden fields for js function print ''; print '';