Rework service, change module_method configuration
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
class Model_Charge extends ORM_OSB {
|
||||
// Charge doesnt use the update column
|
||||
protected $_updated_column = FALSE;
|
||||
|
||||
protected $_serialize_column = array(
|
||||
'attributes',
|
||||
);
|
||||
@@ -41,5 +42,14 @@ class Model_Charge extends ORM_OSB {
|
||||
throw new Kohana_Exception('Unkown detail request :type',array(':type'=>$type));
|
||||
}
|
||||
}
|
||||
|
||||
public function total($format=FALSE) {
|
||||
$result = $this->quantity * $this->amount;
|
||||
|
||||
if ($this->taxable)
|
||||
$result = Tax::add($result);
|
||||
|
||||
return $format ? Currency::display($result) : $result;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user