amlioration des requtes et transformation des virgules en point pour les montants
This commit is contained in:
parent
01133206cc
commit
4e586f5d67
@ -68,7 +68,7 @@ class Account
|
||||
Function add_url_line($line_id, $url_id, $url, $label)
|
||||
{
|
||||
$sql = "INSERT INTO llx_bank_url (fk_bank, url_id, url, label)";
|
||||
$sql .= " VALUES ($line_id, $url_id, '$url', '$label')";
|
||||
$sql .= " VALUES ('$line_id', '$url_id', '$url', '$label')";
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
@ -141,14 +141,15 @@ class Account
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author, num_chq,fk_account, fk_type)";
|
||||
$sql .= " VALUES (now(), $date, '$label', $amount,'$author','$num_chq', $this->rowid, '$oper')";
|
||||
$sql .= " VALUES (now(), '$date', '$label', '" . ereg_replace(",",".",$amount) . "','$author','$num_chq', '$this->rowid', '$oper')";
|
||||
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
$rowid = $this->db->last_insert_id();
|
||||
if ($categorie)
|
||||
{
|
||||
$sql = "INSERT INTO llx_bank_class (lineid, fk_categ) VALUES ($rowid, $categorie)";
|
||||
$sql = "INSERT INTO llx_bank_class (lineid, fk_categ) VALUES ('$rowid', '$categorie')";
|
||||
$result = $this->db->query($sql);
|
||||
if ($result){
|
||||
return $rowid;
|
||||
@ -181,7 +182,7 @@ class Account
|
||||
if ( $this->update() )
|
||||
{
|
||||
$sql = "INSERT INTO llx_bank (datec, label, amount, fk_account,datev,dateo,fk_type,rappro) ";
|
||||
$sql .= " VALUES (now(),'Solde',$this->solde,$this->id,'".$this->db->idate($this->date_solde)."','".$this->db->idate($this->date_solde)."','SOLD',1);";
|
||||
$sql .= " VALUES (now(),'Solde','" . ereg_replace(",",".",$this->solde) . "','$this->id','".$this->db->idate($this->date_solde)."','".$this->db->idate($this->date_solde)."','SOLD',1);";
|
||||
|
||||
$this->db->query($sql);
|
||||
}
|
||||
|
||||
@ -54,12 +54,12 @@ if ($HTTP_POST_VARS["action"] == 'add' && $_GET["account"])
|
||||
if ($num_chq)
|
||||
{
|
||||
$sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author, num_chq,fk_account, fk_type)";
|
||||
$sql .= " VALUES (now(), $dateop, '$label', $amount,'$author',$num_chq,$account,'$operation')";
|
||||
$sql .= " VALUES (now(), '$dateop', '$label', '$amount','$author','$num_chq','$account','$operation')";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account,fk_type)";
|
||||
$sql .= " VALUES (now(), $dateop, '$label', $amount,'$author',$account,'$operation')";
|
||||
$sql .= " VALUES (now(), '$dateop', '$label', '$amount','$author','$account','$operation')";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
@ -28,6 +28,7 @@ require("./pre.inc.php");
|
||||
if (!$user->rights->banque->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
||||
if (! strlen($_GET["num"]))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user