diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php
index a4deeb51b90..e3293718784 100644
--- a/htdocs/compta/paiement/cheque/card.php
+++ b/htdocs/compta/paiement/cheque/card.php
@@ -90,6 +90,10 @@ $usercandelete = $user->rights->banque->cheque;
$permissiontodelete = $user->rights->banque->cheque;
+// List of payment mode to support
+// Example: BANK_PAYMENT_MODES_FOR_DEPOSIT_MANAGEMENT = 'CHQ','TRA'
+$arrayofpaymentmodetomanage = explode(',', getDolGlobalString('BANK_PAYMENT_MODES_FOR_DEPOSIT_MANAGEMENT', 'CHQ'));
+
/*
* Actions
@@ -139,6 +143,10 @@ if ($action == 'setref' && $user->rights->banque->cheque) {
if ($action == 'create' && GETPOST("accountid", "int") > 0 && $user->rights->banque->cheque) {
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'));
if ($result > 0) {
if ($object->statut == 1) { // If statut is validated, we build doc
@@ -292,10 +300,14 @@ if (GETPOST('removefilter')) {
$filteraccountid = 0;
}
-if ($type == 'CHQ') {
- $title = $langs->trans("Cheques");
+if ($action == 'new') {
+ $title = $langs->trans("NewChequeDeposit");
} else {
- $title = $type;
+ if ($type == 'CHQ') {
+ $title = $langs->trans("Cheques");
+ } else {
+ $title = ($langs->trans("PaymentType".$type) != "PaymentType".$type ? $langs->trans("PaymentType".$type) : $langs->trans("PaymentMode").' '.$type);
+ }
}
$helpurl = "";
@@ -368,27 +380,40 @@ if ($action == 'new') {
$now = dol_now();
+ $labeltype = ($langs->trans("PaymentType".$type) != "PaymentType".$type ? $langs->trans("PaymentType".$type) : $type);
if ($type == 'CHQ') {
print ''.$langs->trans("SelectChequeTransactionAndGenerate").'
'."\n";
} else {
- print ''.$langs->trans("SelectPaymentTransactionAndGenerate", $type).'
'."\n";
+ print ''.$langs->trans("SelectPaymentTransactionAndGenerate", $labeltype).'
'."\n";
}
print '