Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2022-06-14 20:57:34 +02:00
commit 1aa2e7adc7
2 changed files with 4 additions and 4 deletions

View File

@ -78,12 +78,12 @@ function doc_getlinedesc($line, $outputlangs, $hideref = 0, $hidedesc = 0, $issu
if ($desc == '(CREDIT_NOTE)' && $line->fk_remise_except) {
$discount = new DiscountAbsolute($db);
$discount->fetch($line->fk_remise_except);
$sourceref = !empty($discount->discount_type) ? $discount->ref_invoive_supplier_source : $discount->ref_facture_source;
$sourceref = !empty($discount->discount_type) ? $discount->ref_invoice_supplier_source : $discount->ref_facture_source;
$libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromCreditNote", $sourceref);
} elseif ($desc == '(DEPOSIT)' && $line->fk_remise_except) {
$discount = new DiscountAbsolute($db);
$discount->fetch($line->fk_remise_except);
$sourceref = !empty($discount->discount_type) ? $discount->ref_invoive_supplier_source : $discount->ref_facture_source;
$sourceref = !empty($discount->discount_type) ? $discount->ref_invoice_supplier_source : $discount->ref_facture_source;
$libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromDeposit", $sourceref);
// Add date of deposit
if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) {

View File

@ -133,8 +133,8 @@ class doc_generic_task_odt extends ModelePDFTask
// Get source company
$this->emetteur = $mysoc;
if (!$this->emetteur->pays_code) {
$this->emetteur->pays_code = substr($langs->defaultlang, -2); // By default, if was not defined
if (!$this->emetteur->country_code) {
$this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined
}
}