diff --git a/application/classes/Site.php b/application/classes/Site.php index 59254222..67efc269 100644 --- a/application/classes/Site.php +++ b/application/classes/Site.php @@ -13,8 +13,8 @@ class Site extends lnApp_Site { /** * Show a date using a site configured format */ - public static function Date($date) { - return (is_null($date) OR ! $date) ? '' : date(Company::instance()->date_format(),$date); + public static function Date($date,$format='') { + return (is_null($date) OR ! $date) ? '' : date(($format ? $format : Company::instance()->date_format()),$date); } /** diff --git a/includes/tcpdf/fonts/README.TXT b/includes/tcpdf/fonts/README.TXT old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/ZarBold.ctg.z b/includes/tcpdf/fonts/ZarBold.ctg.z old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/ZarBold.z b/includes/tcpdf/fonts/ZarBold.z old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/almohanad.ctg.z b/includes/tcpdf/fonts/almohanad.ctg.z old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/almohanad.php b/includes/tcpdf/fonts/almohanad.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/almohanad.z b/includes/tcpdf/fonts/almohanad.z old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/arialunicid0.php b/includes/tcpdf/fonts/arialunicid0.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/courier.php b/includes/tcpdf/fonts/courier.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/helvetica.php b/includes/tcpdf/fonts/helvetica.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/helveticab.php b/includes/tcpdf/fonts/helveticab.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/helveticabi.php b/includes/tcpdf/fonts/helveticabi.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/helveticai.php b/includes/tcpdf/fonts/helveticai.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/hysmyeongjostdmedium.php b/includes/tcpdf/fonts/hysmyeongjostdmedium.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/kozgopromedium.php b/includes/tcpdf/fonts/kozgopromedium.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/kozminproregular.php b/includes/tcpdf/fonts/kozminproregular.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/msungstdlight.php b/includes/tcpdf/fonts/msungstdlight.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/stsongstdlight.php b/includes/tcpdf/fonts/stsongstdlight.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/symbol.php b/includes/tcpdf/fonts/symbol.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/times.php b/includes/tcpdf/fonts/times.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/timesb.php b/includes/tcpdf/fonts/timesb.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/timesbi.php b/includes/tcpdf/fonts/timesbi.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/timesi.php b/includes/tcpdf/fonts/timesi.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/uni2cid_ac15.php b/includes/tcpdf/fonts/uni2cid_ac15.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/uni2cid_ag15.php b/includes/tcpdf/fonts/uni2cid_ag15.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/uni2cid_aj16.php b/includes/tcpdf/fonts/uni2cid_aj16.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/uni2cid_ak12.php b/includes/tcpdf/fonts/uni2cid_ak12.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/README.TXT b/includes/tcpdf/fonts/utils/README.TXT old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1250.map b/includes/tcpdf/fonts/utils/enc/cp1250.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1251.map b/includes/tcpdf/fonts/utils/enc/cp1251.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1252.map b/includes/tcpdf/fonts/utils/enc/cp1252.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1253.map b/includes/tcpdf/fonts/utils/enc/cp1253.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1254.map b/includes/tcpdf/fonts/utils/enc/cp1254.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1255.map b/includes/tcpdf/fonts/utils/enc/cp1255.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1257.map b/includes/tcpdf/fonts/utils/enc/cp1257.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp1258.map b/includes/tcpdf/fonts/utils/enc/cp1258.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/cp874.map b/includes/tcpdf/fonts/utils/enc/cp874.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-1.map b/includes/tcpdf/fonts/utils/enc/iso-8859-1.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-11.map b/includes/tcpdf/fonts/utils/enc/iso-8859-11.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-15.map b/includes/tcpdf/fonts/utils/enc/iso-8859-15.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-16.map b/includes/tcpdf/fonts/utils/enc/iso-8859-16.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-2.map b/includes/tcpdf/fonts/utils/enc/iso-8859-2.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-4.map b/includes/tcpdf/fonts/utils/enc/iso-8859-4.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-5.map b/includes/tcpdf/fonts/utils/enc/iso-8859-5.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-7.map b/includes/tcpdf/fonts/utils/enc/iso-8859-7.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/iso-8859-9.map b/includes/tcpdf/fonts/utils/enc/iso-8859-9.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/koi8-r.map b/includes/tcpdf/fonts/utils/enc/koi8-r.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/enc/koi8-u.map b/includes/tcpdf/fonts/utils/enc/koi8-u.map old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/freetype6.dll b/includes/tcpdf/fonts/utils/freetype6.dll old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/makeallttffonts.php b/includes/tcpdf/fonts/utils/makeallttffonts.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/makefont.php b/includes/tcpdf/fonts/utils/makefont.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/pfm2afm b/includes/tcpdf/fonts/utils/pfm2afm old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/pfm2afm.exe b/includes/tcpdf/fonts/utils/pfm2afm.exe deleted file mode 100755 index 25c21fa1..00000000 Binary files a/includes/tcpdf/fonts/utils/pfm2afm.exe and /dev/null differ diff --git a/includes/tcpdf/fonts/utils/src/pfm2afm-src.tar.gz b/includes/tcpdf/fonts/utils/src/pfm2afm-src.tar.gz old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/src/readme.txt b/includes/tcpdf/fonts/utils/src/readme.txt old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/src/ttf2ufm-src.tar.gz b/includes/tcpdf/fonts/utils/src/ttf2ufm-src.tar.gz old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/ttf2ufm b/includes/tcpdf/fonts/utils/ttf2ufm old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/utils/ttf2ufm.exe b/includes/tcpdf/fonts/utils/ttf2ufm.exe deleted file mode 100755 index 07751055..00000000 Binary files a/includes/tcpdf/fonts/utils/ttf2ufm.exe and /dev/null differ diff --git a/includes/tcpdf/fonts/utils/zlib1.dll b/includes/tcpdf/fonts/utils/zlib1.dll old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/zapfdingbats.php b/includes/tcpdf/fonts/zapfdingbats.php old mode 100755 new mode 100644 diff --git a/includes/tcpdf/fonts/zarbold.php b/includes/tcpdf/fonts/zarbold.php old mode 100755 new mode 100644 diff --git a/modules/adsl/classes/Model/ADSL/Plan.php b/modules/adsl/classes/Model/ADSL/Plan.php new file mode 100644 index 00000000..2cc597cc --- /dev/null +++ b/modules/adsl/classes/Model/ADSL/Plan.php @@ -0,0 +1,64 @@ + array('model'=>'ADSL_Supplier_Plan','foreign_key'=>'adsl_supplier_plan_id'), + ); + + protected $_sorting = array( + ); + + protected $_form = array('id'=>'id','value'=>'name()'); + + /** + * Filters used to format the display of values into friendlier values + */ + protected $_display_filters = array( + 'extra_down_peak'=>array( + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), + ), + 'extra_down_offpeak'=>array( + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), + ), + 'extra_up_peak'=>array( + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), + ), + 'extra_up_offpeak'=>array( + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), + ), + ); + + // Map the table fields + private $_map = array( + ); + + private $_metrics = array( + ); + + /** + * ADSL Plan Name + */ + public function name($variable=NULL) { + } + + /** + * Collapse our traffic data into an array as per $this->_metric + */ + public function traffic_data() { + } +} +?> diff --git a/modules/adsl/classes/Task/Adsl/Trafficcharge.php b/modules/adsl/classes/Task/Adsl/Trafficcharge.php index b8605c54..87884140 100644 --- a/modules/adsl/classes/Task/Adsl/Trafficcharge.php +++ b/modules/adsl/classes/Task/Adsl/Trafficcharge.php @@ -37,6 +37,7 @@ class Task_Adsl_Trafficcharge extends Minion_Task { $co->sweep_type = 6; $co->account_id = $so->account_id; + $co->active = TRUE; $co->service_id = $so->id; $co->amount = $cost[$k]; $co->taxable = $so->product->taxable; diff --git a/modules/adsl/classes/Task/Adsl/Trafficget.php b/modules/adsl/classes/Task/Adsl/Trafficget.php index df08b4a4..4255ef3d 100644 --- a/modules/adsl/classes/Task/Adsl/Trafficget.php +++ b/modules/adsl/classes/Task/Adsl/Trafficget.php @@ -14,7 +14,7 @@ class Task_Adsl_Trafficget extends Minion_Task { 'verbose'=>FALSE, ); - protected function _traffic_suppliers($active=FALSE) { + protected function _traffic_suppliers($active=TRUE) { $suppliers = ORM::factory('ADSL_Supplier'); return $active ? $suppliers->list_active() : $suppliers->find_all(); diff --git a/modules/charge/classes/Controller/Reseller/Charge.php b/modules/charge/classes/Controller/Reseller/Charge.php index ffb0a11a..2d02b358 100644 --- a/modules/charge/classes/Controller/Reseller/Charge.php +++ b/modules/charge/classes/Controller/Reseller/Charge.php @@ -56,6 +56,10 @@ class Controller_Reseller_Charge extends Controller_Charge { $this->meta->title = $co->loaded() ? sprintf('Charge: %s (%s)',$co->name(),$co->account->name()) : 'New Charge'; + // New charges + if (! $co->loaded()) + $co->active = TRUE; + if ($this->request->post() AND $co->values($this->request->post())->changed() AND (! $this->save($co))) $co->reload(); diff --git a/modules/domain/views/service/user/plugin/domain/view.php b/modules/domain/views/service/user/plugin/domain/view.php index fd61b6fd..ea266174 100644 --- a/modules/domain/views/service/user/plugin/domain/view.php +++ b/modules/domain/views/service/user/plugin/domain/view.php @@ -6,11 +6,13 @@