From 80f722b82cb92fa49ee172230be3c61f72e56f41 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 15 Aug 2010 06:21:06 +0000 Subject: fix payment and refund searches by otaker (now usernum), RT#9555 --- httemplate/misc/process/batch-cust_pay.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/misc/process/batch-cust_pay.cgi') diff --git a/httemplate/misc/process/batch-cust_pay.cgi b/httemplate/misc/process/batch-cust_pay.cgi index 058a2251a..4da00c63d 100644 --- a/httemplate/misc/process/batch-cust_pay.cgi +++ b/httemplate/misc/process/batch-cust_pay.cgi @@ -42,6 +42,6 @@ % } else { % % -<% $cgi->redirect(popurl(3). "search/cust_pay.cgi?magic=paybatch;paybatch=$paybatch") %> +<% $cgi->redirect(popurl(3). "search/cust_pay.html?magic=paybatch;paybatch=$paybatch") %> % } -- cgit v1.2.1 From 5250c44bd7f282c7d782bf0e8349af12376929df Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 22 Sep 2010 19:16:20 +0000 Subject: prepayment discounts rt#5318 --- httemplate/misc/process/batch-cust_pay.cgi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'httemplate/misc/process/batch-cust_pay.cgi') diff --git a/httemplate/misc/process/batch-cust_pay.cgi b/httemplate/misc/process/batch-cust_pay.cgi index 4da00c63d..aefc00654 100644 --- a/httemplate/misc/process/batch-cust_pay.cgi +++ b/httemplate/misc/process/batch-cust_pay.cgi @@ -11,12 +11,13 @@ % #while ( exists($param->{"custnum$row"}) ) { % for ( my $row = 0; exists($param->{"custnum$row"}); $row++ ) { % push @cust_pay, new FS::cust_pay { -% 'custnum' => $param->{"custnum$row"}, -% 'paid' => $param->{"paid$row"}, -% 'payby' => 'BILL', -% 'payinfo' => $param->{"payinfo$row"}, -% 'paybatch' => $paybatch, -% } +% 'custnum' => $param->{"custnum$row"}, +% 'paid' => $param->{"paid$row"}, +% 'payby' => 'BILL', +% 'payinfo' => $param->{"payinfo$row"}, +% 'discount_term' => $param->{"discount_term$row"}, +% 'paybatch' => $paybatch, +% } % if $param->{"custnum$row"} % || $param->{"paid$row"} % || $param->{"payinfo$row"}; -- cgit v1.2.1 From 7f75baeccde8bf68e6914ce7efac73cdb7e7dcd0 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 23 Sep 2010 23:21:06 +0000 Subject: fix use of agent_custid in quick payment entry, RT#10035 --- httemplate/misc/process/batch-cust_pay.cgi | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'httemplate/misc/process/batch-cust_pay.cgi') diff --git a/httemplate/misc/process/batch-cust_pay.cgi b/httemplate/misc/process/batch-cust_pay.cgi index aefc00654..e51b9e6d7 100644 --- a/httemplate/misc/process/batch-cust_pay.cgi +++ b/httemplate/misc/process/batch-cust_pay.cgi @@ -10,8 +10,27 @@ % #my $row = 0; % #while ( exists($param->{"custnum$row"}) ) { % for ( my $row = 0; exists($param->{"custnum$row"}); $row++ ) { +% my $custnum = $param->{"custnum$row"}; +% my $cust_main; +% if ( $custnum =~ /^(\d+)$/ and $1 <= 2147483647 ) { +% $cust_main = qsearchs({ +% 'table' => 'cust_main', +% 'hashref' => { 'custnum' => $1 }, +% 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, +% }); +% } +% if ( !$cust_main ) { # not found, try agent_custid +% $cust_main = qsearchs({ +% 'table' => 'cust_main', +% 'hashref' => { 'agent_custid' => $custnum }, +% 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, +% }); +% } +% $custnum = $cust_main->custnum if $cust_main; +% # if !$cust_main, then this will throw an error on batch_insert +% % push @cust_pay, new FS::cust_pay { -% 'custnum' => $param->{"custnum$row"}, +% 'custnum' => $custnum, % 'paid' => $param->{"paid$row"}, % 'payby' => 'BILL', % 'payinfo' => $param->{"payinfo$row"}, -- cgit v1.2.1