summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2006-01-27 01:33:57 +0000
committerivan <ivan>2006-01-27 01:33:57 +0000
commitb5ecccfac56fc5d4eaa617a8c08dd168ffb74bac (patch)
treea19c970bd7c638516cb94789db9bb1d926df8a68
parentb782294eb91805f708a7776fe67f1c0863f4096b (diff)
on tax exemption report, show more info on the specific line item and invoice
-rw-r--r--httemplate/search/cust_tax_exempt_pkg.cgi67
1 files changed, 37 insertions, 30 deletions
diff --git a/httemplate/search/cust_tax_exempt_pkg.cgi b/httemplate/search/cust_tax_exempt_pkg.cgi
index bc1e743b2..e61947b7d 100644
--- a/httemplate/search/cust_tax_exempt_pkg.cgi
+++ b/httemplate/search/cust_tax_exempt_pkg.cgi
@@ -71,9 +71,9 @@ my $query = {
'hashref' => {},
'select' => join(', ',
'cust_tax_exempt_pkg.*',
- #'cust_bill_pkg.*',
- #'cust_bill._date',
- #'part_pkg.pkg',
+ 'cust_bill_pkg.*',
+ 'cust_bill.*',
+ 'part_pkg.pkg',
'cust_main.custnum',
FS::UI::Web::cust_sql_fields(),
),
@@ -94,32 +94,42 @@ my $money_char = $conf->config('money_char') || '$';
'count_addl' => [ $money_char. '%.2f total', ],
'header' => [
'#',
- 'Date',
+ 'Month',
'Amount',
-
- #'Description',
- #'Setup charge',
- #'Recurring charge',
- #'Invoice',
- #'Date',
-
+ 'Line item',
+ 'Invoice',
+ 'Date',
FS::UI::Web::cust_header(),
],
'fields' => [
'exemptpkgnum',
sub { $_[0]->month. '/'. $_[0]->year; },
- 'amount',
-
- #sub { $_[0]->pkgnum > 0
- # ? $_[0]->get('pkg')
- # : $_[0]->get('itemdesc')
- # },
- ##strikethrough or "N/A ($amount)" or something these when
- ## they're not applicable to pkg_tax search
- #sub { sprintf($money_char.'%.2f', shift->setup ) },
- #sub { sprintf($money_char.'%.2f', shift->recur ) },
- #'invnum',
- #sub { time2str('%b %d %Y', shift->_date ) },
+ sub { $money_char. $_[0]->amount; },
+
+ sub {
+ $_[0]->billpkgnum. ': '.
+ ( $_[0]->pkgnum > 0
+ ? $_[0]->get('pkg')
+ : $_[0]->get('itemdesc')
+ ).
+ ' ('.
+ ( $_[0]->setup > 0
+ ? $money_char. $_[0]->setup. ' setup'
+ : ''
+ ).
+ ( $_[0]->setup > 0 && $_[0]->recur > 0
+ ? ' / '
+ : ''
+ ).
+ ( $_[0]->recur > 0
+ ? $money_char. $_[0]->recur. ' recur'
+ : ''
+ ).
+ ')';
+ },
+
+ 'invnum',
+ sub { time2str('%b %d %Y', shift->_date ) },
\&FS::UI::Web::cust_fields,
],
@@ -128,16 +138,13 @@ my $money_char = $conf->config('money_char') || '$';
'',
'',
- #'',
- #'',
- #'',
- #'',
- #$ilink,
- #$ilink,
+ '',
+ $ilink,
+ $ilink,
( map { $clink } FS::UI::Web::cust_header() ),
],
- 'align' => 'rrr', # 'rlrrrc',
+ 'align' => 'rrrlrc', # 'rlrrrc',
)
%>