From b6260b4f39cf34b9e0e5b8560ef88c8881ba0766 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 14 Jun 2015 13:59:11 -0700 Subject: UI spring cleaning: customer edit --- httemplate/edit/cust_main.cgi | 4 ++-- httemplate/edit/cust_main/basics.html | 13 +++++++------ httemplate/edit/cust_main/company.html | 2 +- httemplate/edit/cust_main/fax.html | 2 +- httemplate/edit/cust_main/name.html | 8 ++++---- httemplate/edit/cust_main/phones.html | 4 ++-- 6 files changed, 17 insertions(+), 16 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index b6f6b0dea..38bae4fa8 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -40,7 +40,7 @@ % }
- + + + + + % } elsif ( $link eq 'invnum' ) { - + % } diff --git a/httemplate/edit/process/cust_pay-no_auto_apply.cgi b/httemplate/edit/process/cust_pay-no_auto_apply.cgi new file mode 100644 index 000000000..ccbd2d7b5 --- /dev/null +++ b/httemplate/edit/process/cust_pay-no_auto_apply.cgi @@ -0,0 +1,48 @@ +<%doc> +Quick process for toggling no_auto_apply field in cust_pay. + +Requires paynum and no_auto_apply ('Y' or '') in cgi. + +Requires 'Apply payment' acl. + + +% if ($error) { + +

<% emt($error) %>

+ +% } else { + +

<% emt($message) %>

+

<% emt('Please wait while the page reloads.') %>

+ + +% } + +<%init> +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Apply payment'); + +my $paynum = $cgi->param('paynum'); +my $noauto = $cgi->param('no_auto_apply'); + +my $error = ''; +my $message = ''; +my $cust_pay = qsearchs('cust_pay',{ paynum => $paynum }); +if ($cust_pay) { + if (($noauto eq 'Y') || (defined($noauto) && (length($noauto) == 0))) { + $cust_pay->no_auto_apply($noauto); + $error = $cust_pay->replace; + $message = $noauto ? + q(Payment will not be automatically applied to open invoices, must be applied manually) : + q(Payment will be automatically applied to open invoices the next time this customer's payments are processed); + } else { + $error = 'no_auto_apply not specified'; + } +} else { + $error .= 'Payment could not be found in database'; +} + + + diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi index a002fa181..56d3f2ff1 100755 --- a/httemplate/edit/process/cust_pay.cgi +++ b/httemplate/edit/process/cust_pay.cgi @@ -50,6 +50,7 @@ else { my $new = new FS::cust_pay ( { $field => $linknum, _date => $_date, + no_auto_apply => ($cgi->param('apply') eq 'never') ? 'Y' : '', map { $_, scalar($cgi->param($_)); } qw( paid payby payinfo paybatch -- cgit v1.2.1 From 98f6d91ec7eaa907204afbfeb90ede1e3bff656d Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Mon, 13 Jul 2015 17:26:48 -0700 Subject: automatic package changes for supplemental packages, #37102 --- httemplate/edit/part_pkg.cgi | 47 +++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index a90a62508..9f5510d65 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -28,7 +28,7 @@ 'onsubmit' => 'confirm_submit', - 'labels' => { + 'labels' => { 'pkgpart' => 'Package Definition', 'pkg' => 'Package', %locale_field_labels, @@ -69,6 +69,10 @@ 'supp_dst_pkgpart' => 'When ordering package, also order', 'report_option' => 'Report classes', 'delay_start' => 'Default delay (days)', + 'adjourn_months' => 'Suspend the package after ', + 'contract_end_months' => 'Contract ends after ', + 'expire_months' => 'Cancel the package after ', + 'change_to_pkgpart'=> 'and replace it with ', }, 'fields' => [ @@ -164,6 +168,37 @@ sort $conf->config('currencies') ), + ( $conf->exists('part_pkg-delay_start') + ? ( { type => 'tablebreak-tr-title', + value => 'Delayed start', + }, + { field => 'delay_start', + type => 'text', size => 6 }, + ) + : () + ), + + { type => 'tablebreak-tr-title', + value => 'Limited duration', + }, + { field => 'adjourn_months', + type => 'select-months', + }, + { field => 'contract_end_months', + type => 'select-months', + }, + { field => 'expire_months', + type => 'select-expire_months', + }, + { field => 'change_to_pkgpart', + type => 'select-part_pkg', + extra_sql => sub { $pkgpart + ? "AND pkgpart != $pkgpart" + : '' + }, + empty_label => 'no package', + }, + #price plan #setup fee #recurring frequency @@ -219,16 +254,6 @@ ) ), - ( $conf->exists('part_pkg-delay_start') - ? ( { type => 'tablebreak-tr-title', - value => 'Delayed start', - }, - { field => 'delay_start', - type => 'text', size => 6 }, - ) - : () - ), - { type => 'columnnext' }, {type=>'justtitle', value=>'Agent (reseller) types' }, -- cgit v1.2.1 From 7b2f4076e6e7b0331904699d9e3a53fc0194eec9 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 23 Jul 2015 21:34:35 -0700 Subject: fix edit/process/svc_circuit.html redirect on error, #37420 --- httemplate/edit/svc_circuit.cgi | 54 ---------------------------------------- httemplate/edit/svc_circuit.html | 54 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 54 deletions(-) delete mode 100644 httemplate/edit/svc_circuit.cgi create mode 100644 httemplate/edit/svc_circuit.html (limited to 'httemplate/edit') diff --git a/httemplate/edit/svc_circuit.cgi b/httemplate/edit/svc_circuit.cgi deleted file mode 100644 index 3f9bad5b1..000000000 --- a/httemplate/edit/svc_circuit.cgi +++ /dev/null @@ -1,54 +0,0 @@ -<& elements/svc_Common.html, - 'table' => 'svc_circuit', - 'fields' => \@fields, -&> -<%init> - -die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific? - -my $conf = new FS::Conf; -my $date_format = $conf->config('date_format') || '%m/%d/%Y'; - -my @fields = ( - { field => 'providernum', - type => 'select-table', - table => 'circuit_provider', - name_col => 'provider', - disable_empty => 1, - }, - { field => 'typenum', - type => 'select-table', - table => 'circuit_type', - name_col => 'typename', - disable_empty => 1, - }, - { field => 'termnum', - type => 'select-table', - table => 'circuit_termination', - name_col => 'termination', - disable_empty => 1, - }, - { field => 'circuit_id', - size => 40, - }, - { field => 'desired_due_date', - type => 'input-date-field', - }, - { field => 'due_date', - type => 'input-date-field', - }, - 'vendor_order_id', - 'vendor_qual_id', - 'vendor_order_status', - 'endpoint_ip_addr', - { field => 'endpoint_mac_addr', - type => 'input-mac_addr', - }, -); - -# needed: a new_callback to migrate vendor quals over to circuits - -#my ($svc_new_callback, $svc_edit_callback, $svc_error_callback); - - diff --git a/httemplate/edit/svc_circuit.html b/httemplate/edit/svc_circuit.html new file mode 100644 index 000000000..3f9bad5b1 --- /dev/null +++ b/httemplate/edit/svc_circuit.html @@ -0,0 +1,54 @@ +<& elements/svc_Common.html, + 'table' => 'svc_circuit', + 'fields' => \@fields, +&> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific? + +my $conf = new FS::Conf; +my $date_format = $conf->config('date_format') || '%m/%d/%Y'; + +my @fields = ( + { field => 'providernum', + type => 'select-table', + table => 'circuit_provider', + name_col => 'provider', + disable_empty => 1, + }, + { field => 'typenum', + type => 'select-table', + table => 'circuit_type', + name_col => 'typename', + disable_empty => 1, + }, + { field => 'termnum', + type => 'select-table', + table => 'circuit_termination', + name_col => 'termination', + disable_empty => 1, + }, + { field => 'circuit_id', + size => 40, + }, + { field => 'desired_due_date', + type => 'input-date-field', + }, + { field => 'due_date', + type => 'input-date-field', + }, + 'vendor_order_id', + 'vendor_qual_id', + 'vendor_order_status', + 'endpoint_ip_addr', + { field => 'endpoint_mac_addr', + type => 'input-mac_addr', + }, +); + +# needed: a new_callback to migrate vendor quals over to circuits + +#my ($svc_new_callback, $svc_edit_callback, $svc_error_callback); + + -- cgit v1.2.1
+ %#; padding-right:2px; vertical-align:top"> <% mt('Billing address') |h %> @@ -58,7 +58,7 @@ - - + @@ -118,7 +118,7 @@ <& /elements/tr-select-agent.html, 'curr_value' => $cust_main->agentnum, - 'label' => "${r}".emt('Agent')."", + 'label' => $r. emt('Agent'), 'empty_label' => emt('Select agent'), 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ), 'viewall_right' => emt('None'), @@ -131,7 +131,7 @@ % if ( $conf->exists('cust_main-edit_agent_custid') ) { - + @@ -157,6 +157,7 @@ %#sales person <& /elements/tr-select-sales.html, 'curr_value' => $cust_main->salesnum, + 'th' => 1, &> %# referral (advertising source) @@ -169,7 +170,7 @@ <& /elements/tr-select-part_referral.html, 'curr_value' => $refnum, - 'label' => "${r}".emt('Advertising source')."" + 'label' => $r. emt('Advertising source'), &> % } @@ -183,7 +184,7 @@ %) { - + @@ -193,7 +194,7 @@ % } elsif ( ! $conf->exists('disable_customer_referrals') ) { - + company ? '' : 'STYLE="display:none"' %>> - + diff --git a/httemplate/edit/cust_main/fax.html b/httemplate/edit/cust_main/fax.html index 237d4be44..c3e9917f4 100644 --- a/httemplate/edit/cust_main/fax.html +++ b/httemplate/edit/cust_main/fax.html @@ -1,5 +1,5 @@ % my $cust_main = shift; - + diff --git a/httemplate/edit/cust_main/name.html b/httemplate/edit/cust_main/name.html index 74b2a7b5b..bc55801cf 100644 --- a/httemplate/edit/cust_main/name.html +++ b/httemplate/edit/cust_main/name.html @@ -2,12 +2,12 @@ % my ($field, $value, $label, $extra) = @_;
> -
<% mt($label) %> +
<% mt($label) %>
- + % if ( $conf->exists('cust_main-enable_spouse') ) { - + - - + !; + $html .= qq!\n!; $html .= "\n'; } $html .= "\n
+ <% mt('Service address') |h %>
<% mt('Agent') |h %><% mt('Agent') |h %> <% $cust_main->agent->agent |h %>
<% mt('Customer identifier') |h %><% mt('Customer identifier') |h %>
<% mt('Referring customer') |h %><% mt('Referring customer') |h %> <% $cust_main->referral_custnum %>: <% $referring_cust_main->name |h %>
<% mt('Referring customer') |h %><% mt('Referring customer') |h %> <& /elements/search-cust_main.html, 'field_name' => 'referral_custnum', diff --git a/httemplate/edit/cust_main/company.html b/httemplate/edit/cust_main/company.html index 8a6ed0bbf..50c4f709b 100644 --- a/httemplate/edit/cust_main/company.html +++ b/httemplate/edit/cust_main/company.html @@ -1,6 +1,6 @@ % my $cust_main = shift;
<% mt('Company') |h %><% mt('Company') |h %>
<% mt('Fax') |h %><% mt('Fax') |h %>
<% mt('Contact name') |h %><% mt('Contact name') |h %> <& .namepart, 'last', $cust_main->last, 'Last', ',' &> <& .namepart, 'first', $cust_main->first, 'First' &> @@ -21,7 +21,7 @@
<% mt('Spouse\'s name') |h %><% mt('Spouse\'s name') |h %> <& .namepart, 'spouse_last', $cust_main->spouse_last, 'Last', ',' &> <& .namepart, 'spouse_first', $cust_main->spouse_first, 'First' &> @@ -31,7 +31,7 @@ % if ( $conf->exists('cust-email-high-visibility') ) {
Email address(es) diff --git a/httemplate/edit/cust_main/phones.html b/httemplate/edit/cust_main/phones.html index 9b23e0716..fa915f540 100644 --- a/httemplate/edit/cust_main/phones.html +++ b/httemplate/edit/cust_main/phones.html @@ -1,5 +1,5 @@
<% mt('Phones') |h %><% mt('Phones') |h %> @@ -10,7 +10,7 @@ VALUE="<% $cust_main->get($phone) %>" SIZE=18 > -
<% mt($phone_label{$phone}) |h %> +
<% mt($phone_label{$phone}) |h %> % } -- cgit v1.2.1 From 99fa7a9f3c628a9a63983cafa131df9b331d30d6 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 14 Jun 2015 14:05:53 -0700 Subject: better UI/label for flag to include service address on invoices, RT#29406 --- httemplate/edit/cust_main.cgi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 38bae4fa8..069414b11 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -80,13 +80,12 @@ &> % unless ($conf->exists('invoice-ship_address')) { #it's always on, so hide per-cust config - - -- cgit v1.2.1 From 506de9ec7d74b35d2bed671526a4363d022026b1 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 14 Jun 2015 14:25:25 -0700 Subject: re-enable calling samechanged on page load, fallout from #21327, #21924 --- httemplate/edit/cust_main.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 069414b11..877d1e80e 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -108,7 +108,7 @@ function samechanged(what) { t1.style.visibility = 'visible' } } -//samechanged(document.getElementById('same')); +samechanged(document.getElementById('same'));
-- cgit v1.2.1 From 0f57e99bd0af253afa16e20f1141afee851b8d5a Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 14 Jun 2015 14:26:19 -0700 Subject: why wouldn't we want to hide the whole thing rather than leave a big blank gap? --- httemplate/edit/cust_main.cgi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 877d1e80e..d4129a37c 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -97,15 +97,13 @@ -
- <& cust_main/contacts_new.html, 'cust_main'=>$cust_main, &> %# billing info diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index d25e88712..c3e89226b 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -15,7 +15,7 @@
<% mt('Billing information') |h %> - <% &ntable("#cccccc") %> +
 
  + <% include('/elements/checkbox.html', 'field' => 'invoice_ship_address', 'value' => 'Y', 'curr_value' => $cust_main->invoice_ship_address, - 'postfix' => emt('included on invoices'), + 'postfix' => emt('Include service address on invoices'), ) %>
% my $curuser = $FS::CurrentUser::CurrentUser; @@ -63,7 +63,7 @@ % #escape $exempt_group for NAME etc. % my $checked = ($cust_main_exemption || $cgi->param("tax_$exempt_group")); - + % } @@ -108,7 +108,7 @@ % unless ( $conf->exists('cust-email-high-visibility')) { - % } @@ -128,7 +128,7 @@ % if ( $conf->exists('cust_main-select-prorate_day') ) { - + @@ -142,7 +142,7 @@ % ### - + - + - + company ? '' : 'STYLE="display:none"' %>> - + + diff --git a/httemplate/edit/cust_main/name.html b/httemplate/edit/cust_main/name.html index bc55801cf..13bd09764 100644 --- a/httemplate/edit/cust_main/name.html +++ b/httemplate/edit/cust_main/name.html @@ -1,6 +1,6 @@ <%def .namepart> % my ($field, $value, $label, $extra) = @_; -
+
>
<% mt($label) %>
@@ -21,7 +21,7 @@ % if ( $conf->exists('cust_main-enable_spouse') ) {
- - + +% sub prorate_day_options { +% my $curr_value = shift; +% my $ret = ''; +% for my $prorate_day ( 1 .. 28 ) { +% my $sel = ''; +% $sel = "SELECTED='SELECTED'" if $curr_value == $prorate_day; +% $ret .= ""; +% } +% $ret; +% } + % } else { % } -- cgit v1.2.1 From d1a46f2831b8f74d4d323be20e70e36ad9d2aff8 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 18 Jun 2015 17:16:33 -0700 Subject: UI cleanup: hide new taxproduct selector when taxproducts are not in use --- httemplate/edit/part_pkg.cgi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index bfa5d50ea..a90a62508 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -200,7 +200,6 @@ include_opt_callback => sub { pkgpart => $_[0]->pkgpart }, }, - { type => 'tablebreak-tr-title', value => 'Promotions', #better name? @@ -1219,6 +1218,11 @@ my $field_callback = sub { }; $fieldref->{layer_fields} = \%taxproduct_fields; $fieldref->{layer_values_callback} = $taxproduct_values; + } elsif ($field eq 'taxproductnum') { # part_pkg-taxproduct, new style + if ( !$taxproducts ) { + # then make the widget go away + $fieldref->{type} = 'hidden'; + } } }; -- cgit v1.2.1 From 11ca9a51a76837f1821b2b0e8972c78bf221c6a1 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Mon, 22 Jun 2015 13:14:33 -0700 Subject: invoice watermarks, #24665 --- httemplate/edit/invoice_conf.html | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'httemplate/edit') diff --git a/httemplate/edit/invoice_conf.html b/httemplate/edit/invoice_conf.html index 7122653f2..861114b1c 100644 --- a/httemplate/edit/invoice_conf.html +++ b/httemplate/edit/invoice_conf.html @@ -49,6 +49,7 @@ my @fields = ( 'Footer', 'Summary header', 'Return address', + 'Watermark', 'Small footer', 'Enable coupon', ), @@ -59,6 +60,7 @@ my @fields = ( { field => 'latexfooter', %textarea }, { field => 'latexsummary', %textarea }, { field => 'latexreturnaddress', %textarea }, + { field => 'latexwatermark', %textarea }, { field => 'latexsmallfooter', %textarea }, { field => 'with_latexcoupon', type => 'checkbox', value => 'Y' }, @@ -68,6 +70,7 @@ my @fields = ( { field => 'htmlfooter', %textarea }, { field => 'htmlsummary', %textarea }, { field => 'htmlreturnaddress', %textarea }, + { field => 'htmlwatermark', %textarea }, # logo { type => 'columnend' }, @@ -87,12 +90,14 @@ my %labels = ( latexfooter latexsummary latexreturnaddress + latexwatermark with_latexcoupon latexsmallfooter htmlnotes htmlfooter htmlsummary htmlreturnaddress + htmlwatermark ) ), ); -- cgit v1.2.1 From c6ef5a3a043c4fafa2f8d21028609f1b9b70eb47 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 22 Jun 2015 18:34:27 -0500 Subject: RT#34078: Payment History Report / Statement --- httemplate/edit/msg_template.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/msg_template.html b/httemplate/edit/msg_template.html index 7f3824127..ced98fe1f 100644 --- a/httemplate/edit/msg_template.html +++ b/httemplate/edit/msg_template.html @@ -210,6 +210,7 @@ my %substitutions = ( '$company_address'=> 'Our company address', '$company_phonenum' => 'Our phone number', '$selfservice_server_base_url' => 'Base URL of customer self-service', + '$payment_history' => 'List of invoices/payments/credits/refunds', ], 'contact' => [ # duplicate this for shipping '$name' => 'Company and contact name', @@ -322,7 +323,7 @@ my $widget = new HTML::Widgets::SelectLayers( my @hints = @{ $substitutions{$section} }; while(@hints) { my $key = shift @hints; - $html .= qq!\n!; + $html .= qq!\n!; $html .= "\n'; } $html .= "\n
   onChange="tax_changed(this)"> Tax Exempt (<% $exempt_group %> taxes)   onChange="tax_changed(this)"> Tax Exempt (<% $exempt_group %> taxes) - Exemption number exempt_number : '' ) |h %>" <% $checked ? '' : 'DISABLED' %>>
+ <% $conf->exists('cust_main-require_invoicing_list_email', $agentnum) ? $r : '' %>Email address(es) @@ -117,7 +117,7 @@ ( $cust_main->message_noemail eq 'Y' ) ? 'CHECKED' : '' - %>> <% emt('Do not send notices') %> + %>> <% emt('Do not send notices') %>
<% mt('Prorate day (1-28)') |h %> <% mt('Prorate day (1-28)') |h %>
<% mt('Charge card/e-check on this day of the month') |h %> <% mt('Charge card/e-check on this day of the month') |h %>
<% mt('Invoice terms') |h %> <% mt('Invoice terms') |h %> <& /elements/select-terms.html, 'curr_value' => $cust_main->invoice_terms, @@ -180,7 +180,7 @@ % ###
<% mt('Credit limit') |h %> <% mt('Credit limit') |h %> <& cust_main/contacts_new.html, 'cust_main'=>$cust_main, &> -- cgit v1.2.1 From 9bee11036c3bf8e7905bbebf77a77792660186ac Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 16 Jun 2015 17:11:30 -0700 Subject: UI spring cleaning: animate company/spouse/contact hide/unhide --- httemplate/edit/cust_main/basics.html | 18 ++++++++++++------ httemplate/edit/cust_main/company.html | 9 +++++---- httemplate/edit/cust_main/name.html | 4 ++-- 3 files changed, 19 insertions(+), 12 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main/basics.html b/httemplate/edit/cust_main/basics.html index 2ca6f65a5..e484c732d 100644 --- a/httemplate/edit/cust_main/basics.html +++ b/httemplate/edit/cust_main/basics.html @@ -25,15 +25,21 @@ function rescom_changed(what) { if ( what.checked == (what.value == 'Commercial' ) ) { - document.getElementById('company_row').style.display = ''; - document.getElementById('contacts_div').style.display = ''; - document.getElementById('spouse_row').style.display = 'none'; + $('#company_label').slideDown(); + $('#company_input').slideDown(); + $('#contacts_div').slideDown(); + $('#spouse_label').slideUp(); + $('#spouse_last_input').slideUp(); + $('#spouse_first_input').slideUp(); } else { if ( document.getElementById('company').value.length == 0 ) { - document.getElementById('company_row').style.display = 'none'; + $('#company_label').slideUp(); + $('#company_input').slideUp(); } - document.getElementById('contacts_div').style.display = 'none'; - document.getElementById('spouse_row').style.display = ''; + $('#contacts_div').slideUp(); + $('#spouse_label').slideDown(); + $('#spouse_last_input').slideDown(); + $('#spouse_first_input').slideDown(); } } diff --git a/httemplate/edit/cust_main/company.html b/httemplate/edit/cust_main/company.html index 50c4f709b..3341d8011 100644 --- a/httemplate/edit/cust_main/company.html +++ b/httemplate/edit/cust_main/company.html @@ -1,7 +1,8 @@ % my $cust_main = shift; -
<% mt('Company') |h %> - company ? '' : 'STYLE="display:none"'; +
><% mt('Company') |h %>
+
> -
<% mt('Spouse\'s name') |h %> +
<% mt('Spouse\'s name') |h %>
<& .namepart, 'spouse_last', $cust_main->spouse_last, 'Last', ',' &> <& .namepart, 'spouse_first', $cust_main->spouse_first, 'First' &> -- cgit v1.2.1 From c6ab4d567c978cbe616c8cb5201c61bde212b3a0 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Wed, 17 Jun 2015 17:44:23 -0700 Subject: fix interaction of agent choice, agent-ship_address, and "same" checkbox, #21327 and #27545 --- httemplate/edit/cust_main/basics.html | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main/basics.html b/httemplate/edit/cust_main/basics.html index e484c732d..e16aafafc 100644 --- a/httemplate/edit/cust_main/basics.html +++ b/httemplate/edit/cust_main/basics.html @@ -56,6 +56,7 @@ % # unlock/lock service location var f = what.form; + var was_same = f['same'].checked; if ( ship_locked_agents[agentnum] ) { % # For this agent, the service location (except address2) % # should be locked to the agent's location. @@ -72,16 +73,25 @@ % # disabled, then they contain some agent's address, which is % # no longer meaningful. So set them back to the customer's % # current location. + var is_same = true; for(var i=0; i rescom_changed(document.getElementById('residential_commercial_Residential')); agent_changed(document.getElementById('agentnum')); - samechanged(document.getElementById('same')); + + if ( $('#same').prop('checked') ) { + $('#div_ship_location').hide(); + } else { + $('#div_ship_location').show(); + } + -- cgit v1.2.1 From d928d26f1d623720d2f0c854a9d0b38210d66d2d Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 18 Jun 2015 00:50:23 -0700 Subject: UI spring cleaning: prorate day dropdown --- httemplate/edit/cust_main/billing.html | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index c3e89226b..6f716c1be 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -128,11 +128,25 @@ % if ( $conf->exists('cust_main-select-prorate_day') ) {
<% mt('Prorate day (1-28)') |h %> + <% mt('Prorate day') |h %> - +
$key
$key".shift(@hints).'
"; -- cgit v1.2.1 From 3b46d452696901ff2dec41125f68c689ecffd5b9 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Thu, 25 Jun 2015 00:51:02 -0500 Subject: RT#34078: Payment History Report / Statement [refactor to not use msg_template] --- httemplate/edit/msg_template.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/msg_template.html b/httemplate/edit/msg_template.html index ced98fe1f..7f3824127 100644 --- a/httemplate/edit/msg_template.html +++ b/httemplate/edit/msg_template.html @@ -210,7 +210,6 @@ my %substitutions = ( '$company_address'=> 'Our company address', '$company_phonenum' => 'Our phone number', '$selfservice_server_base_url' => 'Base URL of customer self-service', - '$payment_history' => 'List of invoices/payments/credits/refunds', ], 'contact' => [ # duplicate this for shipping '$name' => 'Company and contact name', @@ -323,7 +322,7 @@ my $widget = new HTML::Widgets::SelectLayers( my @hints = @{ $substitutions{$section} }; while(@hints) { my $key = shift @hints; - $html .= qq!\n
$key
$key".shift(@hints).'
"; -- cgit v1.2.1 From d13dae1c37c36c27f1ac9fd134c5d8b3a4fb9754 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Tue, 30 Jun 2015 03:24:08 -0500 Subject: RT#29285: State field not needed for New Zealand --- httemplate/edit/cust_main/basics.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main/basics.html b/httemplate/edit/cust_main/basics.html index e16aafafc..32a03bbe6 100644 --- a/httemplate/edit/cust_main/basics.html +++ b/httemplate/edit/cust_main/basics.html @@ -46,7 +46,7 @@ var ship_locked_agents = <% encode_json(\%ship_locked_agents) %>; var ship_fields = [ - 'locationname', 'address1', 'city', 'state', 'zip', 'country', + 'locationname', 'address1',<% $conf->exists('cust_main-no_city_in_address') ? '' : q( 'city',) %> 'state', 'zip', 'country', 'latitude', 'longitude', 'district' ]; @@ -307,7 +307,10 @@ foreach (qsearch('agent',{})) { my $agent_ship_location = $cust_main->ship_location; $ship_locked_agents{$agentnum} = +{ map { $_ => $agent_ship_location->$_ } - qw(locationname address1 city state zip country latitude longitude district) + ( + qw(locationname address1 state zip country latitude longitude district), + ($conf->exists('cust_main-no_city_in_address') ? () : 'city') + ) }; } -- cgit v1.2.1 From cc577407362f8b64817afbe89d23888a0a5b63f9 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Tue, 30 Jun 2015 05:29:49 -0500 Subject: RT#30705: Change contract end date when changing packages [got rid of chronology requirements] --- httemplate/edit/process/change-cust_pkg.html | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/process/change-cust_pkg.html b/httemplate/edit/process/change-cust_pkg.html index c066ff5b0..046a9795c 100644 --- a/httemplate/edit/process/change-cust_pkg.html +++ b/httemplate/edit/process/change-cust_pkg.html @@ -41,15 +41,9 @@ if ( $cgi->param('locationnum') == -1 ) { } my $error; -my $contract_end; my $now = time; if (defined($cgi->param('contract_end'))) { - $contract_end = parse_datetime($cgi->param('contract_end')); - if ($contract_end < $now) { - $error = "Contract end ".$cgi->param('contract_end')." is in the past."; - } else { - $change{'contract_end'} = $contract_end; - } + $change{'contract_end'} = parse_datetime($cgi->param('contract_end')); } unless ($error) { -- cgit v1.2.1 From fccb0009d3b5ea3b07364520754d6f956cdeb861 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sat, 11 Jul 2015 23:10:12 -0700 Subject: note UI --- httemplate/edit/cust_main_note.cgi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main_note.cgi b/httemplate/edit/cust_main_note.cgi index a089db2d1..9ae29c2f1 100755 --- a/httemplate/edit/cust_main_note.cgi +++ b/httemplate/edit/cust_main_note.cgi @@ -23,8 +23,12 @@ join '', split /
| /, $comment %> % } else { - <& /elements/htmlarea.html, 'field' => 'comment_html', - 'curr_value' => $comment + <& /elements/htmlarea.html, + 'field' => 'comment_html', + 'curr_value' => $comment, + 'config' => { toolbarStartupExpanded => JSON::false, + height => 315, + }, &> % } -- cgit v1.2.1 From 4b695753d2456060e6a16808120cbb488a19c584 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Mon, 13 Jul 2015 18:33:52 -0500 Subject: RT#31594: Unapplied payment issues --- httemplate/edit/cust_pay.cgi | 10 +++-- httemplate/edit/process/cust_pay-no_auto_apply.cgi | 48 ++++++++++++++++++++++ httemplate/edit/process/cust_pay.cgi | 1 + 3 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 httemplate/edit/process/cust_pay-no_auto_apply.cgi (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 888335fbb..5d74365e7 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -87,15 +87,17 @@
<% mt('Auto-apply to invoices') |h %> - <% mt('Apply to') |h %> Invoice #<% $linknum %> only