From 8bda7c2cb04e7245247937c87649d52c220065c7 Mon Sep 17 00:00:00 2001 From: abijah Date: Fri, 2 Oct 2009 15:40:54 +0000 Subject: [PATCH] Added the updateLeaseCount call to the customer update function. Most of the time it will not be necessary, but the purpose of update() is to ensure the customer info is current, so we're obligated to call it. git-svn-id: file:///svn-source/pmgr/tags/v0.1.0@863 97e9348a-65ac-dc4b-aefc-98561f571b83 --- site/models/customer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/models/customer.php b/site/models/customer.php index 22a1055..efaeb19 100644 --- a/site/models/customer.php +++ b/site/models/customer.php @@ -247,10 +247,10 @@ class Customer extends AppModel { return; } - // REVISIT : 20090812 - // updateLeaseCount is handled directly when needed. - // Should we simplify by just doing it anyway? - //$this->updateLeaseCount($id); + // updateLeaseCount is typically handled directly when needed. + // However, this function is used to _ensure_ customer info is + // current, so we're obligated to call it anyway. + $this->updateLeaseCount($id); $current_leases = $this->find('all',