Merge pull request #22812 from lamrani002/fix_issue_html_cerfafr.modules.php

Fix issue Scrutinizer in html cerfafr.modules.php
This commit is contained in:
Laurent Destailleur 2022-11-14 11:22:03 +01:00 committed by GitHub
commit f5dbc97389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,18 +120,18 @@ class html_cerfafr extends ModeleDon
// This is not the proper way to do it but $formclass->form_modes_reglement
// prints the translation instead of returning it
if ($don->modepaiementid) {
$formclass->load_cache_types_paiements();
$paymentmode = $formclass->cache_types_paiements[$don->modepaiementid]['label'];
$formclass->load_cache_types_paiements();
if ($don->modepaymentid) {
$paymentmode = $formclass->cache_types_paiements[$don->modepaymentid]['label'];
} else {
$paymentmode = '';
}
if ($don->modepaymentcode == 'CHQ') {
$modepaymentcode = $formclass->cache_types_paiements[$don->modepaymentid]['code'];
if ($modepaymentcode == 'CHQ') {
$ModePaiement = '<td width="25%"><input type="checkbox"> Remise d\'espèces</td><td width="25%"><input type="checkbox" disabled="true" checked="checked"> Chèque</td><td width="50%"><input type="checkbox"> Virement, prélèvement, carte bancaire</td>';
} elseif ($don->modepaymentcode == 'LIQ') {
} elseif ($modepaymentcode == 'LIQ') {
$ModePaiement = '<td width="25%"><input type="checkbox" checked="checked"> Remise d\'espèces</td><td width="25%"><input type="checkbox"> Chèque</td><td width="50%"><input type="checkbox"> Virement, prélèvement, carte bancaire</td>';
} elseif ($don->modepaymentcode == 'VIR' || $don->modepaymentcode == 'PRE' || $don->modepaymentcode == 'CB') {
} elseif ($modepaymentcode == 'VIR' || $modepaymentcode == 'PRE' || $modepaymentcode == 'CB') {
$ModePaiement = '<td width="25%"><input type="checkbox"> Remise d\'espèces</td><td width="25%"><input type="checkbox"> Chèque</td><td width="50%"><input type="checkbox" checked="checked"> Virement, prélèvement, carte bancaire</td>';
} else {
$ModePaiement = '<td width="25%"><input type="checkbox"> Remise d\'espèces</td><td width="25%"><input type="checkbox"> Chèque</td><td width="50%"><input type="checkbox"> Virement, prélèvement, carte bancaire</td>';