From 051a13bb17ad71392ec9ae2afb266b0dbeedaf9f Mon Sep 17 00:00:00 2001 From: Lillem4n Date: Wed, 16 Nov 2011 17:14:49 +0100 Subject: [PATCH] Fixed bug when setting bill to paid status --- classes/model/bill.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/model/bill.php b/classes/model/bill.php index 4ec22b0..96810a3 100644 --- a/classes/model/bill.php +++ b/classes/model/bill.php @@ -94,7 +94,7 @@ public function pay($date = FALSE) if ($date === FALSE) $date = date('Y-m-d', time()); $this->pdo->query('UPDATE bills SET paid_date = \''.date('Y-m-d', strtotime($date)).'\' WHERE id = '.$this->pdo->quote($this->id)); - $this->pdo->query('UPDATE transactions SET transfer_date = \''.date('Y-m-d', strtotime($date)).'\' WHERE description = \'Bill '.$this->pdo->quote($this->id).'\';'); + $this->pdo->query('UPDATE transactions SET transfer_date = \''.date('Y-m-d', strtotime($date)).'\' WHERE description = \'Bill '.intval($this->id).'\';'); return TRUE; }