diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 32379a18d60..07cb01773e5 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -990,6 +990,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, @@ -1006,7 +1008,7 @@ if (empty($reshook)) $tva_npr, $price_base_type, $type, - -1, + $rang, 0, $array_options, $productsupplier->fk_unit