Some cleanup, setup improvements and other misc items
This commit is contained in:
@@ -13,6 +13,9 @@ class Model_Charge extends ORM_OSB {
|
||||
protected $_belongs_to = array(
|
||||
'account'=>array(),
|
||||
);
|
||||
protected $_has_one = array(
|
||||
'invoice_item'=>array('far_key'=>'id'),
|
||||
);
|
||||
|
||||
protected $_nullifempty = array(
|
||||
'attributes',
|
||||
@@ -23,14 +26,23 @@ class Model_Charge extends ORM_OSB {
|
||||
);
|
||||
|
||||
protected $_display_filters = array(
|
||||
'amount'=>array(
|
||||
array('Currency::display',array(':value')),
|
||||
),
|
||||
'date_orig'=>array(
|
||||
array('Config::date',array(':value')),
|
||||
),
|
||||
'date_charge'=>array(
|
||||
array('Config::date',array(':value')),
|
||||
),
|
||||
'amount'=>array(
|
||||
array('Currency::display',array(':value')),
|
||||
'processed'=>array(
|
||||
array('StaticList_YesNo::get',array(':value')),
|
||||
),
|
||||
'sweep_type'=>array(
|
||||
array('StaticList_SweepType::get',array(':value')),
|
||||
),
|
||||
'void'=>array(
|
||||
array('StaticList_YesNo::get',array(':value')),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -47,6 +59,10 @@ class Model_Charge extends ORM_OSB {
|
||||
}
|
||||
}
|
||||
|
||||
public function processed($render=FALSE) {
|
||||
return $this->label_bool('processed',$render);
|
||||
}
|
||||
|
||||
public function total($format=FALSE) {
|
||||
$result = $this->quantity * $this->amount;
|
||||
|
||||
|
Reference in New Issue
Block a user