diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 80e52110d8c..ca6a2e8d589 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -333,7 +333,6 @@ class Account extends CommonObject public function __toString() { $string = ''; - foreach ($this->getFieldsToShow() as $val) { if ($val == 'BankCode') { $string .= $this->code_banque.' '; diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 74de1c640d4..984c29d75ed 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; if (!$user->rights->facture->lire) accessforbidden(); @@ -44,6 +45,8 @@ $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); $action = GETPOST('action', 'alpha'); +$type = GETPOST('type', 'aZ09'); + $fieldid = (!empty($ref) ? 'ref' : 'rowid'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid); @@ -397,7 +400,13 @@ if ($object->id > 0) print ''; print '
| '; -print ' | '; +print ' | '; +print ' | '; print ' | '; print ' | '; // Action column diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 06c20a2b04f..556f40de9be 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -38,7 +38,7 @@ $langs->loadLangs(array('banks', 'categories', 'companies', 'withdrawals', 'bill if ($user->socid > 0) accessforbidden(); // Get supervariables -$prev_id = GETPOST('id', 'int'); +$id = GETPOST('id', 'int'); $socid = GETPOST('socid', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -68,9 +68,9 @@ $thirdpartytmp = new Societe($db); llxHeader('', $langs->trans("WithdrawalsReceipts")); -if ($prev_id > 0 || $ref) +if ($id > 0 || $ref) { - if ($object->fetch($prev_id, $ref) >= 0) + if ($object->fetch($id, $ref) >= 0) { $head = prelevement_prepare_head($object); dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalsReceipts"), -1, 'payment'); @@ -183,7 +183,7 @@ if ($result) $num = $db->num_rows($result); $i = 0; - $param = "&id=".$prev_id; + $param = "&id=".$id; // Lines of title fields print ' |