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