Rework service, change module_method configuration

This commit is contained in:
Deon George
2013-06-04 21:50:41 +10:00
parent 1a40f95b30
commit 951845f6c6
35 changed files with 780 additions and 1022 deletions

View File

@@ -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;
}
}
?>