diff options
-rw-r--r-- | FS/FS/ConfDefaults.pm | 3 | ||||
-rw-r--r-- | FS/FS/UI/Web.pm | 4 | ||||
-rw-r--r-- | FS/FS/contact.pm | 2 | ||||
-rw-r--r-- | FS/FS/part_pkg/voip_cdr.pm | 12 | ||||
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/view_cdr_details.html | 10 | ||||
-rwxr-xr-x | httemplate/edit/cust_pkg_discount.html | 8 |
6 files changed, 30 insertions, 9 deletions
diff --git a/FS/FS/ConfDefaults.pm b/FS/FS/ConfDefaults.pm index 4c37175c3..987225f42 100644 --- a/FS/FS/ConfDefaults.pm +++ b/FS/FS/ConfDefaults.pm @@ -33,6 +33,9 @@ sub cust_fields_avail { ( 'Cust# | Cust. Status | Customer' => 'custnum | Status | Last, First or Company (Last, First)', + 'Agent | Agent Cust# or Cust# | Cust. Status | Customer' => + 'Agent | Agent Cust# | Status | Last, First or Company (Last, First)', + 'Customer | Day phone | Night phone | Mobile phone | Fax number' => 'Customer | (all phones)', 'Cust# | Customer | Day phone | Night phone | Mobile phone | Fax number' => diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 81c4c7b7b..6d6f7fbb6 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -346,6 +346,8 @@ sub cust_header { 'Payment Type' => 'cust_payby', 'Current Balance' => 'current_balance', 'Agent Cust#' => 'agent_custid', + 'Agent' => 'agent_name', + 'Agent Cust# or Cust#' => 'display_custnum', 'Advertising Source' => 'referral', ); $header2method{'Cust#'} = 'display_custnum' @@ -451,6 +453,8 @@ sub cust_sql_fields { if grep { $_ eq 'cust_payby' } @cust_fields; push @fields, 'agent_custid'; + push @fields, 'agentnum' if grep { $_ eq 'agent_name' } @cust_fields; + my @extra_fields = (); if (grep { $_ eq 'current_balance' } @cust_fields) { push @extra_fields, FS::cust_main->balance_sql . " AS current_balance"; diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm index 148fa6157..ad0de6e32 100644 --- a/FS/FS/contact.pm +++ b/FS/FS/contact.pm @@ -690,8 +690,6 @@ sub send_reset_email { #email it - my $conf = new FS::Conf; - my $cust_main = $self->cust_main or die "no customer"; #reset a password for a prospect contact? someday diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index 039690baf..2d8c359cf 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -198,6 +198,9 @@ tie my %accountcode_tollfree_field, 'Tie::IxHash', 'skip_dcontext' => { 'name' => 'Do not charge for CDRs where dcontext is set to any of these (comma-separated) values: ', }, + 'skip_dcontext_prefix' => { 'name' => 'Do not charge for CDRs where dcontext starts with: ', + }, + 'skip_dcontext_suffix' => { 'name' => 'Do not charge for CDRs where dcontext ends with: ', }, @@ -347,7 +350,8 @@ tie my %accountcode_tollfree_field, 'Tie::IxHash', use_cdrtypenum ignore_cdrtypenum use_calltypenum ignore_calltypenum ignore_disposition disposition_in disposition_prefix - skip_dcontext skip_dcontext_suffix skip_dst_prefix + skip_dcontext skip_dcontext_prefix skip_dcontext_suffix + skip_dst_prefix skip_dstchannel_prefix skip_src_length_more noskip_src_length_accountcode_tollfree accountcode_tollfree_ratenum accountcode_tollfree_field @@ -620,6 +624,12 @@ sub check_chargable { if $self->option_cacheable('skip_dcontext') =~ /\S/ && grep { $cdr->dcontext eq $_ } split(/\s*,\s*/, $self->option_cacheable('skip_dcontext')); + my $len_dcontext_prefix = + length($self->option_cacheable('skip_dcontext_prefix')); + return "dcontext starts with ". $self->option_cacheable('skip_dcontext_prefix') + if $len_dcontext_prefix + && substr($cdr->dcontext,0,$len_dcontext_prefix) eq $self->option_cacheable('skip_dcontext_prefix'); + my $len_suffix = length($self->option_cacheable('skip_dcontext_suffix')); return "dcontext ends with ". $self->option_cacheable('skip_dcontext_suffix') if $len_suffix diff --git a/fs_selfservice/FS-SelfService/cgi/view_cdr_details.html b/fs_selfservice/FS-SelfService/cgi/view_cdr_details.html index f39668247..d2be287ff 100644 --- a/fs_selfservice/FS-SelfService/cgi/view_cdr_details.html +++ b/fs_selfservice/FS-SelfService/cgi/view_cdr_details.html @@ -14,16 +14,18 @@ <TR> <TD WIDTH="50%"> <%= if ($previous < $beginning) { - $OUT .= qq!<A HREF="${url}view_cdr_details;svcnum=$svcnum;beginning=!; - $OUT .= qq!$previous;ending=$beginning">Previous period</A>!; + $OUT .= qq!<A HREF="${url}view_cdr_details;svcnum=$svcnum;!; + $OUT .= qq!inbound=1;! if $inbound; + $OUT .= qq!beginning=$previous;ending=$beginning">Previous period</A>!; }else{ ''; } %> </TD> <TD WIDTH="50%" ALIGN="right"> <%= if ($next > $ending) { - $OUT .= qq!<A HREF="${url}view_cdr_details;svcnum=$svcnum;beginning=!; - $OUT .= qq!$ending;ending=$next">Next period</A>!; + $OUT .= qq!<A HREF="${url}view_cdr_details;svcnum=$svcnum;!; + $OUT .= qq!inbound=1;! if $inbound; + $OUT .= qq!beginning=$ending;ending=$next">Next period</A>!; }else{ ''; }%> diff --git a/httemplate/edit/cust_pkg_discount.html b/httemplate/edit/cust_pkg_discount.html index e814c96c5..e65c613a0 100755 --- a/httemplate/edit/cust_pkg_discount.html +++ b/httemplate/edit/cust_pkg_discount.html @@ -14,13 +14,17 @@ <% include('/elements/error.html') %> -<FORM NAME="DiscountPkgForm" ACTION="<% $p %>edit/process/cust_pkg_discount.html" METHOD=POST> +<FORM NAME = "DiscountPkgForm" + ACTION = "<% $p %>edit/process/cust_pkg_discount.html" + METHOD = POST + onSubmit = "document.DiscountPkgForm.submit.disabled=true;" +> <INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>"> <% ntable('#cccccc') %> <TR> - <TH ALIGN="right">Current package </TH> + <TH ALIGN="right">Package </TH> <TD COLSPAN=7> <% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><B><% $part_pkg->pkg |h %></B> - <% $part_pkg->comment |h %> </TD> |