Fixes to invoice display
This commit is contained in:
@@ -79,7 +79,19 @@ class Model_Charge extends ORM_OSB implements Invoicable {
|
||||
}
|
||||
|
||||
public function invoice_item($item_type) {
|
||||
return sprintf('%s %s',StaticList_ItemType::get($item_type),$this->display('date_charge'));
|
||||
switch ($item_type) {
|
||||
case 5:
|
||||
return sprintf('%s (%s x %s%s%s) %s',
|
||||
StaticList_ItemType::get($item_type),
|
||||
$this->quantity,
|
||||
$this->display('amount'),
|
||||
($this->description ? ' '.$this->description : ''),
|
||||
($this->attributes ? ' ['.join('|',$this->attributes).']' : ''),
|
||||
$this->display('date_charge'));
|
||||
|
||||
default:
|
||||
return sprintf('%s %s',StaticList_ItemType::get($item_type),$this->display('date_charge')).($this->description ? ' ('.$this->description.')' : '');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user