From 2acf2353a3c5419f4666c84df4ee832bd1a98584 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Jan 2021 12:16:25 +0100 Subject: [PATCH] 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