Local fixes to invoice display and retrieve traffic data

This commit is contained in:
Deon George
2011-08-02 16:48:41 +10:00
parent 41eec89afa
commit 5953e28f22
9 changed files with 1039 additions and 15 deletions

View File

@@ -16,5 +16,18 @@ class Model_Charge extends ORMOSB {
'Currency::display',array(':value')
),
);
/**
* Render some details for specific calls, eg: invoice
*/
public function details($type) {
switch ($type) {
case 'invoice':
return sprintf('%s (%s@%s)',$this->description,$this->quantity,Currency::display($this->amount));
default:
throw new Kohana_Exception('Unkown detail request :type',array(':type'=>$type));
}
}
}
?>