diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php index b6e1105c969..1251e2723f1 100644 --- a/htdocs/compta/bank/account.class.php +++ b/htdocs/compta/bank/account.class.php @@ -45,6 +45,7 @@ class Account var $bank; var $clos; var $rappro; + var $url; var $code_banque; var $code_guichet; @@ -348,6 +349,7 @@ class Account $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; @@ -372,7 +374,7 @@ class Account function fetch($id) { $this->id = $id; - $sql = "SELECT rowid, ref, label, bank, number, courant, clos, rappro,"; + $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"; @@ -394,6 +396,7 @@ class Account $this->bank = $obj->bank; $this->clos = $obj->clos; $this->rappro = $obj->rappro; + $this->url = $obj->url; $this->code_banque = $obj->code_banque; $this->code_guichet = $obj->code_guichet; diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index c96e8ae0118..2f3766d3d82 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -51,6 +51,7 @@ if ($_POST["action"] == 'add') $account->courant = $_POST["type"]; $account->clos = $_POST["clos"]; $account->rappro = $_POST["norappro"]?1:0; + $account->url = $_POST["url"]; $account->bank = trim($_POST["bank"]); $account->code_banque = $_POST["code_banque"]; @@ -95,6 +96,7 @@ 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->bank = trim($_POST["bank"]); $account->code_banque = $_POST["code_banque"]; @@ -156,7 +158,7 @@ if ($_GET["action"] == 'create') if ($message) { print "$message
\n"; } - print '
'; + print ''; print ''; print ''; @@ -190,10 +192,9 @@ if ($_GET["action"] == 'create') print ''; print ''.$langs->trans("Date").''; - print ''; $now=time(); - print '/'; - print '/'; - print ''; + print ''; + $html=new Form($db); + $html->select_date(time(), 're', 0, 0, 0, 'createbankaccount'); print ''; print ''.$langs->trans("IfBankAccount").'...'; @@ -221,12 +222,15 @@ if ($_GET["action"] == 'create') print ""; print ''.$langs->trans("BankAccountOwner").''; - print ''; + print ''; print ''.$langs->trans("BankAccountOwnerAddress").''; print ""; + print ''.$langs->trans("Web").''; + print ''; + print ''; print '
'; print ''; @@ -320,6 +324,10 @@ else print nl2br($account->adresse_proprio); print "\n"; } + + print ''.$langs->trans("Web").''; + print ''.$account->url.''; + print "\n"; print ''; @@ -433,6 +441,11 @@ else print ""; + + print ''.$langs->trans("Web").''; + print ''; + print ''; + } print ''; diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql index d43bac4a9ef..3d378c48229 100644 --- a/mysql/migration/2.0.0-2.1.0.sql +++ b/mysql/migration/2.0.0-2.1.0.sql @@ -290,6 +290,7 @@ insert into llx_c_pays (rowid,code,libelle) values (30, 'SG', 'Singapoure'); alter table llx_bank_account add column ref varchar(12) NOT NULL; +alter table llx_bank_account add column url varchar(128); alter table llx_accountingsystem_det rename to llx_accountingaccount; diff --git a/mysql/tables/llx_bank_account.sql b/mysql/tables/llx_bank_account.sql index ef286113828..5613eaf8e64 100644 --- a/mysql/tables/llx_bank_account.sql +++ b/mysql/tables/llx_bank_account.sql @@ -45,5 +45,6 @@ create table llx_bank_account courant smallint DEFAULT 0 NOT NULL, clos smallint DEFAULT 0 NOT NULL, rappro smallint DEFAULT 1, + url varchar(128), account_number varchar(8) )type=innodb;