[% IF c.user.roles == "subscriber" || c.user.roles == "subscriberadmin" -%] [% site_config.title = c.loc('Customer Details') -%] [% ELSE -%] [% site_config.title = c.loc('Customer Details for #[_1] ([_2])',contract.id,product.name) -%] [% END -%] [% lock_levels = [ { level = 0, text = c.loc("none") }, { level = 1, text = c.loc("foreign calls") }, { level = 2, text = c.loc("all outgoing calls") }, { level = 3, text = c.loc("incoming and outgoing") }, { level = 4, text = c.loc("global (including web login)") }, { level = 5, text = c.loc("ported (call forwarding only)") }, ]; -%]
[% c.loc('Back') %] [% c.loc('Preferences') %] [% IF (c.user.roles == 'admin' || c.user.roles == 'reseller' || c.user.roles == 'ccareadmin' || c.user.roles == 'ccare') && !c.user.read_only -%] [% c.loc('Edit') %] [% END -%]
[% back_created = 1 -%]
[% FOREACH m IN messages -%]
[% m.text %]
[% END -%] [% IF contract.status != "active" -%]
Customer is [% contract.status %]
[% END -%]
[% IF c.user.is_superuser -%]
[% c.loc('Name') %] [% c.loc('Value') %]
[% c.loc('#') %] [% contract.contact.reseller.id %]
[% c.loc('Name') %] [% contract.contact.reseller.name %]
[% END -%] [% IF c.user.roles == 'admin' || c.user.roles == 'reseller' || c.user.roles == 'ccareadmin' || c.user.roles == 'ccare' %]
[% UNLESS c.user.read_only -%] [% c.loc('Edit Contact') %]
[% END -%]
[% c.loc('Name') %] [% c.loc('Value') %]
[% c.loc('Email') %] [% contact_hash.email%]
[% c.loc('Name') %] [% contact_hash.firstname %] [% contact_hash.lastname %]
[% c.loc('Company') %] [% contact_hash.company%]
[% c.loc('Address') %] [% contact_hash.street %]
[% contact_hash.postcode %] [% contact_hash.city %]
[% contact_hash.country %]
[% c.loc('Phone/Fax') %] Mobile: [% contact_hash.mobilenumber %]
Fixed: [% contact_hash.phonenumber %]
Fax: [% contact_hash.faxnumber %]
[% END -%]
[% IF ((c.user.roles == "subscriberadmin" && product.class == "pbxaccount") || c.user.roles == "admin" || c.user.roles == "reseller" || c.user.roles == "ccareadmin" || c.user.roles == "ccare") && contract.max_subscribers.defined && subscriber_count < contract.max_subscribers -%]
[% c.loc('[_1] of maximum [_2] subscribers [_3] created',subscriber_count,contract.max_subscribers, c.config.features.cloudpbx ? c.loc('(including PBX groups) ') : '') %]
[% c.loc('Create Subscriber') %] [% ELSIF contract.max_subscribers.defined -%]
[% c.loc('Maximum number of [_1] subscribers [_2] created',contract.max_subscribers, c.config.features.cloudpbx ? c.loc('(including PBX groups) ') : '') %]
[% ELSIF (c.user.roles == "subscriberadmin" && product.class == "pbxaccount") || c.user.roles == "admin" || c.user.roles == "reseller" || c.user.roles == "ccareadmin" || c.user.roles == "ccare" -%] [% c.loc('Create Subscriber') %] [% END -%] [% helper.name = c.loc('Subscribers'); helper.identifier = 'subscribers'; helper.length_change = 1; helper.dt_columns = subscriber_dt_columns; helper.ajax_uri = c.uri_for_action('/customer/subscriber_ajax', [ c.req.captures.0 ]); UNLESS c.user.read_only; helper.dt_buttons = [ { name = c.loc('Terminate'), uri = "/subscriber/'+full.id+'/terminate", class = 'btn-small btn-secondary', icon = 'icon-remove' }, { name = c.loc('Details'), uri = "/subscriber/'+full.id+'/details", class = 'btn-small btn-primary', icon = 'icon-th-list' }, { name = c.loc('Preferences'), uri = "/subscriber/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; ELSE; helper.dt_buttons = [ { name = c.loc('Details'), uri = "/subscriber/'+full.id+'/details", class = 'btn-small btn-primary', icon = 'icon-th-list' }, { name = c.loc('Preferences'), uri = "/subscriber/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; END; PROCESS 'helpers/datatables.tt'; %]
[% IF c.config.features.cloudpbx && product.class == 'pbxaccount' && subscribers.count -%]
[% IF contract.max_subscribers.defined && subscriber_count < contract.max_subscribers -%]
[% c.loc('[_1] of maximum [_2] subscribers [_3] created',subscriber_count, contract.max_subscribers, c.config.features.cloudpbx ? c.loc('(including PBX groups) ') : '') %]
[% c.loc('Create PBX Group') %] [% ELSIF contract.max_subscribers.defined -%]
[% c.loc('Maximum number of [_1] subscribers [_2] created',contract.max_subscribers, c.config.features.cloudpbx ? c.loc('(including PBX groups) ') : '') %]
[% ELSE %] [% c.loc('Create PBX Group') %] [% END -%] [% helper.name = c.loc('PBX Groups'); helper.identifier = 'pbx_groups'; helper.length_change = 1; helper.dt_columns = pbxgroup_dt_columns; helper.ajax_uri = c.uri_for_action('/customer/pbx_group_ajax', [ c.req.captures.0 ]); UNLESS c.user.read_only; helper.dt_buttons = [ { name = c.loc('Terminate'), uri = "/subscriber/'+full.id+'/terminate", class = 'btn-small btn-secondary', icon = 'icon-remove' }, { name = c.loc('Details'), uri = "/subscriber/'+full.id+'/details", class = 'btn-small btn-primary', icon = 'icon-th-list' }, { name = c.loc('Preferences'), uri = "/subscriber/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; ELSE; helper.dt_buttons = [ { name = c.loc('Details'), uri = "/subscriber/'+full.id+'/details", class = 'btn-small btn-primary', icon = 'icon-th-list' }, { name = c.loc('Preferences'), uri = "/subscriber/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; END; PROCESS 'helpers/datatables.tt'; %]
[% c.loc('Create PBX Device') %]
[% FOR dev IN pbx_devices -%] [% END -%]
[% c.loc('Station Name') %] [% c.loc('Subscriber') %] [% c.loc('MAC Address / Identifier') %] [% c.loc('Device Profile') %]
[% dev.station_name %]
    [% FOR line IN dev.autoprov_field_device_lines.all -%] [% sub = line.provisioning_voip_subscriber.username _ '@' _ line.provisioning_voip_subscriber.domain.domain; -%]
  • [% line.autoprov_device_line_range.name %]/[% line.key_num %]: [% line.line_type %]
    [% sub %]
  • [% UNLESS loop.last -%]
  •  
  • [% END -%] [% END -%]
[% dev.identifier %] [% dev.profile.name %]
[% UNLESS c.user.readonly -%] [% c.loc('Delete') %] [% c.loc('Edit') %] [% c.loc('Config') %] [%IF dev.profile.config.device.bootstrap_method == 'http'%] [% c.loc('Sync Device') %] [% END -%] [% END -%] [% c.loc('Preferences') %]
[% END -%] [% IF c.config.features.cloudpbx && product.class == 'pbxaccount' && (c.user.roles == 'admin' || c.user.roles == 'reseller' || c.user.roles == 'ccareadmin' || c.user.roles == 'ccare' || c.user.roles == 'subscriberadmin') -%]
[% helper.name = c.loc('Sound Set'); helper.identifier = 'sound_sets'; helper.dt_columns = soundset_dt_columns; helper.ajax_uri = c.uri_for_action('/sound/contract_ajax', [ c.req.captures.0 ]); UNLESS c.user.read_only; helper.dt_buttons = [ { name = c.loc('Edit'), uri = "/sound/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, { name = c.loc('Delete'), uri = "/sound/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' }, { name = c.loc('Files'), uri = "/sound/'+full.id+'/handles", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; helper.top_buttons = [ { name = c.loc('Create Sound Set'), uri = c.uri_for_action('/sound/create', c.req.captures.0), icon = 'icon-star', accordion_button = 1 }, ]; ELSE; helper.dt_buttons = [ { name = c.loc('Files'), uri = "/sound/'+full.id+'/handles", class = 'btn-small btn-tertiary', icon = 'icon-list' }, ]; END; PROCESS 'helpers/datatables.tt'; %]
[% END -%]
[% IF (c.user.roles == 'admin' || c.user.roles == 'reseller' || c.user.roles == 'ccareadmin' || c.user.roles == 'ccare') && !c.user.read_only -%] [% IF c.user.billing_data && c.config.features.voucher -%] [% c.loc('Top-up Voucher') %] [% END -%] [% c.loc('Top-up Cash') %] [% c.loc('Set Cash Balance') %]
[% END -%] [% USE format %] [% money_format = format('%.2f') %]
[% c.loc('Initial Cash Balance:') %] [% money_format(balance.initial_cash_balance / 100) %] [% c.loc('Cash Balance:') %] [% money_format(balance.cash_balance / 100) %] [% c.loc('Debit:') %] [% money_format( balance.cash_balance_interval / 100 ) %]
[% c.loc('Initial Free-Time Balance:') %] [% balance.initial_free_time_balance %] [% c.loc('Free-Time Balance:') %] [% balance.free_time_balance %] [% c.loc('Free-Time spent:') %] [% balance.free_time_balance_interval %]
[% c.loc('Interval from:') %] [% balance.start %] [% c.loc('Interval to:') %] [% balance.end %]
[% c.loc('"Timely" Top-ups from:') %] [% timely_topup_start %] [% c.loc('"Timely" Top-ups to:') %] [% timely_topup_end %]
[% c.loc('Balance will be discarded, if no tup-up happens until:') %] [% notopup_expiration %]
[% USE format %] [% money_format = format('%.2f') %]
[% c.loc('Actual profile package:') %] [% package.name %] [% c.loc('Actual billing profile:') %] [% mapping.billing_profile.name %]
[% c.loc('Cash balance threshold when underrun profiles get applied:') %] [% package.underrun_profile_threshold ? money_format( package.underrun_lock_threshold / 100 ) : '' %] [% c.loc('Cash balance threshold when subscribers will be locked:') %] [% package.underrun_lock_threshold ? money_format( package.underrun_lock_threshold / 100 ) : '' %]
[% helper.name = c.loc('Balance Interval'); helper.identifier = 'balance_intervals'; helper.dt_columns = balanceinterval_dt_columns; helper.ajax_uri = c.uri_for_action('/customer/balanceinterval_ajax', [ c.req.captures.0 ]); helper.top_buttons = []; helper.dt_buttons = []; PROCESS 'helpers/datatables.tt'; %]
[% helper.name = c.loc('Topuplog'); helper.identifier = 'topup_logs'; helper.dt_columns = topuplog_dt_columns; helper.ajax_uri = c.uri_for_action('/customer/topuplog_ajax', [ c.req.captures.0 ]); helper.top_buttons = []; helper.dt_buttons = []; PROCESS 'helpers/datatables.tt'; %]
[% IF c.user.roles == 'admin' || c.user.roles == 'reseller' || c.user.roles == 'ccareadmin' || c.user.roles == 'ccare' %]
[% fraud_def_message = (fraud.fraud_interval_limit.defined ? "none" : c.loc("billing profile default")) %] [% fraud_def_message = (fraud.fraud_daily_limit.defined ? "none" : c.loc("billing profile default")) %]
[% c.loc('Limit') %] [% c.loc('Lock Level') %] [% c.loc('Notify') %]
[% c.loc('Monthly Settings') %][% fraud.fraud_interval_limit.defined ? fraud.fraud_interval_limit : fraud_def_message %] [% IF fraud.fraud_interval_lock.defined -%] [% ELSE -%] [% fraud_def_message %] [% END -%] [% fraud.fraud_interval_notify.defined ? fraud.fraud_interval_notify : fraud_def_message %]
[% c.loc('Daily Settings') %][% fraud.fraud_daily_limit.defined ? fraud.fraud_daily_limit : fraud_def_message %] [% IF fraud.fraud_daily_lock.defined -%] [% ELSE -%] [% fraud_def_message %] [% END -%] [% fraud.fraud_daily_notify.defined ? fraud.fraud_daily_notify : fraud_def_message %]
[% END -%]
[% helper.name = c.loc('Invoice'); helper.identifier = 'invoices'; helper.dt_columns = invoice_dt_columns; helper.ajax_uri = c.uri_for_action('/invoice/customer_ajax', [ c.req.captures.0 ]); helper.top_buttons = []; helper.dt_buttons = [ { name = c.loc('Download'), uri = "/invoice/'+full.id+'/download", class = 'btn-small btn-tertiary', icon = 'icon-download-alt' }, ]; PROCESS 'helpers/datatables.tt'; %]
[% IF (c.user.roles == "subscriberadmin" && product.class == "pbxaccount") || c.user.roles == "admin" || c.user.roles == "reseller" || c.user.roles == "ccareadmin" || c.user.roles == "ccare" -%]
[% c.loc('Create Location') %] [% helper.name = c.loc('Locations'); helper.identifier = 'locations'; helper.length_change = 1; helper.dt_columns = location_dt_columns; helper.ajax_uri = c.uri_for_action('/customer/location_ajax', [ c.req.captures.0 ]); helper.tmpuri = c.uri_for(contract.id, 'location'); UNLESS c.user.read_only; helper.dt_buttons = [ { name = c.loc('Preferences'), uri = helper.tmpuri _ "/'+full.id+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' }, { name = c.loc('Edit'), uri = helper.tmpuri _ "/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, { name = c.loc('Delete'), uri = helper.tmpuri _ "/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-remove' }, ]; END; PROCESS 'helpers/datatables.tt'; %]
[% END -%] [% IF (c.user.roles == "subscriberadmin" && product.class == "pbxaccount") || c.user.roles == "admin" || c.user.roles == "reseller" || c.user.roles == "ccareadmin" || c.user.roles == "ccare" -%]
[% helper.name = c.loc('Phonebook'); helper.identifier = 'phonebook'; helper.messages = messages; helper.create_flag = phonebook_create_flag; helper.edit_flag = phonebook_edit_flag; helper.close_target = close_target; helper.form_object = form; helper.length_change = 1; helper.dt_columns = phonebook_dt_columns; helper.ajax_uri = c.uri_for_action('/customer/phonebook_ajax', [ c.req.captures.0 ]); helper.tmpuri = c.uri_for_action('/customer/phonebook_root', [ c.req.captures.0 ]); UNLESS c.user.read_only; helper.dt_buttons = [ { name = c.loc('Edit'), uri = helper.tmpuri _ "/'+full.id+'/edit", class = 'btn-small btn-primary', icon = 'icon-edit' }, { name = c.loc('Delete'), uri = helper.tmpuri _ "/'+full.id+'/delete", class = 'btn-small btn-secondary', icon = 'icon-remove' }, ]; helper.top_buttons = [ { name = c.loc('Create Phonebook Entry'), uri = c.uri_for_action('/customer/phonebook_create', c.req.captures), class = 'btn-small btn-primary', icon = 'icon-star' }, { name = c.loc('Download CSV'), uri = c.uri_for_action('/customer/phonebook_download_csv', c.req.captures), class = 'btn-small btn-primary', icon = 'icon-star' }, { name = c.loc('Upload CSV'), uri = c.uri_for_action('/customer/phonebook_upload_csv', c.req.captures), class = 'btn-small btn-primary', icon = 'icon-star' }, ]; END; PROCESS 'helpers/datatables.tt'; %]
[% END -%]
[% IF create_flag == 1 -%] [% IF form.has_for_js; form.render_repeatable_js; END; PROCESS "helpers/modal.tt"; modal_header(m.create_flag = create_flag, m.name = description.defined ? description : c.loc("Subscriber")); form.render; modal_footer(); modal_script(m.close_target = close_target); -%] [% ELSIF edit_flag == 1 -%] [% IF form.has_for_js; form.render_repeatable_js; END; PROCESS "helpers/modal.tt"; modal_header(m.create_flag=0, m.name = c.loc("Settings")); form.render; modal_footer(); modal_script(m.close_target = close_target); -%] [% ELSIF devsync_flag == 1 -%] [% PROCESS "helpers/modal.tt"; modal_header(m.create_flag=0, m.edit_flag=0, m.name = c.loc("Deployed Device")); form.render; modal_footer(); modal_script(m.close_target = close_target); -%] [% END -%] [% IF c.config.features.cloudpbx && device_flag -%]
[% END -%] [% # vim: set tabstop=4 syntax=html expandtab: -%]