Correction erreur lorsque pas de compte bancaires définit

This commit is contained in:
Rodolphe Quiedeville 2003-08-04 18:06:12 +00:00
parent ebbace6389
commit f736c3bff0

View File

@ -50,6 +50,8 @@ class Account
*/ */
Function addline($date, $oper, $label, $amount, $num_chq="") Function addline($date, $oper, $label, $amount, $num_chq="")
{
if ($this->rowid)
{ {
switch ($oper) switch ($oper)
{ {
@ -76,7 +78,6 @@ class Account
break; break;
} }
$sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author, num_chq,fk_account, fk_type)"; $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', $amount,'$author','$num_chq', $this->rowid, '$oper')";
@ -90,6 +91,7 @@ class Account
print "<br>$sql"; print "<br>$sql";
} }
} }
}
Function create() Function create()
{ {