Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
745aa4bd73
@ -1519,11 +1519,26 @@ if (empty($reshook))
|
|||||||
$object->origin = $origin;
|
$object->origin = $origin;
|
||||||
$object->origin_id = $originid;
|
$object->origin_id = $originid;
|
||||||
|
|
||||||
foreach ($object->lines as &$line)
|
foreach ($object->lines as $i => &$line)
|
||||||
{
|
{
|
||||||
$line->origin = $object->origin;
|
$line->origin = $object->origin;
|
||||||
$line->origin_id = $line->id;
|
$line->origin_id = $line->id;
|
||||||
$line->fetch_optionals($line->id);
|
$line->fetch_optionals($line->id);
|
||||||
|
|
||||||
|
// Si fk_remise_except defini on vérifie si la réduction à déjà été appliquée
|
||||||
|
if ($line->fk_remise_except)
|
||||||
|
{
|
||||||
|
$discount=new DiscountAbsolute($line->db);
|
||||||
|
$result=$discount->fetch($line->fk_remise_except);
|
||||||
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
// Check if discount not already affected to another invoice
|
||||||
|
if ($discount->fk_facture_line > 0)
|
||||||
|
{
|
||||||
|
$line->fk_remise_except = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user