From 3a8e222bd1812b7af6c87346086e6362c8a1da3f Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 21 Jul 2003 13:04:59 +0000 Subject: [PATCH] Modif dans addline --- htdocs/compta/bank/account.class.php | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php index 492a2ea830b..23cf23ee21a 100644 --- a/htdocs/compta/bank/account.class.php +++ b/htdocs/compta/bank/account.class.php @@ -51,8 +51,34 @@ class Account Function addline($date, $oper, $label, $amount, $num_chq="") { + switch ($oper) + { + case 1: + $oper = 'TIP'; + break; + case 2: + $oper = 'VIR'; + break; + case 3: + $oper = 'PRE'; + break; + case 4: + $oper = 'LIQ'; + break; + case 5: + $oper = 'WWW'; + break; + case 6: + $oper = 'CB'; + break; + case 7: + $oper = 'CHQ'; + break; + } + + $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, '$operation')"; + $sql .= " VALUES (now(), $date, '$label', $amount,'$author','$num_chq', $this->rowid, '$oper')"; if ($this->db->query($sql)) {