Update pay.php

This commit is contained in:
Laurent Destailleur 2019-03-26 20:12:32 +01:00 committed by GitHub
parent f902f7beeb
commit 6bab56c6bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,10 +57,15 @@ $sql.= " AND active = 1";
$sql.= " ORDER BY libelle"; $sql.= " ORDER BY libelle";
$resql = $db->query($sql); $resql = $db->query($sql);
$paiements = array(); $paiements = array();
if($resql){ if ($resql) {
while ($obj = $db->fetch_object($resql)){ while ($obj = $db->fetch_object($resql)) {
$accountname="CASHDESK_ID_BANKACCOUNT_".$obj->code; $paycode = $obj->code;
if($conf->global->$accountname) array_push($paiements, $obj); if ($paycode == 'LIQ') $paycode = 'CASH';
if ($paycode == 'CB') $paycode = 'CARD';
if ($paycode == 'CHQ') $paycode = 'CHEQUE';
$accountname="CASHDESK_ID_BANKACCOUNT_".$paycode;
if ($conf->global->$accountname) array_push($paiements, $obj);
} }
} }
?> ?>