More work on invoice

This commit is contained in:
Deon George
2013-02-09 23:40:18 +11:00
parent 96a13548f1
commit 97d894d472
4 changed files with 14 additions and 33 deletions

View File

@@ -33,18 +33,9 @@ class Model_Invoice extends ORM_OSB implements Cartable {
'due_date'=>array(
array('Config::date',array(':value')),
),
'billed_amt'=>array(
array('Currency::display',array(':value')),
),
'credit_amt'=>array(
array('Currency::display',array(':value')),
),
'status'=>array(
array('StaticList_YesNo::display',array(':value')),
),
'total_amt'=>array(
array('Currency::display',array(':value')),
),
);
// Items belonging to an invoice

View File

@@ -11,8 +11,6 @@
* @license http://dev.osbill.net/license.html
*/
class Model_Invoice_Item extends ORM_OSB {
protected $_updated_column = FALSE; // @todo No update columns
// Relationships
protected $_belongs_to = array(
'product'=>array(),
@@ -82,7 +80,7 @@ class Model_Invoice_Item extends ORM_OSB {
// @todo This shouldnt be required.
if (! $result)
$result += round($this->subtotal() *.1,2);
$result += round($this->price_base*$this->quantity*.1,2);
return Currency::round($result);
}