$dvid = GETPOST('dvid'); $num = GETPOST('num'); // Security check $fieldid = !empty($ref) ? $ref : $id; $fieldname = isset($ref) ? 'ref' : 'rowid'; if ($user->societe_id) { $socid = $user->societe_id; } $result = restrictedArea($user, 'banque', $fieldid, 'bank_account', '', '', $fieldname); if ($user->rights->banque->consolidate && $action == 'dvnext' && !empty($dvid)) { $al = new AccountLine($db); $al->datev_next($dvid); } if ($user->rights->banque->consolidate && $action == 'dvprev' && !empty($dvid)) { $al = new AccountLine($db); $al->datev_previous($dvid); } $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOST('page', 'int'); if ($page == -1) { $page = 0; } if (!$sortorder) { $sortorder = "ASC"; } if (!$sortfield) { $sortfield = "s.nom"; } $offset = $conf->liste_limit * $page; $pageprev = $page - 1;
$socid = $user->societe_id; } $result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype); if (!$user->rights->banque->lire && !$user->rights->banque->consolidate) { accessforbidden(); } /* * Actions */ if ($user->rights->banque->consolidate && $action == 'dvnext') { $al = new AccountLine($db); $al->datev_next($_GET["rowid"]); } if ($user->rights->banque->consolidate && $action == 'dvprev') { $al = new AccountLine($db); $al->datev_previous($_GET["rowid"]); } if ($action == 'confirm_delete_categ' && $confirm == "yes" && $user->rights->banque->modifier) { $sql = "DELETE FROM " . MAIN_DB_PREFIX . "bank_class WHERE lineid = " . $rowid . " AND fk_categ = " . GETPOST("cat1"); if (!$db->query($sql)) { dol_print_error($db); } } if ($user->rights->banque->modifier && $action == 'class') { $sql = "DELETE FROM " . MAIN_DB_PREFIX . "bank_class WHERE lineid = " . $rowid . " AND fk_categ = " . $_POST["cat1"]; if (!$db->query($sql)) { dol_print_error($db); } $sql = "INSERT INTO " . MAIN_DB_PREFIX . "bank_class (lineid, fk_categ) VALUES (" . $rowid . ", " . $_POST["cat1"] . ")"; if (!$db->query($sql)) { dol_print_error($db);
// Security check if (isset($_GET["account"]) || isset($_GET["ref"])) { $id = isset($_GET["account"]) ? $_GET["account"] : (isset($_GET["ref"]) ? $_GET["ref"] : ''); } $fieldid = isset($_GET["ref"]) ? 'ref' : 'rowid'; if ($user->societe_id) { $socid = $user->societe_id; } $result = restrictedArea($user, 'banque', $id, 'bank_account', '', '', $fieldid); if ($user->rights->banque->consolidate && $action == 'dvnext') { $al = new AccountLine($db); $al->datev_next($_GET["dvid"]); } if ($user->rights->banque->consolidate && $action == 'dvprev') { $al = new AccountLine($db); $al->datev_previous($_GET["dvid"]); } $sortfield = isset($_GET["sortfield"]) ? $_GET["sortfield"] : $_POST["sortfield"]; $sortorder = isset($_GET["sortorder"]) ? $_GET["sortorder"] : $_POST["sortorder"]; $page = isset($_GET["page"]) ? $_GET["page"] : $_POST["page"]; if ($page == -1) { $page = 0; } if (!$sortorder) { $sortorder = "ASC"; } if (!$sortfield) { $sortfield = "s.nom"; } $offset = $conf->liste_limit * $page; $pageprev = $page - 1;