From 2acf2353a3c5419f4666c84df4ee832bd1a98584 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Jan 2021 12:16:25 +0100 Subject: [PATCH 1/4] Fix bad link --- htdocs/compta/paiement/card.php | 12 +++++++----- htdocs/langs/en_US/banks.lang | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index d3dec6fde82..2c3fa39f38f 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -277,10 +277,8 @@ print ''; // Bank account if (!empty($conf->banque->enabled)) { - if ($object->fk_account > 0) - { - if ($object->type_code == 'CHQ' && $bankline->fk_bordereau > 0) - { + if ($object->fk_account > 0) { + if ($object->type_code == 'CHQ' && $bankline->fk_bordereau > 0) { dol_include_once('/compta/paiement/cheque/class/remisecheque.class.php'); $bordereau = new RemiseCheque($db); $bordereau->fetch($bankline->fk_bordereau); @@ -297,7 +295,11 @@ if (!empty($conf->banque->enabled)) print ''; print ''.$langs->trans('BankTransactionLine').''; print ''; - print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted'); + if ($object->fk_account > 0) { + print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted'); + } else { + print $langs->trans("NoRecordFoundIBankcAccount", $langs->transnoentities("Module85Name")); + } print ''; print ''; } diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 75f9549dca5..78dadc8463b 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -176,3 +176,4 @@ BankColorizeMovement=Colorize movements BankColorizeMovementDesc=If this function is enable, you can choose specific background color for debit or credit movements BankColorizeMovementName1=Background color for debit movement BankColorizeMovementName2=Background color for credit movement +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. \ No newline at end of file From 86e853f27d7878213e2dcbe3d6cacc15984f4ccc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Jan 2021 12:18:07 +0100 Subject: [PATCH 2/4] Look and feel v12 --- htdocs/compta/paiement/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 2c3fa39f38f..1bb6f4ce3fa 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -298,7 +298,7 @@ if (!empty($conf->banque->enabled)) if ($object->fk_account > 0) { print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted'); } else { - print $langs->trans("NoRecordFoundIBankcAccount", $langs->transnoentities("Module85Name")); + print ''.$langs->trans("NoRecordFoundIBankcAccount", $langs->transnoentities("Module85Name")).''; } print ''; print ''; From 9b6b1e055c378683807023de4785c5b3dfa101dc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Jan 2021 12:20:18 +0100 Subject: [PATCH 3/4] Fix trans --- htdocs/compta/paiement/card.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 1bb6f4ce3fa..1cfd72d26cc 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -298,7 +298,8 @@ if (!empty($conf->banque->enabled)) if ($object->fk_account > 0) { print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted'); } else { - print ''.$langs->trans("NoRecordFoundIBankcAccount", $langs->transnoentities("Module85Name")).''; + $langs->load("admin"); + print ''.$langs->trans("NoRecordFoundIBankcAccount", $langs->transnoentitiesnoconv("Module85Name")).''; } print ''; print ''; From ae2b61d5ef15d39d85e850cde8d97a41dbe4e527 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 23 Jan 2021 18:49:11 +0100 Subject: [PATCH 4/4] Fix stripe off_session set/unset --- htdocs/stripe/class/stripe.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 83b3905de43..a691b7bff40 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -428,11 +428,11 @@ class Stripe extends CommonObject // payment_method = // payment_method_types = array('card') //var_dump($dataforintent); - if ($off_session) - { - unset($dataforintent['setup_future_usage']); - $dataforintent["off_session"] = true; - } + if ($off_session) + { + unset($dataforintent['setup_future_usage']); + $dataforintent["setup_future_usage"] = "off_session"; + } if (!is_null($payment_method)) { $dataforintent["payment_method"] = $payment_method;