From 4fae1e3236acf2262f29a057df11d9f797eae33f Mon Sep 17 00:00:00 2001 From: atm-greg Date: Fri, 13 Apr 2018 17:01:10 +0200 Subject: [PATCH] rank of invoice_supplier lines was always -1 --- htdocs/fourn/facture/card.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index f24ed99a9f8..c9f587d84d6 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -983,6 +983,8 @@ if (empty($reshook)) $type = $productsupplier->type; $price_base_type = 'HT'; + $rang = $object->line_max() +1; + // TODO Save the product supplier ref into database (like done for supplier propal and order) into field ref_supplier (must rename field ref into ref_supplier first) $result=$object->addline( $desc, @@ -999,7 +1001,7 @@ if (empty($reshook)) $tva_npr, $price_base_type, $type, - -1, + $rang, 0, $array_options, $productsupplier->fk_unit