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

Conflicts:
	htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
This commit is contained in:
Laurent Destailleur 2021-09-01 18:41:44 +02:00
commit 7c7e89cc3b

View File

@ -212,6 +212,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
if (!is_object($object->thirdparty)) { if (!is_object($object->thirdparty)) {
$object->thirdparty = $mysoc; // If fetch_thirdparty fails, object has no socid (specimen) $object->thirdparty = $mysoc; // If fetch_thirdparty fails, object has no socid (specimen)
} }
$this->emetteur = $object->thirdparty; $this->emetteur = $object->thirdparty;
if (!$this->emetteur->country_code) { if (!$this->emetteur->country_code) {
$this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined
@ -231,8 +232,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$nblines = count($object->lines); $nblines = count($object->lines);
if ($conf->fournisseur->facture->dir_output) { if ($conf->fournisseur->facture->dir_output) {
$object->fetch_thirdparty();
$deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); $deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
$amount_credit_notes_included = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); $amount_credit_notes_included = $object->getSumCreditNotesUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);
$amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); $amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0);