From ca18448b48f6a041ed13762ac56233a095c5c6c7 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 18 Sep 2019 10:36:13 +0200 Subject: [PATCH] NEW add units fields in buying price tab of product card --- htdocs/product/fournisseurs.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index cb56ff63cfc..d8cfcae0bb7 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -491,6 +491,13 @@ if ($id > 0 || $ref) { print ''; } + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $unit = $object->getLabelOfUnit(); + if ($unit !== '') { + print '  ' . $langs->trans($unit); + } + } print ''; // Vat rate @@ -778,11 +785,11 @@ SCRIPT; $num = count($product_fourn_list); if (($num + ($offset * $limit)) < $nbtotalofrecords) $num++; - print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVER ['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit, 1); + print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit, 1); // Suppliers list title print '
'; - print ''; + print '
'; $param="&id=".$object->id; @@ -851,6 +858,13 @@ SCRIPT; // Quantity print ''; // VAT rate
'; print $productfourn->fourn_qty; + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $unit = $object->getLabelOfUnit(); + if ($unit !== '') { + print '  ' . $langs->trans($unit); + } + } print '