From c13fefa09c62966a5992e38327c101baff2701eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Dec 2022 15:11:27 +0100 Subject: [PATCH] Debug v17 --- htdocs/compta/paiement/cheque/card.php | 5 +++-- htdocs/compta/paiement/cheque/index.php | 22 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index f28ebf2ebcf..43443fb292e 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -385,14 +385,15 @@ if ($action == 'new') { print dol_get_fiche_end(); print '
'; - print ''; + print ''; if ($search_date_start || $search_date_end || $filteraccountid > 0) { print '   '; - print ''; + print ''; } print '
'; print ''; print '
'; + print '
'; $sql = "SELECT ba.rowid as bid, ba.label,"; $sql .= " b.rowid as transactionid, b.label as transactionlabel, b.datec as datec, b.dateo as date, "; diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 92faa94dcee..394de095104 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -32,15 +32,23 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page $langs->loadLangs(array('banks', 'categories', 'compta', 'bills')); +$checkdepositstatic = new RemiseCheque($db); +$accountstatic = new Account($db); + // Security check if ($user->socid) { $socid = $user->socid; } $result = restrictedArea($user, 'banque', '', ''); +$usercancreate = $user->hasRight('banque', 'cheque'); -$checkdepositstatic = new RemiseCheque($db); -$accountstatic = new Account($db); + +/* + * Actions + */ + +// None /* @@ -49,7 +57,12 @@ $accountstatic = new Account($db); llxHeader('', $langs->trans("ChequesArea")); -print load_fiche_titre($langs->trans("ChequesArea"), '', $checkdepositstatic->picto); +$newcardbutton = ''; +if ($usercancreate) { + $newcardbutton .= dolGetButtonTitle($langs->trans('NewDeposit'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new'); +} + +print load_fiche_titre($langs->trans("ChequesArea"), $newcardbutton, $checkdepositstatic->picto); print '
'; @@ -64,6 +77,7 @@ $sql .= " AND b.amount > 0"; $resql = $db->query($sql); +print '
'; print ''; print ''; print '\n"; @@ -79,10 +93,10 @@ if ($resql) { print ''; - print "
'.$langs->trans("BankChecks")."'; print ''.$num.''; print '
\n"; } else { dol_print_error($db); } +print "
\n"; print '
';