Skip to content
Snippets Groups Projects
Commit fc01bfe0 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Save of conciliate account option

parent aeef986c
No related branches found
No related tags found
No related merge requests found
......@@ -103,7 +103,7 @@ class Account extends CommonObject
* \param line_id Id ecriture bancaire
* \param url_id Id parametre url
* \param url Url
* \param label Libell du lien
* \param label Libell� du lien
* \param type Type de lien (payment, company, member, ...)
* \return int <0 si ko, id line si ok
*/
......@@ -127,7 +127,7 @@ class Account extends CommonObject
/**
* \brief Renvoi tableau des liens
* \param line_id Id ligne criture
* \param line_id Id ligne �criture
* \retuen array Tableau des liens
*/
function get_url($line_id)
......@@ -146,7 +146,7 @@ class Account extends CommonObject
while ($i < $num)
{
$obj = $this->db->fetch_object($result);
// Anciens liens (pour compatibilit)
// Anciens liens (pour compatibilit�)
$lines[$i][0] = $obj->url;
$lines[$i][1] = $obj->url_id;
$lines[$i][2] = $obj->label;
......@@ -164,16 +164,16 @@ class Account extends CommonObject
/**
\brief Ajoute une entree dans la table ".MAIN_DB_PREFIX."bank
\param $date Date TMS opration
\param $date Date TMS op�ration
\param $oper 1,2,3,4...
\param $label Descripton
\param $amount Montant
\param $num_chq Numero cheque ou virement
\param $categorie Categorie optionnelle
\param $user Utilisateur qui cre
\param $user Utilisateur qui cr�e
\param $emetteur Nom emetteur
\param $banque Banque emettrice
\return int Rowid de l'entre ajoute, <0 si erreur
\return int Rowid de l'entr�e ajout�e, <0 si erreur
*/
function addline($date, $oper, $label, $amount, $num_chq='', $categorie='', $user, $emetteur='',$banque='')
{
......@@ -279,7 +279,7 @@ class Account extends CommonObject
require_once DOL_DOCUMENT_ROOT.'/lib/bank.lib.php';
if (! verif_rib($this->code_banque,$this->code_guichet,$this->number,$this->cle_rib,$this->iban_prefix)) {
$this->error="Le contrle de la cl indique que les informations de votre compte bancaire sont incorrectes.";
$this->error="Le controle de la cle indique que les informations de votre compte bancaire sont incorrectes.";
return 0;
}
......@@ -290,14 +290,14 @@ class Account extends CommonObject
}
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_account (";
$sql.= "datec, ref, label, account_number, currency_code,";
$sql.= "min_allowed, min_desired,";
$sql.= "datec, ref, label, account_number, currency_code, ";
$sql.= "rappro, 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.= "now(),'" . addslashes($this->ref) . "', '" . addslashes($this->label) . "', ";
$sql.= "'".addslashes($this->account_number) . "', '".$this->currency_code."', ";
$sql.= $this->rappro.", ".price2num($this->min_allowed).", ".price2num($this->min_desired).", ";
$sql.= "'".addslashes($this->comment)."'";
$sql.= ")";
dolibarr_syslog("Account::create sql=".$sql);
......@@ -400,7 +400,7 @@ class Account extends CommonObject
// Verification parametres
if (! verif_rib($this->code_banque,$this->code_guichet,$this->number,$this->cle_rib,$this->iban_prefix)) {
$this->error="Le contrle de la cl indique que les informations de votre compte bancaire sont incorrectes.";
$this->error="Le contr�le de la cl� indique que les informations de votre compte bancaire sont incorrectes.";
return 0;
}
......@@ -441,8 +441,8 @@ class Account extends CommonObject
/*
* \brief Charge un compte en memoire depuis la base
* \param id Id du compte rcuprer
* \param ref Ref du compte rcuprer
* \param id Id du compte � r�cup�rer
* \param ref Ref du compte � r�cup�rer
*/
function fetch($id,$ref='')
{
......@@ -527,8 +527,8 @@ class Account extends CommonObject
/**
* \brief Retourne le libell du statut d'une facture (brouillon, valide, abandonne, paye)
* \param mode 0=libell long, 1=libell court, 2=Picto + Libell court, 3=Picto, 4=Picto + Libell long
 
* \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto, 4=Picto + Libell� long
* \return string Libelle
*/
function getLibStatut($mode=0)
......@@ -537,10 +537,10 @@ class Account extends CommonObject
}
/**
* \brief Renvoi le libell d'un statut donn
* \brief Renvoi le libell� d'un statut donn�
* \param statut Id statut
* \param mode 0=libell long, 1=libell court, 2=Picto + Libell court, 3=Picto, 4=Picto + Libell long, 5=Libell court + Picto
* \return string Libell du statut
* \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto, 4=Picto + Libell� long, 5=Libell� court + Picto
* \return string Libell� du statut
*/
function LibStatut($statut,$mode=0)
{
......@@ -582,7 +582,7 @@ class Account extends CommonObject
/*
* \brief Renvoi si un compte peut etre supprimer ou non (sans mouvements)
* \return boolean vrai si peut etre supprim, faux sinon
* \return boolean vrai si peut etre supprim�, faux sinon
*/
function can_be_deleted()
{
......@@ -779,7 +779,7 @@ class AccountLine
/**
* \brief Charge en memoire depuis la base, une ecriture sur le compte
* \param id Id de la ligne criture rcuprer
* \param id Id de la ligne �criture � r�cup�rer
* \return int <0 if KO, >0 if OK
*/
function fetch($rowid)
......@@ -839,7 +839,7 @@ class AccountLine
if ($this->rappro)
{
// Protection pour eviter tout suppression d'une ligne consolide
// Protection pour eviter tout suppression d'une ligne consolid�e
$this->error="DeleteNotPossibleLineIsConsolidated";
return -1;
}
......@@ -940,7 +940,7 @@ class AccountLine
}
$this->date_creation = $obj->datec;
//$this->date_rappro = $obj->daterappro; // \todo pas encore gre
//$this->date_rappro = $obj->daterappro; // \todo pas encore g�r�e
}
$this->db->free($result);
}
......
......@@ -16,15 +16,13 @@
* 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$
*/
/**
\file htdocs/compta/bank/fiche.php
\ingroup banque
\brief Fiche cration compte bancaire
\version $Revision$
\brief Fiche creation compte bancaire
\version $Id$
*/
require("./pre.inc.php");
......@@ -48,7 +46,7 @@ if ($_POST["action"] == 'add')
$account->label = trim($_POST["label"]);
$account->courant = $_POST["type"];
$account->clos = $_POST["clos"];
$account->rappro = $_POST["norappro"]?1:0;
$account->rappro = (isset($_POST["norappro"]) && $_POST["norappro"])?0:1;
$account->url = $_POST["url"];
$account->account_number = trim($_POST["account_number"]);
......@@ -90,7 +88,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
$account->label = trim($_POST["label"]);
$account->courant = $_POST["type"];
$account->clos = $_POST["clos"];
$account->rappro = (isset($_POST["norappro"]) && $_POST["norappro"]=='on')?0:1;
$account->rappro = (isset($_POST["norappro"]) && $_POST["norappro"])?0:1;
$account->url = trim($_POST["url"]);
$account->bank = trim($_POST["bank"]);
......@@ -150,7 +148,7 @@ $form = new Form($db);
/* ************************************************************************** */
/* */
/* Affichage page en mode cration */
/* Affichage page en mode cration */
/* */
/* ************************************************************************** */
......@@ -217,7 +215,7 @@ if ($_GET["action"] == 'create')
// Comment
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
print '<td colspan="3">';
// diteur wysiwyg
// diteur wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING)
{
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
......@@ -456,7 +454,7 @@ else
// Comment
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
print '<td colspan="3">';
// diteur wysiwyg
// diteur wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING)
{
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment