Overhauled export, and other minor updates
This commit is contained in:
@@ -84,6 +84,19 @@ class Model_Invoice_Item extends ORM_OSB {
|
||||
return Currency::round($result);
|
||||
}
|
||||
|
||||
public function tax_items() {
|
||||
$result = array();
|
||||
|
||||
foreach ($this->invoice_item_tax->find_all() as $iit) {
|
||||
if (! isset($result[$iit->tax_id]))
|
||||
$result[$iit->tax_id] = 0;
|
||||
|
||||
$result[$iit->tax_id] += $iit->amount;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
// This total of this item before discounts and taxes
|
||||
public function subtotal() {
|
||||
return Currency::round($this->price_base*$this->quantity);
|
||||
|
Reference in New Issue
Block a user