FIX detail of deposit and credit not was not visible into final invoice

This commit is contained in:
Laurent Destailleur 2017-01-28 12:42:02 +01:00
parent 025036595d
commit 4bce208035

View File

@ -69,19 +69,20 @@ if (empty($usemargins)) $usemargins=0;
<?php
if ($line->description)
{
if ($line->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0)
if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0)
{
$discount=new DiscountAbsolute($this->db);
$discount->fetch($line->fk_remise_except);
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0));
}
elseif ($line->description == '(DEPOSIT)' && $objp->fk_remise_except > 0)
elseif ($line->description == '(DEPOSIT)' && $line->fk_remise_except > 0)
{
$discount=new DiscountAbsolute($this->db);
$discount->fetch($line->fk_remise_except);
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0));
// Add date of deposit
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec).')';
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE))
echo ' ('.dol_print_date($discount->datec).')';
}
else
{