FIX class not found when creating recuring invoice from invoice+discount
This commit is contained in:
parent
71370bd558
commit
aa1551bf1f
@ -87,28 +87,29 @@ if (($line->info_bits & 2) == 2) {
|
|||||||
//else $txt=$langs->trans("Discount");
|
//else $txt=$langs->trans("Discount");
|
||||||
print $txt;
|
print $txt;
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|
||||||
if ($line->description)
|
if ($line->description)
|
||||||
{
|
{
|
||||||
if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0)
|
if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0) {
|
||||||
{
|
include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||||
$discount = new DiscountAbsolute($this->db);
|
$discount = new DiscountAbsolute($this->db);
|
||||||
$discount->fetch($line->fk_remise_except);
|
$discount->fetch($line->fk_remise_except);
|
||||||
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0));
|
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0));
|
||||||
} elseif ($line->description == '(DEPOSIT)' && $line->fk_remise_except > 0)
|
} elseif ($line->description == '(DEPOSIT)' && $line->fk_remise_except > 0) {
|
||||||
{
|
include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||||
$discount = new DiscountAbsolute($this->db);
|
$discount = new DiscountAbsolute($this->db);
|
||||||
$discount->fetch($line->fk_remise_except);
|
$discount->fetch($line->fk_remise_except);
|
||||||
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0));
|
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0));
|
||||||
// Add date of deposit
|
// Add date of deposit
|
||||||
if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE))
|
if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE))
|
||||||
print ' ('.dol_print_date($discount->datec).')';
|
print ' ('.dol_print_date($discount->datec).')';
|
||||||
} elseif ($line->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0)
|
} elseif ($line->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0) {
|
||||||
{
|
include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||||
$discount = new DiscountAbsolute($this->db);
|
$discount = new DiscountAbsolute($this->db);
|
||||||
$discount->fetch($line->fk_remise_except);
|
$discount->fetch($line->fk_remise_except);
|
||||||
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessReceived", $discount->getNomUrl(0));
|
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessReceived", $discount->getNomUrl(0));
|
||||||
} elseif ($line->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0)
|
} elseif ($line->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0) {
|
||||||
{
|
include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||||
$discount = new DiscountAbsolute($this->db);
|
$discount = new DiscountAbsolute($this->db);
|
||||||
$discount->fetch($line->fk_remise_except);
|
$discount->fetch($line->fk_remise_except);
|
||||||
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessPaid", $discount->getNomUrl(0));
|
print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessPaid", $discount->getNomUrl(0));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user