Local fixes to invoice display and retrieve traffic data
This commit is contained in:
@@ -195,10 +195,13 @@ class Model_Service_ADSL extends Model_Service {
|
||||
return $this->traffic_month(strtotime('yesterday'),$string);
|
||||
}
|
||||
|
||||
public function traffic_lastmonth_exceed($all=FALSE) {
|
||||
public function traffic_lastmonth_exceed($all=FALSE,$date=NULL) {
|
||||
$return = array();
|
||||
|
||||
foreach ($this->traffic_month(strtotime('last month'),FALSE) as $k => $v) {
|
||||
if (is_null($date))
|
||||
$date = strtotime('last month');
|
||||
|
||||
foreach ($this->traffic_month($date,FALSE) as $k => $v) {
|
||||
// We shouldnt need to eval for nulls, since the traffic calc does that
|
||||
if ($all OR ($v > $this->adsl_plan->$k)) {
|
||||
$return[$k]['allowance'] = $this->adsl_plan->$k;
|
||||
@@ -351,7 +354,7 @@ class Model_Service_ADSL extends Model_Service {
|
||||
case 'invoice':
|
||||
return array(
|
||||
_('Service Address')=>$this->display('service_address'),
|
||||
_('Contact Until')=>$this->contract_date_end(),
|
||||
_('Contract Until')=>$this->contract_date_end(),
|
||||
);
|
||||
break;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user