diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index d3ef0fc3077..d4cfbb83abd 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -1682,7 +1682,7 @@ if ($resql) { } } if ($user->rights->banque->modifier) { - print 'rowid.'&id='.$objp->bankid.'&page='.$page.'">'; + print 'rowid.'&page='.$page.'">'; print img_delete('', 'class="marginleftonly"'); print ''; } diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php index 8be615c4827..22e137c29c8 100644 --- a/htdocs/compta/bank/info.php +++ b/htdocs/compta/bank/info.php @@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array('banks', 'categories', 'companies')); $id = GETPOST("rowid", 'int'); +$accountid = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); $ref = GETPOST('ref', 'alpha'); // Security check @@ -40,7 +41,7 @@ if ($user->socid) { $socid = $user->socid; } -$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype); +$result = restrictedArea($user, 'banque', $accountid, 'bank_account'); if (!$user->rights->banque->lire && !$user->rights->banque->consolidate) { accessforbidden(); } diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php index f75a8240e00..e524371e29d 100644 --- a/htdocs/compta/bank/line.php +++ b/htdocs/compta/bank/line.php @@ -51,7 +51,8 @@ if (!empty($conf->salaries->enabled)) { } -$id = (GETPOST('rowid', 'int') ? GETPOST('rowid', 'int') : GETPOST('account', 'int')); +$id = GETPOST('rowid', 'int'); +$accountid = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -67,7 +68,7 @@ if ($user->socid) { $socid = $user->socid; } -$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype); +$result = restrictedArea($user, 'banque', $accountid, 'bank_account'); if (!$user->rights->banque->lire && !$user->rights->banque->consolidate) { accessforbidden(); } @@ -78,6 +79,7 @@ $hookmanager->initHooks(array('bankline')); /* * Actions */ + $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -265,7 +267,7 @@ foreach ($cats as $cat) { $head = bankline_prepare_head($rowid); -$sql = "SELECT b.rowid,b.dateo as do,b.datev as dv, b.amount, b.label, b.rappro,"; +$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro,"; $sql .= " b.num_releve, b.fk_user_author, b.num_chq, b.fk_type, b.fk_account, b.fk_bordereau as receiptid,"; $sql .= " b.emetteur,b.banque"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; @@ -299,6 +301,7 @@ if ($result) { print ''; print ''; print ''; + print ''; print ''; print dol_get_fiche_head($head, 'bankline', $langs->trans('LineRecord'), 0, 'accountline', 0); @@ -490,9 +493,9 @@ if ($result) { print $form->selectDate($db->jdate($objp->do), 'dateo', '', '', '', 'update', 1, 0, $objp->rappro); if (!$objp->rappro) { print '   '; - print ''; + print ''; print img_edit_remove()." "; - print ''; + print ''; print img_edit_add().""; } print ''; @@ -510,9 +513,9 @@ if ($result) { print $form->selectDate($db->jdate($objp->dv), 'datev', '', '', '', 'update', 1, 0, $objp->rappro); if (!$objp->rappro) { print '   '; - print ''; + print ''; print img_edit_remove()." "; - print ''; + print ''; print img_edit_add().""; } print '';