Improved User Welcome

This commit is contained in:
Deon George
2013-05-28 21:35:54 +10:00
parent d4a2ace403
commit e8ed74549a
9 changed files with 75 additions and 13 deletions

View File

@@ -620,6 +620,15 @@ class Model_Invoice extends ORM_OSB implements Cartable {
return $result;
}
public function list_due_total($format=FALSE,$time=NULL) {
$result = 0;
foreach ($this->list_due($time) as $io)
$result += $io->due();
return $format ? Currency::display($result) : Currency::round($result);
}
/**
* Return a list of invoices that need to be sent.
* @todo This should be optimised a little to return only invoices to send, instead of looking for them.