Changed use of active to status

This commit is contained in:
Deon George
2012-08-01 22:43:33 +10:00
parent e4d600b8d0
commit 4220ade8ac
40 changed files with 123 additions and 145 deletions

View File

@@ -510,15 +510,11 @@ class Model_Invoice extends ORMOSB {
return $return;
}
private function _list_active() {
return ORM::factory('invoice')->where('status','=',1);
}
private function _list_due() {
static $result = array();
if (! $result)
foreach ($this->_list_active()->find_all() as $io)
foreach ($this->list_active() as $io)
if ($io->due())
array_push($result,$io);