Unknown updates from production

This commit is contained in:
Deon George 2018-06-13 21:34:58 +10:00
parent e412ca72d0
commit a27787e0d4
73 changed files with 103 additions and 14 deletions

View File

@ -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);
}
/**

0
includes/tcpdf/fonts/README.TXT Executable file → Normal file
View File

0
includes/tcpdf/fonts/ZarBold.ctg.z Executable file → Normal file
View File

0
includes/tcpdf/fonts/ZarBold.z Executable file → Normal file
View File

0
includes/tcpdf/fonts/almohanad.ctg.z Executable file → Normal file
View File

0
includes/tcpdf/fonts/almohanad.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/almohanad.z Executable file → Normal file
View File

0
includes/tcpdf/fonts/arialunicid0.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/courier.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/helvetica.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/helveticab.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/helveticabi.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/helveticai.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/hysmyeongjostdmedium.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/kozgopromedium.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/kozminproregular.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/msungstdlight.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/stsongstdlight.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/symbol.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/times.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/timesb.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/timesbi.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/timesi.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/uni2cid_ac15.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/uni2cid_ag15.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/uni2cid_aj16.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/uni2cid_ak12.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/README.TXT Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/cp1250.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/cp1251.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/cp1252.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/cp1253.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/cp1254.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/cp1255.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/cp1257.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/cp1258.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/cp874.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/iso-8859-1.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/iso-8859-11.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/iso-8859-15.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/iso-8859-16.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/iso-8859-2.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/iso-8859-4.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/iso-8859-5.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/iso-8859-7.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/iso-8859-9.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/koi8-r.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/enc/koi8-u.map Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/freetype6.dll Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/makeallttffonts.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/makefont.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/pfm2afm Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/src/pfm2afm-src.tar.gz Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/src/readme.txt Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/src/ttf2ufm-src.tar.gz Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/ttf2ufm Executable file → Normal file
View File

0
includes/tcpdf/fonts/utils/zlib1.dll Executable file → Normal file
View File

0
includes/tcpdf/fonts/zapfdingbats.php Executable file → Normal file
View File

0
includes/tcpdf/fonts/zarbold.php Executable file → Normal file
View File

View File

@ -0,0 +1,64 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class supports ADSL Plans
*
* @package ADSL
* @category Models
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Model_ADSL_Plan extends ORM {
// Relationships
protected $_belongs_to = array(
'supplier_plan' => 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() {
}
}
?>

View File

@ -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;

View File

@ -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();

View File

@ -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();

View File

@ -6,11 +6,13 @@
<dt>Domain Name</dt>
<dd><?php echo $o->name(); ?></dd>
<dt>Domain Expire</dt>
<dd><?php echo $o->display('domain_expire'); ?></dd>
<?php if (! $o->service->external_billing) : ?>
<dt>Domain Expire</dt>
<dd><?php echo $o->display('domain_expire'); ?></dd>
<dt>Domain Auth Password</dt>
<dd><?php echo ! $o->service->expiring() ? $o->display('registrar_auth_password') : 'EXPIRED'; ?></dd>
<dt>Domain Auth Password</dt>
<dd><?php echo ! $o->service->expiring() ? $o->display('registrar_auth_password') : 'EXPIRED'; ?></dd>
<?php endif ?>
<?php if ($x=$o->manage_button()) : ?>
<dt>Registrar</dt>

View File

@ -6,8 +6,10 @@
<dt>Domain Name</dt>
<dd><?php echo $o->name(); ?></dd>
<dt>Hosting Expire</dt>
<dd><?php echo $o->display('host_expire'); ?></dd>
<?php if (! $o->service->external_billing) : ?>
<dt>Hosting Expire</dt>
<dd><?php echo $o->display('host_expire'); ?></dd>
<?php endif ?>
<?php if ($x=$o->manage_button()) : ?>
<dt>Panel</dt>

View File

@ -41,7 +41,7 @@
<td colspan="2"><?php echo Form::checkbox("price_group[$k][show]",1,$o->is_price_shown($k),array('nocg'=>TRUE)); ?></td>
</tr>
<tr><th>&nbsp;</th><th>Setup</th><th>Base</th></tr>
<tr><th>&nbsp;</th><th>Base</th><th>Setup</th></tr>
<?php foreach (ORM::factory('Group')->list_pricegroups() as $go) : ?>
<tr>

View File

@ -78,6 +78,7 @@ class Model_Service extends ORM {
);
protected $_nullifempty = array(
'price',
'price_override',
);

View File

@ -5,7 +5,7 @@
echo View::factory('field/account')->set('data',['field'=>'account_id','value'=>$o->account_id,'text'=>'Account','name'=>'','ajaxurl'=>URL::link('admin','payment/ajaxlist')]);
echo View::factory('field/select')->set('data',['field'=>'active','value'=>StaticList_YesNo::table(),'text'=>'Active','default'=>$o->active,'class'=>'col-md-1']);
echo View::factory('field/select')->set('data',['field'=>'recur_schedule','value'=>StaticList_RecurSchedule::table(),'text'=>'Billing Period','default'=>$o->recur_schedule,'class'=>'col-md-2']);
echo View::factory('field/date')->set('data',['field'=>'data_next_invoice','value'=>$o->date_next_invoice ? $o->date_next_invoice : time(),'text'=>'Date Next Invoice','enddate'=>NULL]);
echo View::factory('field/date')->set('data',['field'=>'date_next_invoice','value'=>$o->date_next_invoice ? $o->date_next_invoice : time(),'text'=>'Date Next Invoice','enddate'=>NULL]);
echo View::factory('field/select')->set('data',['field'=>'taxable','value'=>StaticList_YesNo::table(),'text'=>'Taxable','default'=>is_null($o->taxable) ? TRUE : $o->taxable,'class'=>'col-md-1']);
echo View::factory('field/select')->set('data',['field'=>'suspend_billing','value'=>StaticList_YesNo::table(),'text'=>'Suspend Billing','default'=>$o->suspend_billing,'class'=>'col-md-1']);
echo View::factory('field/money')->set('data',['field'=>'price','value'=>$o->price,'text'=>'Price']);

View File

@ -4,9 +4,10 @@
<?php
echo View::factory('field/select')->set('data',['field'=>'active','value'=>StaticList_YesNo::table(),'text'=>'Active','default'=>$o->active,'class'=>'col-md-1']);
echo View::factory('field/select')->set('data',['field'=>'recur_schedule','value'=>StaticList_RecurSchedule::table(),'text'=>'Billing Period','default'=>$o->recur_schedule,'class'=>'col-md-2']);
echo View::factory('field/date')->set('data',['field'=>'data_next_invoice','value'=>$o->date_next_invoice,'text'=>'Date Next Invoice','enddate'=>NULL]);
echo View::factory('field/date')->set('data',['field'=>'date_next_invoice','value'=>is_null($o->date_next_invoice) ? time() : $o->date_next_invoice,'text'=>'Date Next Invoice','enddate'=>NULL]);
echo View::factory('field/select')->set('data',['field'=>'taxable','value'=>StaticList_YesNo::table(),'text'=>'Taxable','default'=>$o->taxable,'class'=>'col-md-1']);
echo View::factory('field/select')->set('data',['field'=>'suspend_billing','value'=>StaticList_YesNo::table(),'text'=>'Suspend Billing','default'=>$o->suspend_billing,'class'=>'col-md-1']);
echo View::factory('field/money')->set('data',['field'=>'price','value'=>$o->price,'text'=>'Price']);
echo View::factory('field/money')->set('data',['field'=>'price_override','value'=>$o->price_override,'text'=>'Override Price']);
?>
</fieldset>

View File

@ -174,10 +174,18 @@ class SSL {
return $this->_dn($this->_details('issuer'));
}
public function get_ian() {
return $this->_extensions('issuerAltName');
}
public function get_serial() {
return $this->_dec_to_hex($this->_details('serialNumber'));
}
public function get_san() {
return $this->_extensions('subjectAltName');
}
public function get_subject() {
$k = $this->_details('subject');
@ -191,13 +199,13 @@ class SSL {
public function get_valid_to($format=FALSE) {
$k = $this->_details('validTo_time_t');
return $format ? Site::Date($k) : $k;
return $format ? Site::Date($k,'d-M-Y H:i:s') : $k;
}
public function get_valid_from($format=FALSE) {
$k = $this->_details('validFrom_time_t');
return $format ? Site::Date($k) : $k;
return $format ? Site::Date($k,'d-M-Y H:i:s') : $k;
}
public function get_version() {

View File

@ -12,6 +12,9 @@
<dt>Subject Key Id</dt>
<dd><?php echo $o->ski(); ?></dd>
<dt>Subject Alt name</dt>
<dd><?php echo $o->san(); ?></dd>
<dt>Issuer</dt>
<dd>
<?php if ($o->validCA() AND $o->authorised($o->ca)) : ?>
@ -24,6 +27,9 @@
<dt>Issuer Serial</dt>
<dd><?php printf('%s (%s)',$o->aki_keyid(), $o->aki_serial()); ?></dd>
<dt>Issuer Alt Name</dt>
<dd><?php echo $o->ian(); ?></dd>
<dt>Valid From</dt>
<dd><?php echo $o->valid_from(TRUE); ?></dd>