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;
|
||||
|
||||
|
@@ -39,6 +39,10 @@
|
||||
<td>Payments Received to Date</td>
|
||||
<td class="bold-right"><?php echo $io->payments_total(TRUE); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Credits Applied to Date</td>
|
||||
<td class="bold-right"><?php echo $io->credits_total(TRUE); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Charges Due This Invoice</td>
|
||||
<td class="bold-right"><?php echo $io->due(TRUE); ?></td>
|
||||
|
Reference in New Issue
Block a user