FIX: supplier discounts: wrong source invoice ref in DOCs
This commit is contained in:
parent
f1faf155fc
commit
c4950d4f0c
@ -73,15 +73,15 @@ function doc_getlinedesc($line,$outputlangs,$hideref=0,$hidedesc=0,$issupplierli
|
|||||||
{
|
{
|
||||||
$discount=new DiscountAbsolute($db);
|
$discount=new DiscountAbsolute($db);
|
||||||
$discount->fetch($line->fk_remise_except);
|
$discount->fetch($line->fk_remise_except);
|
||||||
$sourceref=!empty($discount_type)?$discount->ref_invoive_supplier_source:$discount->ref_facture_source;
|
$sourceref=!empty($discount->discount_type)?$discount->ref_invoive_supplier_source:$discount->ref_facture_source;
|
||||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromCreditNote",$sourceref);
|
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromCreditNote",$sourceref);
|
||||||
}
|
}
|
||||||
elseif ($desc == '(DEPOSIT)' && $line->fk_remise_except)
|
elseif ($desc == '(DEPOSIT)' && $line->fk_remise_except)
|
||||||
{
|
{
|
||||||
$discount=new DiscountAbsolute($db);
|
$discount=new DiscountAbsolute($db);
|
||||||
$discount->fetch($line->fk_remise_except);
|
$discount->fetch($line->fk_remise_except);
|
||||||
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromDeposit",$discount->ref_facture_source);
|
$sourceref=!empty($discount->discount_type)?$discount->ref_invoive_supplier_source:$discount->ref_facture_source;
|
||||||
$sourceref=!empty($discount_type)?$discount->ref_invoive_supplier_source:$discount->ref_facture_source;
|
$libelleproduitservice=$outputlangs->transnoentitiesnoconv("DiscountFromDeposit",$sourceref);
|
||||||
// Add date of deposit
|
// Add date of deposit
|
||||||
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) $libelleproduitservice.=' ('.dol_print_date($discount->datec,'day','',$outputlangs).')';
|
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) $libelleproduitservice.=' ('.dol_print_date($discount->datec,'day','',$outputlangs).')';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user