Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/fourn/facture/card.php
This commit is contained in:
Laurent Destailleur 2018-04-13 23:52:08 +02:00
commit b4ef3945d2
2 changed files with 9 additions and 1 deletions

View File

@ -1557,6 +1557,12 @@ class FactureFournisseur extends CommonInvoice
// Check parameters
if ($type < 0) return -1;
if ($rang < 0)
{
$rangmax = $this->line_max();
$rang = $rangmax + 1;
}
// Insert line
$this->line=new SupplierInvoiceLine($this->db);

View File

@ -1200,6 +1200,8 @@ if (empty($reshook))
$type = $productsupplier->type;
$price_base_type = 'HT';
$rang = $object->line_max() +1;
$result=$object->addline(
$desc,
$productsupplier->fourn_pu,
@ -1215,7 +1217,7 @@ if (empty($reshook))
$tva_npr,
$price_base_type,
$type,
-1,
$rang,
0,
$array_options,
$productsupplier->fk_unit,