diff options
Diffstat (limited to 'httemplate')
| -rw-r--r-- | httemplate/docs/about.html | 4 | ||||
| -rw-r--r-- | httemplate/edit/access_user.html | 7 | ||||
| -rw-r--r-- | httemplate/edit/process/access_user.html | 22 | ||||
| -rw-r--r-- | httemplate/edit/process/change-cust_pkg.html | 47 | ||||
| -rw-r--r-- | httemplate/elements/menu.html | 3 | ||||
| -rwxr-xr-x | httemplate/misc/change_pkg.cgi | 18 | ||||
| -rwxr-xr-x | httemplate/misc/process/void-cust_bill.html | 6 | ||||
| -rwxr-xr-x | httemplate/misc/void-cust_bill.html | 8 | ||||
| -rw-r--r-- | httemplate/view/prospect_main.html | 3 |
9 files changed, 92 insertions, 26 deletions
diff --git a/httemplate/docs/about.html b/httemplate/docs/about.html index bc3c1b3b9..29a9fe0c4 100644 --- a/httemplate/docs/about.html +++ b/httemplate/docs/about.html @@ -28,7 +28,7 @@ % } else { <FONT SIZE="-1"> % } -© 2017 Freeside Internet Services, Inc.<BR> +© 2018 Freeside Internet Services, Inc.<BR> All rights reserved.<BR> Licensed under the terms of the<BR> GNU <b>Affero</b> General Public License.<BR> @@ -56,7 +56,7 @@ GNU <b>Affero</b> General Public License.<BR> % unless ( $agentnum ) { <CENTER> - <FONT SIZE="-3">"I've heard it too many times to ignore it / Its's something that I'm supposed to be" - K. Frog</FONT> + <FONT SIZE="-3">"Then, when all seemed to be lost, a small glimmer of light appeared in the distance. Could it be... back from the great beyond..." - D. 3030</FONT> </CENTER> % } diff --git a/httemplate/edit/access_user.html b/httemplate/edit/access_user.html index 9d2585366..f40575c0b 100644 --- a/httemplate/edit/access_user.html +++ b/httemplate/edit/access_user.html @@ -33,8 +33,10 @@ sub { my $access_user = shift; - '<BR>Employee Groups<BR>'. - ntable("#cccccc",2). + '<BR>'. + '<FONT CLASS="fsinnerbox-title">Employee Groups</FONT>'. + '<BR>'. + '<TABLE CLASS="fsinnerbox">'. '<TR><TD>'. include( '/elements/checkboxes-table.html', 'source_obj' => $access_user, @@ -49,6 +51,7 @@ }, 'onsubmit' => 'check_user_custnum_search', 'html_foot' => $check_user_custnum_search, + 'html_table_class' => 'fsinnerbox', ) %> <%init> diff --git a/httemplate/edit/process/access_user.html b/httemplate/edit/process/access_user.html index 54d2b0348..fcd210f83 100644 --- a/httemplate/edit/process/access_user.html +++ b/httemplate/edit/process/access_user.html @@ -11,7 +11,7 @@ 'target_table' => 'access_group', }, 'precheck_callback' => \&precheck_callback, - 'post_new_object_callback' => \&post_new_object_callback, + #'post_new_object_callback' => \&post_new_object_callback, 'noerror_callback' => \&noerror_callback, ) %> @@ -38,20 +38,24 @@ sub precheck_callback { return ''; } -sub post_new_object_callback { +#sub post_new_object_callback { +# my( $cgi, $access_user ) = @_; +# +# if ( length($cgi->param('_password')) ) { +# my $password = scalar($cgi->param('_password')); +# my $error = $access_user->is_password_allowed($password); +# #XXX and then bubble the error back up to the UI +# } +#} + +sub noerror_callback { my( $cgi, $access_user ) = @_; if ( length($cgi->param('_password')) ) { my $password = scalar($cgi->param('_password')); - my $error = $access_user->is_password_allowed($password) - || $access_user->change_password($password); + $access_user->change_password($password); } -} - -sub noerror_callback { - my( $cgi, $access_user ) = @_; - #handle installer checkbox my @sched_item = $access_user->sched_item; my $sched_item = $sched_item[0]; diff --git a/httemplate/edit/process/change-cust_pkg.html b/httemplate/edit/process/change-cust_pkg.html index 7fcc1da07..02b01f8de 100644 --- a/httemplate/edit/process/change-cust_pkg.html +++ b/httemplate/edit/process/change-cust_pkg.html @@ -40,19 +40,54 @@ if ( $cgi->param('locationnum') == -1 ) { $change{'cust_location'} = $cust_location; } +my $error; + +# Discounts: +# setup_discountnum and change_discountnum may contain one of the following: +# - "-1" Represents the 'other' option. Results in a new entry to the +# discount table. +# - "-2" Represents the "waive setup fee" option. Sets cust_pkg.waive_setup = Y +# - int Represents the id for a discount row: discount.discountnum +# my %discount; +# $change{waive_setup} = ''; +# for my $type (qw|setup recur|) { +# my $dnum = $cgi->param("${type}_discountnum"); + +# if ($dnum eq '-2' && $type eq 'setup') { +# $change{waive_setup} = 'Y'; +# } elsif ($val =~ /^-?\d+$/) { +# $discount{$type} = {discountnum => $dnum}; +# if ($dnum eq '-1') { +# $discount{$type}->{amount} = $cgi->param("${type}_discountnum_amount"); +# $discount{$type}->{percent} = $cgi->param("${type}_discountnum_percent"); +# } +# } else { +# # Shouldn't happen without funny business +# $error = "Bad value ${type}_discountnum ($val)"; +# } +# } + + $change{waive_setup} = ''; +for my $type (qw|setup_discountnum recur_discountnum|) { + my $dnum = $cgi->param($type); -if ( $cgi->param('setup_discountnum') =~ /^(-?\d+)$/ ) { - if ( $1 == -2 ) { + if ($dnum eq '-2' && $type eq 'setup_discountnum') { + # Waive Discount $change{waive_setup} = 'Y'; + } elsif ($dnum =~ /^-?\d+$/) { + # Set discountnum + $change{$type} = $dnum; + $change{"${type}_amount"} = $cgi->param("${type}_amount"); + $change{"${type}_percent"} = $cgi->param("${type}_percent"); + } elsif ($dnum eq '') { + # Set discount as no discount + $change{"${type}"} = 0; } else { - $change{setup_discountnum} = $1; - $change{setup_discountnum_amount} = $cgi->param('setup_discountnum_amount'); - $change{setup_discountnum_percent} = $cgi->param('setup_discountnum_percent'); + $error = "Bad value ${type}_discountnum ($dnum)"; } } -my $error; my $now = time; if (defined($cgi->param('contract_end'))) { $change{'contract_end'} = parse_datetime($cgi->param('contract_end')); diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 9b8b2cd1e..eb065b668 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -518,8 +518,9 @@ tie my %tools_importing, 'Tie::IxHash', 'Customers' => [ $fsurl.'misc/cust_main-import.cgi', '' ], 'Package definitions' => [ $fsurl.'misc/part_pkg-import.html', '' ], 'Customer packages' => [ $fsurl.'misc/cust_pkg-import.html', '' ], +# 'Customer broadband services' => [ $fsurl.'misc/svc_broadband-import.html', '' ], 'Customer notes' => [ $fsurl.'misc/cust_main_note-import.html', '' ], - 'Customer Contacts' => [ $fsurl.'misc/contact-import.cgi', '' ], + 'Customer contacts' => [ $fsurl.'misc/contact-import.cgi', '' ], 'One-time charges' => [ $fsurl.'misc/cust_main-import_charges.cgi', '' ], 'Payments' => [ $fsurl.'misc/cust_pay-import.cgi', '' ], 'Credits' => [ $fsurl.'misc/cust_credit-import.html', '' ], diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi index 243da9308..2470ee135 100755 --- a/httemplate/misc/change_pkg.cgi +++ b/httemplate/misc/change_pkg.cgi @@ -90,7 +90,13 @@ % if ( $discount_cust_pkg || $waive_setup_fee ) { <FONT CLASS="fsinnerbox-title"><% mt('Discounting') |h %></FONT> <TABLE CLASS="fsinnerbox"> - <& /elements/tr-select-pkg-discount.html, disable_recur => 1, &> + <& /elements/tr-select-pkg-discount.html, + curr_value_setup => $discount{setup}, + curr_value_recur => $discount{recur}, + disable_setup => 0, + disable_recur => 0, + disable_waive_setup => 0 + &> </TABLE><BR> % } @@ -168,4 +174,14 @@ if ( $cust_pkg->change_to_pkgnum ) { } $title = "Edit Scheduled Package Change"; } + +# Get current values of discounts for selectboxes +my %discount = (setup => undef, recur => undef); +$discount{$_->setuprecur} = $_->discountnum + for qsearch('cust_pkg_discount', { + pkgnum => $cust_pkg->pkgnum, + disabled => '', + }); +$discount{setup} = '-2' if $cust_pkg->waive_setup; + </%init> diff --git a/httemplate/misc/process/void-cust_bill.html b/httemplate/misc/process/void-cust_bill.html index 32a2fc591..49dda185e 100755 --- a/httemplate/misc/process/void-cust_bill.html +++ b/httemplate/misc/process/void-cust_bill.html @@ -19,8 +19,8 @@ my $invnum = $1; my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); -my $custnum = $cust_bill->custnum; - -my $error = $cust_bill->void( scalar($cgi->param('reason')) ); +my $error = $cust_bill->void( scalar($cgi->param('reason')), + scalar($cgi->param('reprocess_cdrs')), + ); </%init> diff --git a/httemplate/misc/void-cust_bill.html b/httemplate/misc/void-cust_bill.html index e4e4705d7..e5fbdc6d5 100755 --- a/httemplate/misc/void-cust_bill.html +++ b/httemplate/misc/void-cust_bill.html @@ -18,6 +18,14 @@ 'cgi' => $cgi &> +% if ( $cust_bill->has_call_details ) { + <& /elements/tr-checkbox.html, + label => 'Reprocess CDRs', + field => 'reprocess_cdrs', + value => '1', + &> +% } + </TABLE> <BR> diff --git a/httemplate/view/prospect_main.html b/httemplate/view/prospect_main.html index 2fde797c6..f4dd4146f 100644 --- a/httemplate/view/prospect_main.html +++ b/httemplate/view/prospect_main.html @@ -108,8 +108,7 @@ my $prospect_main = qsearchs( { }); die "Prospect not found!" unless $prospect_main; -my $title = encode_entities($prospect_main->name); -$title = mt("Prospect"). ": $title"; +my $title = mt("Prospect"). ': '. $prospect_main->name; $title .= ' ('.mt('DISABLED').')' if $prospect_main->disabled; |
