summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-12-14 12:55:27 -0800
committerMark Wells <mark@freeside.biz>2016-12-14 12:55:27 -0800
commit75ab0df930bcbf5173cdda2ce7704fdcf09d9d39 (patch)
tree1e389c19adf5d4a5b2c8404872ed6e8a417dcc65
parentbd730ebd92b6c8f9d07d943dcb276e0c9cde3e30 (diff)
parent2c5bb9b8dfea90e8aac3937dfd28e3826e9c5f99 (diff)
Merge branch 'FREESIDE_3_BRANCH' of git.freeside.biz:/home/git/freeside into 3.x
-rw-r--r--FS/FS/ConfDefaults.pm3
-rw-r--r--FS/FS/UI/Web.pm4
-rw-r--r--FS/FS/contact.pm2
-rw-r--r--FS/FS/part_pkg/voip_cdr.pm12
-rw-r--r--fs_selfservice/FS-SelfService/cgi/view_cdr_details.html10
-rwxr-xr-xhttemplate/edit/cust_pkg_discount.html8
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&nbsp;</TH>
+ <TH ALIGN="right">Package&nbsp;</TH>
<TD COLSPAN=7>
<% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><B><% $part_pkg->pkg |h %></B> - <% $part_pkg->comment |h %>
</TD>