update code for a better php8 compliance
This commit is contained in:
parent
9b141e9d1d
commit
afda5c0416
@ -1197,10 +1197,10 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if ($object->type != 2) {
|
||||
// Check a payment mode is defined
|
||||
if (empty($object->mode_reglement_code)
|
||||
&& empty($conf->global->FACTURE_CHQ_NUMBER)
|
||||
&& !getDolGlobalInt('FACTURE_CHQ_NUMBER')
|
||||
&& !getDolGlobalInt('FACTURE_RIB_NUMBER')) {
|
||||
$this->error = $outputlangs->transnoentities("ErrorNoPaiementModeConfigured");
|
||||
} elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER) && empty($object->fk_account) && empty($object->fk_bank))
|
||||
} elseif (($object->mode_reglement_code == 'CHQ' && !getDolGlobalInt('FACTURE_CHQ_NUMBER') && empty($object->fk_account) && empty($object->fk_bank))
|
||||
|| ($object->mode_reglement_code == 'VIR' && !getDolGlobalInt('FACTURE_RIB_NUMBER') && empty($object->fk_account) && empty($object->fk_bank))) {
|
||||
// Avoid having any valid PDF with setup that is not complete
|
||||
$outputlangs->load("errors");
|
||||
@ -1286,12 +1286,12 @@ class pdf_crabe extends ModelePDFFactures
|
||||
// Show payment mode CHQ
|
||||
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') {
|
||||
// If payment mode unregulated or payment mode forced to CHQ
|
||||
if (!empty($conf->global->FACTURE_CHQ_NUMBER)) {
|
||||
if (getDolGlobalInt('FACTURE_CHQ_NUMBER')) {
|
||||
$diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
|
||||
if ($conf->global->FACTURE_CHQ_NUMBER > 0) {
|
||||
$account = new Account($this->db);
|
||||
$account->fetch($conf->global->FACTURE_CHQ_NUMBER);
|
||||
$account->fetch(getDolGlobalInt('FACTURE_CHQ_NUMBER'));
|
||||
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetFont('', 'B', $default_font_size - $diffsizetitle);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user