From 6cfdfe8408b2620bc59ef99427024921c45667c7 Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Fri, 19 Apr 2019 10:55:33 +0200 Subject: [PATCH] NEW : Can update product supplier price ref --- htdocs/product/fournisseurs.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 2fcb54d43f0..cc922cb724b 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -149,6 +149,8 @@ if (empty($reshook)) if (empty($id_fourn)) $id_fourn=GETPOST("search_id_fourn"); $ref_fourn=GETPOST("ref_fourn"); if (empty($ref_fourn)) $ref_fourn=GETPOST("search_ref_fourn"); + $ref_fourn_old=GETPOST("ref_fourn_old"); + if (empty($ref_fourn_old)) $ref_fourn_old = $ref_fourn; $quantity=GETPOST("qty"); $remise_percent=price2num(GETPOST('remise_percent', 'alpha')); $npr = preg_match('/\*/', $_POST['tva_tx']) ? 1 : 0 ; @@ -228,7 +230,7 @@ if (empty($reshook)) if (! $error) { - $ret=$object->add_fournisseur($user, $id_fourn, $ref_fourn, $quantity); // This insert record with no value for price. Values are update later with update_buyprice + $ret=$object->add_fournisseur($user, $id_fourn, $ref_fourn_old, $quantity); // This insert record with no value for price. Values are update later with update_buyprice if ($ret == -3) { $error++; @@ -427,7 +429,6 @@ if ($id > 0 || $ref) $supplier->fetch($socid); print $supplier->getNomUrl(1); print ''; - print ''; print ''; print ''; print ''; @@ -454,7 +455,8 @@ if ($id > 0 || $ref) print ''.$langs->trans("SupplierRef").''; if ($rowid) { - print $object->fourn_ref; + print ''; + print ''; } else {