Added Revenue information
This commit is contained in:
@@ -13,6 +13,7 @@ class ADSL_Billing_Exetelvisp {
|
||||
private $data = NULL;
|
||||
private $data_exception = NULL;
|
||||
private $exception = array();
|
||||
private $excess = 0;
|
||||
private $total = 0;
|
||||
|
||||
public function excess($service) {
|
||||
@@ -56,6 +57,7 @@ class ADSL_Billing_Exetelvisp {
|
||||
if ($cost != $this->charge($service))
|
||||
$this->exception[$service]['info'] = 'Charging difference: '.Currency::display($cost-$this->charge($service));
|
||||
|
||||
$this->excess += $this->excess($service);
|
||||
$this->total += $this->charge($service);
|
||||
}
|
||||
}
|
||||
@@ -151,8 +153,11 @@ class ADSL_Billing_Exetelvisp {
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function total($format=FALSE) {
|
||||
public function totalcharge($format=FALSE) {
|
||||
return $format ? Currency::display($this->total) : $this->total;
|
||||
}
|
||||
public function totalexcess($format=FALSE) {
|
||||
return $format ? Currency::display($this->excess) : $this->excess;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user