[freeside-commits] branch master updated. 5f4452d8d9cfe03330e3dc1da529ff6cf0f65882
Ivan
ivan at 420.am
Tue Jan 13 20:10:11 PST 2015
The branch, master has been updated
via 5f4452d8d9cfe03330e3dc1da529ff6cf0f65882 (commit)
via ab47ba58c84178ee08d732cdd1634a18bd668398 (commit)
via 00e19620ce5ce0a59389c443a2f53bc6fc443bd3 (commit)
from 005784113c4ddfb3924ae68408c87dc6cb171640 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5f4452d8d9cfe03330e3dc1da529ff6cf0f65882
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Jan 13 20:10:09 2015 -0800
fix customer-specific pending payment search, RT#32962
diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index 8aece0c..b5172fb 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -239,14 +239,14 @@ if ( $cgi->param('magic') ) {
if ( $cgi->param('magic') eq '_date' ) {
if ( $cgi->param('agentnum') && $cgi->param('agentnum') =~ /^(\d+)$/ ) {
- push @search, "agentnum = $1"; # $search{'agentnum'} = $1;
+ push @search, "cust_main.agentnum = $1"; # $search{'agentnum'} = $1;
my $agent = qsearchs('agent', { 'agentnum' => $1 } );
die "unknown agentnum $1" unless $agent;
$title = $agent->agent. " $title";
}
if ( $cgi->param('refnum') && $cgi->param('refnum') =~ /^(\d+)$/ ) {
- push @search, "refnum = $1";
+ push @search, "cust_main.refnum = $1";
my $part_referral = qsearchs('part_referral', { 'refnum' => $1 } );
die "unknown refnum $1" unless $part_referral;
$title = $part_referral->referral. " $title";
@@ -262,7 +262,7 @@ if ( $cgi->param('magic') ) {
}
if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
- push @search, "custnum = $1";
+ push @search, "$table.custnum = $1";
}
if ( $cgi->param('payby') ) {
@@ -421,22 +421,22 @@ if ( $cgi->param('magic') ) {
#for cust_pay_pending... statusNOT=done
if ( $cgi->param('statusNOT') =~ /^(\w+)$/ ) {
- push @search, "status != '$1'";
+ push @search, "$table.status != '$1'";
}
my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi);
- push @search, "_date >= $beginning ",
- "_date <= $ending";
+ push @search, "$table._date >= $beginning ",
+ "$table._date <= $ending";
if ( $table eq 'cust_pay_void' ) {
my($v_beginning, $v_ending) =
FS::UI::Web::parse_beginning_ending($cgi, 'void');
- push @search, "void_date >= $v_beginning ",
- "void_date <= $v_ending";
+ push @search, "$table.void_date >= $v_beginning ",
+ "$table.void_date <= $v_ending";
}
- push @search, FS::UI::Web::parse_lt_gt($cgi, $amount_field );
+ push @search, FS::UI::Web::parse_lt_gt($cgi, "$table.$amount_field" );
$orderby = '_date';
@@ -517,7 +517,7 @@ if ( $cgi->param('magic') ) {
my $search = ' WHERE '. join(' AND ', @search);
- $count_query = "SELECT COUNT(*), SUM($amount_field) ";
+ $count_query = "SELECT COUNT(*), SUM($table.$amount_field) ";
$count_query .= ', SUM(' . "FS::$table"->unapplied_sql . ') '
if $unapplied;
$count_query .= "FROM $table $addl_from".
@@ -545,7 +545,7 @@ if ( $cgi->param('magic') ) {
$cgi->param('payby') =~ /^(\w+)$/ or die "illegal payby";
my $payby = $1;
- $count_query = "SELECT COUNT(*), SUM($amount_field) FROM $table".
+ $count_query = "SELECT COUNT(*), SUM($table.$amount_field) FROM $table".
" WHERE payinfo = '$payinfo' AND payby = '$payby'".
" AND ". $curuser->agentnums_sql;
@count_addl = ( '$%.2f total '.$opt{name_verb} );
commit ab47ba58c84178ee08d732cdd1634a18bd668398
Merge: 00e1962 0057841
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Jan 13 20:10:05 2015 -0800
Merge branch 'master' of git.freeside.biz:/home/git/freeside
commit 00e19620ce5ce0a59389c443a2f53bc6fc443bd3
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Jan 13 09:56:39 2015 -0800
not installing bin/ in 4.x
diff --git a/debian/freeside.docs b/debian/freeside.docs
index 64bf802..f4a511b 100644
--- a/debian/freeside.docs
+++ b/debian/freeside.docs
@@ -1,3 +1,2 @@
README
AGPL
-bin/
-----------------------------------------------------------------------
Summary of changes:
debian/freeside.docs | 1 -
httemplate/search/elements/cust_pay_or_refund.html | 22 ++++++++++----------
2 files changed, 11 insertions(+), 12 deletions(-)
More information about the freeside-commits
mailing list