Some cleanup, setup improvements and other misc items
This commit is contained in:
@@ -657,7 +657,7 @@ class Model_Invoice extends ORM_OSB implements Cartable {
|
||||
static $result = array();
|
||||
|
||||
if (! $result)
|
||||
foreach ($this->_where_active()->_where_unprocessed()->find_all() as $io)
|
||||
foreach ($this->_where_active()->_where_unprocessed()->where_authorised()->find_all() as $io)
|
||||
if ($io->due())
|
||||
array_push($result,$io);
|
||||
|
||||
@@ -713,12 +713,12 @@ class Model_Invoice extends ORM_OSB implements Cartable {
|
||||
public function list_due($time=NULL) {
|
||||
$result = array();
|
||||
|
||||
if (is_null($time))
|
||||
$time = time();
|
||||
|
||||
foreach ($this->_list_due() as $io)
|
||||
if (is_null($time) OR $io->due_date > time())
|
||||
if (is_null($time))
|
||||
array_push($result,$io);
|
||||
elseif ($io->due_date <= $time)
|
||||
array_push($result,$io);
|
||||
if ($io->due_date > $time)
|
||||
array_push($result,$io);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user