diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php index 17049e6d07e..dd57e801118 100644 --- a/htdocs/compta/bank/account.class.php +++ b/htdocs/compta/bank/account.class.php @@ -34,6 +34,8 @@ class Account var $cle_rib; var $bic; var $iban_prefix; + var $proprio; + var $adresse_proprio; Function Account($DB, $rowid=0) { @@ -213,10 +215,12 @@ class Account $sql .= ",number='".$this->number."'"; $sql .= ",cle_rib='".$this->cle_rib."'"; $sql .= ",bic='".$this->bic."'"; + $sql .= ",iban_prefix = '".$this->iban_prefix."'"; $sql .= ",domiciliation='".$this->domiciliation."'"; + $sql .= ",proprio = '".$this->proprio."'"; + $sql .= ",adresse_proprio = '".$this->adresse_proprio."'"; $sql .= ",courant = ".$this->courant; $sql .= ",clos = ".$this->clos; - $sql .= ",iban_prefix = '".$this->iban_prefix."'"; $sql .= " WHERE rowid = $this->id"; @@ -243,7 +247,7 @@ class Account Function fetch($id) { $this->id = $id; - $sql = "SELECT rowid, label, bank, number, courant, clos, code_banque,code_guichet,cle_rib,bic,iban_prefix,domiciliation FROM ".MAIN_DB_PREFIX."bank_account"; + $sql = "SELECT rowid, label, bank, number, courant, clos, code_banque, code_guichet, cle_rib, bic, iban_prefix, domiciliation, proprio, adresse_proprio FROM ".MAIN_DB_PREFIX."bank_account"; $sql .= " WHERE rowid = ".$id; $result = $this->db->query($sql); @@ -263,8 +267,10 @@ class Account $this->number = $obj->number; $this->cle_rib = $obj->cle_rib; $this->bic = $obj->bic; - $this->domiciliation = $obj->domiciliation; $this->iban_prefix = $obj->iban_prefix; + $this->domiciliation = $obj->domiciliation; + $this->proprio = $obj->proprio; + $this->adresse_proprio = $obj->adresse_proprio; } $this->db->free(); } diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index 0ccff3b8e32..3fd3dd93e06 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -34,8 +34,10 @@ if ($HTTP_POST_VARS["action"] == 'add') $account->bank = $HTTP_POST_VARS["bank"]; $account->label = $HTTP_POST_VARS["label"]; + $account->courant = $HTTP_POST_VARS["courant"]; $account->clos = $HTTP_POST_VARS["clos"]; + $account->code_banque = $HTTP_POST_VARS["code_banque"]; $account->code_guichet = $HTTP_POST_VARS["code_guichet"]; $account->number = $HTTP_POST_VARS["number"]; @@ -43,6 +45,10 @@ if ($HTTP_POST_VARS["action"] == 'add') $account->bic = $HTTP_POST_VARS["bic"]; $account->iban_prefix = $HTTP_POST_VARS["iban_prefix"]; $account->domiciliation = $HTTP_POST_VARS["domiciliation"]; + + $account->proprio = $HTTP_POST_VARS["proprio"]; + $account->adresse_proprio = $HTTP_POST_VARS["adresse_proprio"]; + $account->solde = $HTTP_POST_VARS["solde"]; $account->date_solde = mktime(12,0,0,$HTTP_POST_VARS["remonth"],$HTTP_POST_VARS["reday"],$HTTP_POST_VARS["reyear"]); @@ -67,6 +73,10 @@ if ($action == 'update') $account->bic = $HTTP_POST_VARS["bic"]; $account->iban_prefix = $HTTP_POST_VARS["iban_prefix"]; $account->domiciliation = $HTTP_POST_VARS["domiciliation"]; + + $account->proprio = $HTTP_POST_VARS["proprio"]; + $account->adresse_proprio = $HTTP_POST_VARS["adresse_proprio"]; + $account->update($id, $user); } @@ -82,7 +92,7 @@ if ($action == 'create') { print_titre("Nouveau compte bancaire"); - print '

'; + print ''; print ''; print ''; @@ -111,8 +121,14 @@ if ($action == 'create') print '