From f894bc0f3e42a25037782d6c3b9760a0b160d9b6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Aug 2006 22:34:43 +0000 Subject: [PATCH] =?UTF-8?q?On=20s=E9pare=20les=20caract=E9risitque=20de=20?= =?UTF-8?q?comptes=20financiers=20en=202=20onglets.=20Un=20pour=20les=20ca?= =?UTF-8?q?rac=20g=E9n=E9rales=20et=20un=20pour=20les=20carac=20propres=20?= =?UTF-8?q?au=20pays.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/bank/account.class.php | 116 ++++++++-- htdocs/compta/bank/bankid_fr.php | 306 +++++++++++++++++++++++++++ htdocs/compta/bank/fiche.php | 230 +++++++++++--------- htdocs/compta/bank/pre.inc.php | 4 +- 4 files changed, 530 insertions(+), 126 deletions(-) create mode 100644 htdocs/compta/bank/bankid_fr.php diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php index 0b71715341e..062894ab6c0 100644 --- a/htdocs/compta/bank/account.class.php +++ b/htdocs/compta/bank/account.class.php @@ -59,6 +59,11 @@ class Account var $account_number; + var $currency_code; + var $min_allowed; + var $min_desired; + var $comment; + /** * Constructeur @@ -261,6 +266,10 @@ class Account { global $langs; + // Verification parametres + if (! $this->min_allowed) $this->min_allowed=0; + if (! $this->min_desired) $this->min_desired=0; + // Chargement librairie pour acces fonction controle RIB require_once DOL_DOCUMENT_ROOT . '/compta/bank/bank.lib.php'; @@ -275,7 +284,16 @@ class Account return -1; } - $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_account (datec, ref, label, account_number) values (now(),'" . addslashes($this->ref) . "', '" . addslashes($this->label) . "','" . addslashes($this->account_number) . "');"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_account ("; + $sql.= "datec, ref, label, account_number, currency_code,"; + $sql.= "min_allowed, min_desired,"; + $sql.= "comment"; + $sql.= ") values ("; + $sql.= "now(),'" . addslashes($this->ref) . "', '" . addslashes($this->label) . "',"; + $sql.= "'".addslashes($this->account_number) . "','".$this->currency_code."',"; + $sql.= "min_allowed=".price2num($this->min_allowed).",min_desired=".price2num($this->min_desired).","; + $sql.= "comment='".addslashes($this->comment)."'"; + $sql.= ")"; $resql=$this->db->query($sql); if ($resql) { @@ -285,7 +303,7 @@ class Account if ( $this->update() ) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank (datec, label, amount, fk_account, datev, dateo, fk_type, rappro) "; - $sql .= " VALUES (now(),'".$langs->trans("Balance")."','" . ereg_replace(',','.',$this->solde) . "','$this->id','".$this->db->idate($this->date_solde)."','".$this->db->idate($this->date_solde)."','SOLD',1);"; + $sql .= " VALUES (now(),'".$langs->trans("Balance")."','" . price2num($this->solde) . "','$this->id','".$this->db->idate($this->date_solde)."','".$this->db->idate($this->date_solde)."','SOLD',1);"; $this->db->query($sql); } return $this->id; @@ -293,23 +311,79 @@ class Account } else { - if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') + { $this->error=$langs->trans("ErrorBankLabelAlreadyExists"); + dolibarr_syslog($this->error); return -1; } else { - $this->error=$this->db->error(); + $this->error=$this->db->error()." sql=".$sql; + dolibarr_syslog($this->error); return -2; } } } /* - * \brief Mise a jour compte + * \brief Mise a jour compte, partie generale * \param user Object utilisateur qui modifie * \return int <0 si ko, >0 si ok */ function update($user='') + { + global $langs; + + dolibarr_syslog("Account.class::update"); + + if (! $this->ref) + { + $this->error=$langs->trans("ErrorFieldRequired",$langs->trans("Ref")); + return -1; + } + if (! $this->label) $this->label = "???"; + + $sql = "UPDATE ".MAIN_DB_PREFIX."bank_account SET "; + + $sql .= " ref = '".addslashes($this->ref)."'"; + $sql .= ",label = '".addslashes($this->label)."'"; + + $sql .= ",courant = ".$this->courant; + $sql .= ",clos = ".$this->clos; + $sql .= ",rappro = ".$this->rappro; + $sql .= ",url = ".($this->url?"'".$this->url."'":"null"); + $sql .= ",account_number = '".$this->account_number."'"; + + $sql .= ",currency_code = '".$this->currency_code."'"; + + $sql .= ",min_allowed = '".price2num($this->min_allowed)."'"; + $sql .= ",min_desired = '".price2num($this->min_desired)."'"; + $sql .= ",comment = '".addslashes($this->comment)."'"; + + $sql .= " WHERE rowid = ".$this->id; + + dolibarr_syslog("Account.class::update sql=$sql"); + + $result = $this->db->query($sql); + if ($result) + { + return 1; + } + else + { + $this->error=$this->db.' sql='.$sql; + dolibarr_print_error($this->error); + return -1; + } + } + + + /* + * \brief Mise a jour compte, partie RIB + * \param user Object utilisateur qui modifie + * \return int <0 si ko, >0 si ok + */ + function update_rib($user='') { global $langs; @@ -329,16 +403,9 @@ class Account $this->error=$langs->trans("ErrorFieldRequired",$langs->trans("Ref")); return -1; } - if (! $this->label) $this->label = "???"; - $this->account_number=trim($this->account_number); - $sql = "UPDATE ".MAIN_DB_PREFIX."bank_account SET "; - $sql .= " bank = '".addslashes($this->bank)."'"; - $sql .= ",ref = '".addslashes($this->ref)."'"; - $sql .= ",label = '".addslashes($this->label)."'"; - $sql .= ",code_banque='".$this->code_banque."'"; $sql .= ",code_guichet='".$this->code_guichet."'"; $sql .= ",number='".$this->number."'"; @@ -348,27 +415,24 @@ class Account $sql .= ",domiciliation='".addslashes($this->domiciliation)."'"; $sql .= ",proprio = '".addslashes($this->proprio)."'"; $sql .= ",adresse_proprio = '".addslashes($this->adresse_proprio)."'"; - $sql .= ",courant = ".$this->courant; - $sql .= ",clos = ".$this->clos; - $sql .= ",rappro = ".$this->rappro; - $sql .= ",url = ".($this->url?"'".$this->url."'":"null"); - $sql .= ",account_number = '".$this->account_number."'"; - $sql .= " WHERE rowid = ".$this->id; - $result = $this->db->query($sql); + dolibarr_syslog("Account.class::update_rib sql=$sql"); + $result = $this->db->query($sql); if ($result) { return 1; } else { - dolibarr_print_error($this->db); - return 0; + $this->error=$this->db.' sql='.$sql; + dolibarr_print_error($this->error); + return -1; } } - + + /* * \brief Charge en memoire depuis la base le compte * \param id Id du compte à récupérer @@ -379,7 +443,8 @@ class Account $sql = "SELECT rowid, ref, label, bank, number, courant, clos, rappro, url,"; $sql.= " code_banque, code_guichet, cle_rib, bic, iban_prefix,"; $sql.= " domiciliation, proprio, adresse_proprio,"; - $sql.= " account_number"; + $sql.= " account_number, currency_code,"; + $sql.= " min_allowed, min_desired, comment"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql.= " WHERE rowid = ".$id; @@ -411,6 +476,11 @@ class Account $this->adresse_proprio = $obj->adresse_proprio; $this->account_number = $obj->account_number; + + $this->currency_code = $obj->currency_code; + $this->min_allowed = $obj->min_allowed; + $this->min_desired = $obj->min_desired; + $this->comment = $obj->comment; } $this->db->free($result); } diff --git a/htdocs/compta/bank/bankid_fr.php b/htdocs/compta/bank/bankid_fr.php new file mode 100644 index 00000000000..8637ee360eb --- /dev/null +++ b/htdocs/compta/bank/bankid_fr.php @@ -0,0 +1,306 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2006 Laurent Destailleur + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + */ + +/** + \file htdocs/compta/bank/bankid_fr.php + \ingroup banque + \brief Fiche création compte bancaire + \version $Revision$ +*/ + +require("./pre.inc.php"); + +$langs->load("banks"); + +$user->getrights('banque'); + +if (!$user->admin && !$user->rights->banque) + accessforbidden(); + + +/* + * Actions + */ +if ($_POST["action"] == 'update' && ! $_POST["cancel"]) +{ + // Modification + $account = new Account($db, $_POST["id"]); + $account->fetch($_POST["id"]); + + $account->bank = trim($_POST["bank"]); + $account->code_banque = trim($_POST["code_banque"]); + $account->code_guichet = trim($_POST["code_guichet"]); + $account->number = trim($_POST["number"]); + $account->cle_rib = trim($_POST["cle_rib"]); + $account->bic = trim($_POST["bic"]); + $account->iban_prefix = trim($_POST["iban_prefix"]); + $account->domiciliation = trim($_POST["domiciliation"]); + $account->proprio = trim($_POST["proprio"]); + $account->adresse_proprio = trim($_POST["adresse_proprio"]); + + if ($account->id) + { + $result = $account->update_rib($user); + if ($result >= 0) + { + $_GET["id"]=$_POST["id"]; // Force chargement page en mode visu + } + else + { + $message='
'.$account->error().'
'; + $_GET["action"]='edit'; // Force chargement page edition + } + } +} + +if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->banque->configurer) +{ + // Modification + $account = new Account($db, $_GET["id"]); + $account->delete($_GET["id"]); + + header("Location: ".DOL_URL_ROOT."/compta/bank/index.php"); + exit; +} + + + +llxHeader(); + +$form = new Form($db); + +/* ************************************************************************** */ +/* */ +/* Affichage page en mode création */ +/* */ +/* ************************************************************************** */ + + if ($_GET["id"] && $_GET["action"] != 'edit') + { + $account = new Account($db, $_GET["id"]); + $account->fetch($_GET["id"]); + + /* + * Affichage onglets + */ + $h=0; + + $head[$h][0] = 'fiche.php?id='.$account->id; + $head[$h][1] = $langs->trans("AccountCard"); + $head[$h][2] = 'bankname'; + $h++; + + if ($account->type == 0 || $account->type == 1) + { + $head[$h][0] = 'bankid_fr.php?id='.$account->id; + $head[$h][1] = $langs->trans("RIB"); + $head[$h][2] = 'bankid'; + $h++; + } + + dolibarr_fiche_head($head, 'bankid', $langs->trans("FinancialAccount")); + + /* + * Confirmation de la suppression + */ + if ($_GET["action"] == 'delete') + { + $form->form_confirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); + print '
'; + } + + print ''; + + // Ref + print ''; + print ''; + + print ''; + print ''; + + print ''; + print ''; + + print ''; + print ''; + + if ($account->type == 0 || $account->type == 1) + { + print ''; + print ''; + + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + + print ''; + print ''; + + print ''; + print ''; + + print '\n"; + + print '\n"; + + print '\n"; + } + + print '
'.$langs->trans("Ref").''.$account->ref.'
'.$langs->trans("Label").''.$account->label.'
'.$langs->trans("AccountType").''.$account->type_lib[$account->type].'
'.$langs->trans("Status").''.$account->getLibStatut(4).'
'.$langs->trans("BankName").''.$account->bank.'
Code Banque'.$account->code_banque.'
Code Guichet'.$account->code_guichet.'
Numéro'.$account->number.'
Clé RIB'.$account->cle_rib.'
'.$langs->trans("IBAN").''.$account->iban_prefix.'
'.$langs->trans("BIC").''.$account->bic.'
'.$langs->trans("BankAccountDomiciliation").''; + print nl2br($account->domiciliation); + print "
'.$langs->trans("BankAccountOwner").''; + print $account->proprio; + print "
'.$langs->trans("BankAccountOwnerAddress").''; + print nl2br($account->adresse_proprio); + print "
'; + + print ''; + + + /* + * Barre d'actions + * + */ + print '
'; + + if ($user->rights->banque->configurer) + { + print 'id.'">'.$langs->trans("Edit").''; + } + + print '
'; + + } + + /* ************************************************************************** */ + /* */ + /* Edition */ + /* */ + /* ************************************************************************** */ + + if ($_GET["id"] && $_GET["action"] == 'edit' && $user->rights->banque->configurer) + { + $account = new Account($db, $_GET["id"]); + $account->fetch($_GET["id"]); + + print_titre($langs->trans("EditFinancialAccount")); + print "
"; + + if ($message) { print "$message
\n"; } + + print '
'; + print ''; + print ''."\n\n"; + + print ''; + + // Ref + print ''; + print ''; + + print ''; + print ''; + + print ''; + print ''; + + print ''; + print ''; + + if ($account->type == 0 || $account->type == 1) + { + // If bank account + print ''; + + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + + print ''; + print ''; + + print ''; + print ''; + + print '"; + + print ''; + print ''; + + print '"; + + } + + print ''; + print '
'.$langs->trans("Ref").''.$account->ref; + print '
'.$langs->trans("Label").''.$account->label; + print '
'.$langs->trans("AccountType").''.$account->type_lib[$account->type]; + print '
'.$langs->trans("Status").''.$account->getLibStatut(4); + print '
'.$langs->trans("IfBankAccount").'...
'.$langs->trans("Bank").'
Code Banque
Code Guichet
Numéro
Clé RIB
'.$langs->trans("IBAN").'
'.$langs->trans("BIC").'
'.$langs->trans("BankAccountDomiciliation").''; + print "
'.$langs->trans("BankAccountOwner").''; + print '
'.$langs->trans("BankAccountOwnerAddress").''; + print "
'; + print '   '; + print '
'; + + print '
'; + } + + + +$db->close(); + +llxFooter('$Date$ - $Revision$'); +?> diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index 5ac67e8c71b..bd38dc1ac00 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -62,17 +62,25 @@ if ($_POST["action"] == 'add') $account->iban_prefix = $_POST["iban_prefix"]; $account->domiciliation = trim($_POST["domiciliation"]); - $account->proprio = trim($_POST["proprio"]); + $account->proprio = trim($_POST["proprio"]); $account->adresse_proprio = trim($_POST["adresse_proprio"]); - $account->account_number = trim($_POST["account_number"]); + $account->account_number = trim($_POST["account_number"]); - $account->solde = $_POST["solde"]; - $account->date_solde = mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); + $account->solde = $_POST["solde"]; + $account->date_solde = mktime(12,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); + + $account->currency_code = trim($_POST["account_currency_code"]); + + $account->min_allowed = $_POST["account_min_allowed"]; + $account->min_desired = $_POST["account_min_desired"]; + $account->comment = trim($_POST["account_comment"]); - if ($account->label) { + if ($account->label) + { $id = $account->create($user->id); - if ($id > 0) { + if ($id > 0) + { $_GET["id"]=$id; // Force chargement page en mode visu } else { @@ -96,33 +104,39 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) $account->courant = $_POST["type"]; $account->clos = $_POST["clos"]; $account->rappro = (isset($_POST["norappro"]) && $_POST["norappro"]=='on')?0:1; - $account->url = $_POST["url"]; + $account->url = trim($_POST["url"]); $account->bank = trim($_POST["bank"]); - $account->code_banque = $_POST["code_banque"]; - $account->code_guichet = $_POST["code_guichet"]; - $account->number = $_POST["number"]; - $account->cle_rib = $_POST["cle_rib"]; - $account->bic = $_POST["bic"]; - $account->iban_prefix = $_POST["iban_prefix"]; - $account->domiciliation = $_POST["domiciliation"]; + $account->code_banque = trim($_POST["code_banque"]); + $account->code_guichet = trim($_POST["code_guichet"]); + $account->number = trim($_POST["number"]); + $account->cle_rib = trim($_POST["cle_rib"]); + $account->bic = trim($_POST["bic"]); + $account->iban_prefix = trim($_POST["iban_prefix"]); + $account->domiciliation = trim($_POST["domiciliation"]); - $account->proprio = $_POST["proprio"]; - $account->adresse_proprio = $_POST["adresse_proprio"]; + $account->proprio = trim($_POST["proprio"]); + $account->adresse_proprio = trim($_POST["adresse_proprio"]); - $account->account_number = trim($_POST["account_number"]); + $account->account_number = trim($_POST["account_number"]); + + $account->currency_code = trim($_POST["account_currency_code"]); + + $account->min_allowed = $_POST["account_min_allowed"]; + $account->min_desired = $_POST["account_min_desired"]; + $account->comment = trim($_POST["account_comment"]); if ($account->label) { $result = $account->update($user); - if (! $result) + if ($result >= 0) { - $message='
'.$account->error().'
'; - $_GET["action"]='edit'; // Force chargement page edition + $_GET["id"]=$_POST["id"]; // Force chargement page en mode visu } else { - $_GET["id"]=$_POST["id"]; // Force chargement page en mode visu + $message='
'.$account->error().'
'; + $_GET["action"]='edit'; // Force chargement page edition } } else { $message='
'.$langs->trans("ErrorFieldRequired",$langs->trans("LabelBankCashAccount")).'
'; @@ -141,6 +155,7 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == "yes" && $user- } + llxHeader(); $form = new Form($db); @@ -158,7 +173,7 @@ if ($_GET["action"] == 'create') if ($message) { print "$message
\n"; } - print '
'; + print ''; print ''; print ''; @@ -173,7 +188,6 @@ if ($_GET["action"] == 'create') print ''.$langs->trans("AccountType").''; print ''; - $form=new Form($db); print $form->select_type_comptes_financiers(isset($_POST["type"])?$_POST["type"]:1,"type"); print ''; @@ -188,15 +202,43 @@ if ($_GET["action"] == 'create') print ''; } + // Currency + print ''.$langs->trans("Currency").''; + print ''; +/* + $selectedcode=$account->account_currency_code; + if (! $selectedcode) $selectedcode=$conf->monnaie; + $form->select_currency($selectedcode, 'account_currency_code'); +*/ + print $langs->trans("Currency".$conf->monnaie); + print ''; + + // Web + print ''.$langs->trans("Web").''; + print ''; + + print ''.$langs->trans("Comment").''; + print ''; + + // Solde + print ''.$langs->trans("InitialBankBalance").'...'; + print ''.$langs->trans("InitialBankBalance").''; - print ''; + print ''; print ''.$langs->trans("Date").''; print ''; - $html=new Form($db); - $html->select_date(time(), 're', 0, 0, 0, 'createbankaccount'); + $form->select_date(time(), 're', 0, 0, 0, 'createbankaccount'); print ''; + print ''.$langs->trans("BalanceMinimalAllowed").''; + print ''; + + print ''.$langs->trans("BalanceMinimalDesired").''; + print ''; + + + // If bank account print ''.$langs->trans("IfBankAccount").'...'; print ''.$langs->trans("Conciliation").''; @@ -228,9 +270,6 @@ if ($_GET["action"] == 'create') print ""; - print ''.$langs->trans("Web").''; - print ''; - print ''; print '
'; print ''; @@ -250,27 +289,36 @@ else /* * Affichage onglets */ - $h = 0; - - $head[$h][0] = "fiche.php?id=$account->id"; + $h=0; + + $head[$h][0] = 'fiche.php?id='.$account->id; $head[$h][1] = $langs->trans("AccountCard"); + $head[$h][2] = 'bankname'; $h++; + + if ($account->type == 0 || $account->type == 1) + { + $head[$h][0] = 'bankid_fr.php?id='.$account->id; + $head[$h][1] = $langs->trans("RIB"); + $head[$h][2] = 'bankid'; + $h++; + } - dolibarr_fiche_head($head, $hselected, $langs->trans("FinancialAccount")); + dolibarr_fiche_head($head, 'bankname', $langs->trans("FinancialAccount")); /* * Confirmation de la suppression */ if ($_GET["action"] == 'delete') { - $form->form_confirm($_SERVER["PHP_SELF"]."?id=$account->id",$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); + $form->form_confirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); print '
'; } print ''; // Ref - print ''; + print ''; print ''; print ''; @@ -294,41 +342,31 @@ else print ''; print ''; } - - if ($account->type == 0 || $account->type == 1) - { - print ''; - print ''; + + // Currency + print ''; + print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; - - print ''; - print ''; - - print '\n"; - - print '\n"; - - print '\n"; - } + print ''; + print ''; print '\n"; + print ''; + print ''; + print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''.$account->ref.'
'.$langs->trans("Label").'
'.$langs->trans("AccountancyCode").''.$account->account_number.'
'.$langs->trans("Bank").''.$account->bank.'
'.$langs->trans("Currency").''; + /* + $selectedcode=$account->account_currency_code; + if (! $selectedcode) $selectedcode=$conf->monnaie; + $form->select_currency($selectedcode, 'account_currency_code'); + */ + print $langs->trans("Currency".$conf->monnaie); + print '
Code BanqueCode GuichetNuméroClé RIB
'.$account->code_banque.''.$account->code_guichet.''.$account->number.''.$account->cle_rib.'
'.$langs->trans("BalanceMinimalAllowed").''.$account->min_allowed.'
'.$langs->trans("IBAN").''.$account->iban_prefix.'
'.$langs->trans("BIC").''.$account->bic.'
'.$langs->trans("BankAccountDomiciliation").''; - print nl2br($account->domiciliation); - print "
'.$langs->trans("BankAccountOwner").''; - print $account->proprio; - print "
'.$langs->trans("BankAccountOwnerAddress").''; - print nl2br($account->adresse_proprio); - print "
'.$langs->trans("BalanceMinimalDesired").''.$account->min_desired.'
'.$langs->trans("Web").''; print ''.$account->url.''; print "
'.$langs->trans("Comment").''.$account->comment.'
'; print ''; @@ -342,13 +380,13 @@ else if ($user->rights->banque->configurer) { - print ''.$langs->trans("Edit").''; + print 'id.'">'.$langs->trans("Edit").''; } $canbedeleted=$account->can_be_deleted(); // Renvoi vrai si compte sans mouvements if ($user->rights->banque->configurer && $canbedeleted) { - print ''.$langs->trans("Delete").''; + print 'id.'">'.$langs->trans("Delete").''; } print ''; @@ -371,7 +409,7 @@ else if ($message) { print "$message
\n"; } - print '
'; + print ''; print ''; print ''."\n\n"; @@ -411,42 +449,32 @@ else print ''; } - if ($account->type == 0 || $account->type == 1) - { - print ''.$langs->trans("Bank").''; - print ''; - - print 'Code BanqueCode GuichetNuméroClé RIB'; - print ''; - print ''; - print ''; - print ''; - - print ''.$langs->trans("IBAN").''; - print ''; - - print ''.$langs->trans("BIC").''; - print ''; - - print ''.$langs->trans("BankAccountDomiciliation").''; - print ""; - - print ''.$langs->trans("BankAccountOwner").''; - print ''; - print ''; - - print ''.$langs->trans("BankAccountOwnerAddress").''; - print ""; - - print ''.$langs->trans("Web").''; - print ''; - print ''; + // Currency + print ''.$langs->trans("Currency"); + print ''; + print ''; + print ''; + /* + $selectedcode=$account->account_currency_code; + if (! $selectedcode) $selectedcode=$conf->monnaie; + $form->select_currency($selectedcode, 'account_currency_code'); + */ + print $langs->trans("Currency".$conf->monnaie); + print ''; + + print ''.$langs->trans("BalanceMinimalAllowed").''; + print ''; + + print ''.$langs->trans("BalanceMinimalDesired").''; + print ''; + + print ''.$langs->trans("Web").''; + print ''; + print ''; + + print ''.$langs->trans("Comment").''; + print ''; - } print ''; print '   '; diff --git a/htdocs/compta/bank/pre.inc.php b/htdocs/compta/bank/pre.inc.php index 4e1d7d948b7..d3e8dd7a5be 100644 --- a/htdocs/compta/bank/pre.inc.php +++ b/htdocs/compta/bank/pre.inc.php @@ -65,7 +65,7 @@ function llxHeader($head = "") } $db->free($resql); } - $menu->add(DOL_URL_ROOT."/compta/bank/index.php",$langs->trans("Bank")); + $menu->add(DOL_URL_ROOT."/compta/bank/index.php",$langs->trans("MenuBankCash")); $menu->add_submenu(DOL_URL_ROOT."/compta/bank/search.php",$langs->trans("SearchTransaction")); $menu->add_submenu(DOL_URL_ROOT."/compta/bank/budget.php",$langs->trans("ByCategories")); @@ -78,7 +78,7 @@ function llxHeader($head = "") if ($user->rights->banque->configurer) { - $menu->add_submenu(DOL_URL_ROOT."/compta/bank/config.php",$langs->trans("Setup")); + $menu->add(DOL_URL_ROOT."/compta/bank/config.php",$langs->trans("MenuSetupBank")); } if ($conf->global->COMPTA_ONLINE_PAYMENT_BPLC)