summaryrefslogtreecommitdiff
path: root/httemplate/search/cust_credit_bill_pkg.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-12-17 16:09:09 -0800
committerIvan Kohler <ivan@freeside.biz>2012-12-17 16:09:09 -0800
commitf2e7b5d30a04b6f050e0a82afd8b95c81730bc0c (patch)
treecd1708a142a33e95d18120721ef00c1ce026952f /httemplate/search/cust_credit_bill_pkg.html
parent65acf1fd9746f1dd98e061044657c185367f7903 (diff)
add taxclass and paid/credit columns to line item reports, clickthrough to credit detail, RT#18676
Diffstat (limited to 'httemplate/search/cust_credit_bill_pkg.html')
-rw-r--r--httemplate/search/cust_credit_bill_pkg.html46
1 files changed, 25 insertions, 21 deletions
diff --git a/httemplate/search/cust_credit_bill_pkg.html b/httemplate/search/cust_credit_bill_pkg.html
index 4612118a2..a57a5ae1a 100644
--- a/httemplate/search/cust_credit_bill_pkg.html
+++ b/httemplate/search/cust_credit_bill_pkg.html
@@ -1,10 +1,10 @@
<% include( 'elements/search.html',
- 'title' => 'Tax credits', #well, actually application of
- 'name' => 'tax credits', # credit to line item
- 'query' => $query,
- 'count_query' => $count_query,
- 'count_addl' => [ $money_char. '%.2f total', ],
- 'header' => [
+ 'title' => 'Credit application detail', #to line item
+ 'name_singular' => 'credit application',
+ 'query' => $query,
+ 'count_query' => $count_query,
+ 'count_addl' => [ $money_char. '%.2f total', ],
+ 'header' => [
#'#',
'Amount',
@@ -21,8 +21,8 @@
'Invoice',
'Date',
FS::UI::Web::cust_header(),
- ],
- 'fields' => [
+ ],
+ 'fields' => [
#'creditbillpkgnum',
sub { sprintf($money_char.'%.2f', shift->amount ) },
@@ -37,8 +37,8 @@
'invnum',
sub { time2str('%b %d %Y', shift->_date ) },
\&FS::UI::Web::cust_fields,
- ],
- 'sort_fields' => [
+ ],
+ 'sort_fields' => [
'amount',
'cust_credit_date',
'', #'otaker',
@@ -47,8 +47,8 @@
'invnum',
'_date',
#cust fields
- ],
- 'links' => [
+ ],
+ 'links' => [
'',
'',
'',
@@ -59,9 +59,9 @@
( map { $_ ne 'Cust. Status' ? $clink : '' }
FS::UI::Web::cust_header()
),
- ],
- 'align' => 'rrlllrr'.FS::UI::Web::cust_aligns(),
- 'color' => [
+ ],
+ 'align' => 'rrlllrr'.FS::UI::Web::cust_aligns(),
+ 'color' => [
'',
'',
'',
@@ -71,7 +71,7 @@
'',
FS::UI::Web::cust_colors(),
],
- 'style' => [
+ 'style' => [
'',
'',
'',
@@ -80,7 +80,7 @@
'',
'',
FS::UI::Web::cust_styles(),
- ],
+ ],
)
%>
<%init>
@@ -106,6 +106,10 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
push @where, "cust_main.agentnum = $1";
}
+if ( $cgi->param('billpkgnum') =~ /^(\d+)$/ ) {
+ push @where, "billpkgnum = $1";
+}
+
#classnum
# not specified: all classes
# 0: empty class
@@ -346,7 +350,7 @@ if ( $cgi->param('cust_tax') ) {
push @where, $cust_exempt;
}
-my $count_query = "SELECT COUNT(DISTINCT billpkgnum),
+my $count_query = "SELECT COUNT(DISTINCT creditbillpkgnum),
SUM(cust_credit_bill_pkg.amount)";
my $join_cust =
@@ -412,8 +416,8 @@ my $join_credit = ' LEFT JOIN cust_credit_bill USING ( creditbillnum )
LEFT JOIN cust_credit USING ( crednum ) ';
$count_query .= " FROM cust_credit_bill_pkg
- $join_pkg
$join_cust_bill_pkg
+ $join_pkg
$join_credit
$join_cust
$where";
@@ -430,8 +434,8 @@ push @select, 'cust_main.custnum',
my $query = {
'table' => 'cust_credit_bill_pkg',
- 'addl_from' => "$join_pkg
- $join_cust_bill_pkg
+ 'addl_from' => "$join_cust_bill_pkg
+ $join_pkg
$join_credit
$join_cust",
'hashref' => {},