From 3b33dad8fdb41cdb09f77aade27c98f437cae4ee Mon Sep 17 00:00:00 2001 From: dolibarr95 <24292300+dolibarr95@users.noreply.github.com> Date: Wed, 20 Jun 2018 14:40:32 +0200 Subject: [PATCH] Add supplier ref Hi In all common case the supplier send a receipt with the parcel on which is writen his product ref (because this is his reference) with the quantity in the parcel and if he is smart/nice our reference. By adding the supplier ref column the supplier order dispatch is easier. Tks. --- htdocs/fourn/commande/dispatch.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 5b4adc39638..2c4fbe9e799 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -492,7 +492,7 @@ if ($id > 0 || ! empty($ref)) { $db->free($resql); } - $sql = "SELECT l.rowid, l.fk_product, l.subprice, l.remise_percent, SUM(l.qty) as qty,"; + $sql = "SELECT l.rowid, l.fk_product, l.subprice, l.remise_percent, SUM(l.qty) as qty, l.ref AS sref,"; $sql .= " p.ref, p.label, p.tobatch, p.fk_default_warehouse"; $sql .= " FROM " . MAIN_DB_PREFIX . "commande_fournisseurdet as l"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON l.fk_product=p.rowid"; @@ -514,6 +514,7 @@ if ($id > 0 || ! empty($ref)) { print ''; print ''; print ''; + print '' . $langs->trans("SupplierRef") . ''; print '' . $langs->trans("QtyOrdered") . ''; print '' . $langs->trans("QtyDispatchedShort") . ''; print '' . $langs->trans("QtyToDispatchShort") . ''; @@ -590,6 +591,9 @@ if ($id > 0 || ! empty($ref)) { 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'); + // Supplier ref + print ''.$objp->sref.''; + // Qty ordered print '' . $objp->qty . '';