diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index e3293718784..9135f2d2eb5 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -145,9 +145,8 @@ if ($action == 'create' && GETPOST("accountid", "int") > 0 && $user->rights->ban if (GETPOSTISARRAY('toRemise')) { $object->type = $type; $arrayofid = GETPOST('toRemise', 'array:int'); - var_dump($arrayofid); - $result = $object->create($user, GETPOST("accountid", "int"), 0, GETPOST('toRemise', 'array:int')); + $result = $object->create($user, GETPOST("accountid", "int"), 0, $arrayofid); if ($result > 0) { if ($object->statut == 1) { // If statut is validated, we build doc $object->fetch($object->id); // To force to reload all properties in correct property name diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 5acdf8f5401..073fd90944e 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -130,7 +130,7 @@ foreach ($arrayofpaymentmodetomanage as $val) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_journal as aj ON aj.rowid = ba.fk_accountancy_journal"; $sql .= " WHERE ba.rowid = bc.fk_bank_account"; $sql .= " AND bc.entity = ".((int) $conf->entity); - $sql .= " AND bc.type = '".$db->escape($type)."'"; + $sql .= " AND bc.type = '".$db->escape($val)."'"; $sql .= " ORDER BY bc.date_bordereau DESC, rowid DESC"; $sql .= $db->plimit($max);