From 20284046c3bc4c382cb94874b8ec09c51ba002b6 Mon Sep 17 00:00:00 2001 From: abijah Date: Sat, 17 Nov 2012 18:20:48 +0000 Subject: [PATCH] Fixed bug charging customers again when there is not charge through date. git-svn-id: file:///svn-source/pmgr/branches/v0.3_work@1019 97e9348a-65ac-dc4b-aefc-98561f571b83 --- site/models/lease.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/models/lease.php b/site/models/lease.php index b8bcab4..ab4966f 100644 --- a/site/models/lease.php +++ b/site/models/lease.php @@ -347,6 +347,8 @@ class Lease extends AppModel { $this->pr(17, compact('date', 'charge_through_date') + array('date_str' => date('Y-m-d', $date), 'charge_through_date_str' => date('Y-m-d', $charge_through_date))); + if (!$charge_through_date) + return $this->prReturn(null); if ($charge_through_date >= $date) return $this->prReturn(null);