diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 1cf3f27cd8b..c47069284c7 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -796,6 +796,7 @@ if ($_GET['action'] == 'create') $remise_percent = $soc->remise_client; $remise_absolue = 0; } + $absolute_discount=$soc->getCurrentDiscount(); print '
'; @@ -822,7 +823,6 @@ if ($_GET['action'] == 'create') print ''.$langs->trans('Discounts').''; if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); - $absolute_discount=$soc->getCurrentDiscount(); print '. '; if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->monnaie)); else print $langs->trans("CompanyHasNoAbsoluteDiscount"); @@ -1355,7 +1355,7 @@ else { $soc = new Societe($db, $fac->socidp); $soc->fetch($fac->socidp); - $avoir_en_cours=$soc->getCurrentDiscount(); + $absolute_discount=$soc->getCurrentDiscount(); $author = new User($db); if ($fac->user_author) @@ -1454,7 +1454,6 @@ else print ''.$langs->trans('Discounts').''; if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); - $absolute_discount=$soc->getCurrentDiscount(); print '. '; if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->monnaie)); else print $langs->trans("CompanyHasNoAbsoluteDiscount"); @@ -1912,7 +1911,7 @@ else print ''; print ''; print $langs->trans('CustomerAbsoluteDiscount'); - if ($fac->brouillon) print ' ('.($avoir_en_cours?$langs->trans("CompanyHasAbsoluteDiscount",$avoir_en_cours,$langs->trans("Currency".$conf->monnaie)):$langs->trans("CompanyHasNoAbsoluteDiscount")).')'; + if ($fac->brouillon) print ' ('.($absolute_discount?$langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->monnaie)):$langs->trans("CompanyHasNoAbsoluteDiscount")).')'; print ''; print ' '; print ' ';