From 05889be74afd7e845b24ed75252026a466fe1ff2 Mon Sep 17 00:00:00 2001 From: Alex Brelsfoard Date: Tue, 27 Jan 2015 19:24:04 -0500 Subject: RT #29800: converting the DID range from numeric to string to maintain leading zeroes --- httemplate/edit/process/bulk-svc_phone.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate') diff --git a/httemplate/edit/process/bulk-svc_phone.html b/httemplate/edit/process/bulk-svc_phone.html index 5a1fbc647..db486de76 100644 --- a/httemplate/edit/process/bulk-svc_phone.html +++ b/httemplate/edit/process/bulk-svc_phone.html @@ -25,7 +25,7 @@ my $num_avail = $1; errorpage("There are only $num_avail available") if $end - $start + 1 > $num_avail; -foreach my $phonenum ( $start .. $end ) { +foreach my $phonenum ( "$start" .. "$end" ) { my $svc_phone = new FS::svc_phone { 'phonenum' => $phonenum, -- cgit v1.2.1 From 65b94bd80599a27c658b792f02c85d200488688d Mon Sep 17 00:00:00 2001 From: Alex Brelsfoard Date: Tue, 27 Jan 2015 21:29:52 -0500 Subject: RT #28256: upgrading this fix to also apply to the unused_credit_cancel package option --- httemplate/edit/part_pkg.cgi | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'httemplate') diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 778a0265e..1702a6dc7 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -967,8 +967,17 @@ my $html_bottom = sub { 'msg' => q|You must set the 'suspend_credit_type' option in Configuration->Settings to gain access to this option.|, 'are_met' => sub{ my $conf = new FS::conf; - my @suspend_credit_type_conf = qsearch('conf', { 'name' => 'suspend_credit_type' } ); - return 1 if (exists($suspend_credit_type_conf[0]) && $suspend_credit_type_conf[0]->{Hash}{value}); + my @conf_info = qsearch('conf', { 'name' => 'suspend_credit_type' } ); + return 1 if (exists($conf_info[0]) && $conf_info[0]->{Hash}{value}); + return 0; + } + }, + 'unused_credit_cancel' => { + 'msg' => q|You must set the 'cancel_credit_type' option in Configuration->Settings to gain access to this option.|, + 'are_met' => sub{ + my $conf = new FS::conf; + my @conf_info = qsearch('conf', { 'name' => 'cancel_credit_type' } ); + return 1 if (exists($conf_info[0]) && $conf_info[0]->{Hash}{value}); return 0; } } -- cgit v1.2.1 From a2faeced765b00c0339fd86d7905cb77318e3d20 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 28 Jan 2015 02:24:07 -0800 Subject: sticky customer notes, RT#29311 --- httemplate/edit/cust_main_note.cgi | 27 ++++++++++++++++++--------- httemplate/edit/process/cust_main_note.cgi | 1 + httemplate/view/cust_main/notes/notes.html | 18 ++++++++++++------ 3 files changed, 31 insertions(+), 15 deletions(-) (limited to 'httemplate') diff --git a/httemplate/edit/cust_main_note.cgi b/httemplate/edit/cust_main_note.cgi index 61590566c..a089db2d1 100755 --- a/httemplate/edit/cust_main_note.cgi +++ b/httemplate/edit/cust_main_note.cgi @@ -18,17 +18,24 @@
% } -% if( $FS::CurrentUser::CurrentUser->option('disable_html_editor') ) { - -% } -% else { -<% include('/elements/htmlarea.html', 'field' => 'comment_html', - 'curr_value' => $comment) %> +% if ( $FS::CurrentUser::CurrentUser->option('disable_html_editor') ) { + +% } else { + <& /elements/htmlarea.html, 'field' => 'comment_html', + 'curr_value' => $comment + &> % } -

+
+ +<& /elements/checkbox.html, 'field' => 'sticky', + 'value' => 1, + 'curr_value' => $sticky, +&> +Sticky note

+ "> @@ -42,6 +49,7 @@ my $conf = new FS::Conf; my $comment; my $notenum = ''; my $classnum; +my $sticky = 0; if ( $cgi->param('error') ) { $comment = $cgi->param('comment'); $classnum = $cgi->param('classnum'); @@ -52,6 +60,7 @@ if ( $cgi->param('error') ) { die "no such note: ". $notenum unless $note; $comment = $note->comments; $classnum = $note->classnum; + $sticky = $note->sticky; } $comment =~ s/\r//g; # remove weird line breaks to protect FCKeditor diff --git a/httemplate/edit/process/cust_main_note.cgi b/httemplate/edit/process/cust_main_note.cgi index 227297eef..53e616a43 100755 --- a/httemplate/edit/process/cust_main_note.cgi +++ b/httemplate/edit/process/cust_main_note.cgi @@ -33,6 +33,7 @@ my $new = new FS::cust_main_note ( { _date => time, usernum => $FS::CurrentUser::CurrentUser->usernum, comments => $comment, + sticky => scalar( $cgi->param('sticky') ), } ); my $error; diff --git a/httemplate/view/cust_main/notes/notes.html b/httemplate/view/cust_main/notes/notes.html index 6a7a06a02..fa45a68f2 100644 --- a/httemplate/view/cust_main/notes/notes.html +++ b/httemplate/view/cust_main/notes/notes.html @@ -34,6 +34,10 @@ % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; +% my %sticky_color = ( '#eeeeee' => '#ffff66', +% '#ffffff' => '#ffffb8', +% ); +% % my $bgcolor = ''; % my $last_classnum = -1; % my $skipheader = 0; @@ -56,7 +60,7 @@ % ";notenum=$notenum", % 'actionlabel' => emt('Edit customer note'), % 'width' => 616, -% 'height' => 538, #575 +% 'height' => 575, % 'frame' => 'top', % ); % my $clickjs = qq!onclick="$onclick"!; @@ -103,21 +107,23 @@ % $last_classnum = $note->classnum; % } +% my $color = $note->sticky ? $sticky_color{$bgcolor} : $bgcolor; + - <% note_datestr($note,$conf,$bgcolor) %> - + <% note_datestr($note,$conf,$color) %> +  <% $note->usernum ? $note->access_user->name : $note->otaker %> % if ($conf->exists('note-classes') && $conf->config('note-classes') == 1) { - + <% $note->classname %> % } - + <% $note->comments | defang %> % if($edit) { - <% $edit %> + <% $edit %> % } -- cgit v1.2.1 From 063d9f211aa19a26755279ad7277648cfdae6313 Mon Sep 17 00:00:00 2001 From: Alex Brelsfoard Date: Wed, 28 Jan 2015 06:15:41 -0500 Subject: RT #25498 adding reason to voided payments and voided invoices on payment history --- httemplate/view/cust_main/payment_history/voided_invoice.html | 2 +- httemplate/view/cust_main/payment_history/voided_payment.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate') diff --git a/httemplate/view/cust_main/payment_history/voided_invoice.html b/httemplate/view/cust_main/payment_history/voided_invoice.html index f9ff3079a..ba51b3bca 100644 --- a/httemplate/view/cust_main/payment_history/voided_invoice.html +++ b/httemplate/view/cust_main/payment_history/voided_invoice.html @@ -1,5 +1,5 @@ <% $link %><% $invoice %><% $link ? '' : '' %> -<% mt("voided [_1]", time2str($date_format, $cust_bill_void->void_date) ) |h %> +<% mt("voided ([_1]) [_2]", $cust_bill_void->reason, time2str($date_format, $cust_bill_void->void_date) ) |h %> % my $void_user = $cust_bill_void->void_access_user; % if ($void_user) { by <% $void_user->username %> diff --git a/httemplate/view/cust_main/payment_history/voided_payment.html b/httemplate/view/cust_main/payment_history/voided_payment.html index a8194a75f..207ab9cdd 100644 --- a/httemplate/view/cust_main/payment_history/voided_payment.html +++ b/httemplate/view/cust_main/payment_history/voided_payment.html @@ -1,5 +1,5 @@ <% mt("Payment [_1] by [_2]", $info, $cust_pay_void->otaker ) |h %> -<% mt("voided [_1]", time2str($date_format, $cust_pay_void->void_date) ) |h %> +<% mt("voided ([_1]) [_2]", $cust_pay_void->reason, time2str($date_format, $cust_pay_void->void_date) ) |h %> % my $void_user = $cust_pay_void->void_access_user; % if ($void_user) { by <% $void_user->username %> -- cgit v1.2.1 From 3ed9d0fa90662f037f3fb2f50632ccb34066a979 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Wed, 28 Jan 2015 14:18:44 -0800 Subject: allow punctuation in tax name on tax report, #33255 --- httemplate/search/report_tax.cgi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'httemplate') diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi index 83f2fc5d3..491cd42c5 100644 --- a/httemplate/search/report_tax.cgi +++ b/httemplate/search/report_tax.cgi @@ -151,7 +151,7 @@ TD.rowhead { font-weight: bold; text-align: left; padding: 0px 3px } <% emt('Out of taxable region') %> - + <% $money_sprintf->( $report->{outside } ) %> @@ -188,8 +188,9 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { $agentname = $agent->agentname; } -if ( $cgi->param('taxname') =~ /^([\w ]+)$/ ) { - $params{taxname} = $1; +# allow anything in here; FS::Report::Tax will treat it as unsafe +if ( length($cgi->param('taxname')) ) { + $params{taxname} = $cgi->param('taxname'); } else { die "taxname required"; } -- cgit v1.2.1