Fixes for export
This commit is contained in:
@@ -117,6 +117,19 @@ class Model_Invoice extends ORMOSB {
|
||||
return $format ? Currency::display($result) : Currency::round($result);
|
||||
}
|
||||
|
||||
public function credits() {
|
||||
return array($this);
|
||||
}
|
||||
|
||||
public function credits_total($format=FALSE) {
|
||||
$result = 0;
|
||||
|
||||
foreach ($this->credits() as $po)
|
||||
$result += $po->credit_amt;
|
||||
|
||||
return $format ? Currency::display($result) : Currency::round($result);
|
||||
}
|
||||
|
||||
public function discount($format=FALSE) {
|
||||
$result = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user