Skip to content

Commit

Permalink
Fixed bug when setting bill to paid status
Browse files Browse the repository at this point in the history
  • Loading branch information
lillem4n committed Nov 16, 2011
1 parent 50967c6 commit 051a13b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/model/bill.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 051a13b

Please sign in to comment.