projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 30783 js fix for ip selection
[freeside.git]
/
httemplate
/
search
/
cust_bill_pay_pkg.html
diff --git
a/httemplate/search/cust_bill_pay_pkg.html
b/httemplate/search/cust_bill_pay_pkg.html
index
a6738f3
..
e2ffd12
100644
(file)
--- a/
httemplate/search/cust_bill_pay_pkg.html
+++ b/
httemplate/search/cust_bill_pay_pkg.html
@@
-10,9
+10,11
@@
'Amount',
'By',
'#',
'Amount',
'By',
'#',
+ 'Card Type',
#payment
'Date',
#payment
'Date',
+ @on_header,
'By',
#application
'By',
#application
@@
-20,6
+22,7
@@
# line item
'Description',
# line item
'Description',
+ 'Package class',
'Location',
@post_desc_header,
'Location',
@post_desc_header,
@@
-36,8
+39,12
@@
$cust_pay->payby =~ /^(CARD|CHEK)$/
? $cust_pay->paymask : $cust_pay->payinfo;
},
$cust_pay->payby =~ /^(CARD|CHEK)$/
? $cust_pay->paymask : $cust_pay->payinfo;
},
-
+ sub { my $cust_pay = shift->cust_bill_pay->cust_pay;
+ $cust_pay->payby =~ /^CARD$/
+ ? cardtype($cust_pay->paymask) : '';
+ },
sub { time2str('%b %d %Y', shift->get('cust_pay_date') ) },
sub { time2str('%b %d %Y', shift->get('cust_pay_date') ) },
+ @on_field,
sub { shift->cust_bill_pay->cust_pay->otaker },
sub { sprintf($money_char.'%.2f', shift->amount ) },
sub { shift->cust_bill_pay->cust_pay->otaker },
sub { sprintf($money_char.'%.2f', shift->amount ) },
@@
-46,6
+53,7
@@
? $_[0]->get('pkg') # possibly use override.pkg
: $_[0]->get('itemdesc') # but i think this correct
},
? $_[0]->get('pkg') # possibly use override.pkg
: $_[0]->get('itemdesc') # but i think this correct
},
+ 'classname', #package class
$location_sub,
@post_desc,
'invnum',
$location_sub,
@post_desc,
'invnum',
@@
-55,10
+63,14
@@
'sort_fields' => [
'paid',
'', #payby
'sort_fields' => [
'paid',
'', #payby
+ '', #payinfo/paymask
+ '', #cardtype
'cust_pay_date',
'cust_pay_date',
+ @on_null, #order_number
'', #'otaker',
'', #amount
'', #line item description
'', #'otaker',
'', #amount
'', #line item description
+ '', #package class
'', #location
@post_desc_null,
'invnum',
'', #location
@post_desc_null,
'invnum',
@@
-71,6
+83,9
@@
'',
'',
'',
'',
'',
'',
+ @on_null,
+ '',
+ '',
'',
'',
'',
'',
'',
'',
@@
-81,7
+96,9
@@
FS::UI::Web::cust_header()
),
],
FS::UI::Web::cust_header()
),
],
- 'align' => 'rcrrlrlllrrcl'.
+ 'align' => 'rcrlr'.
+ $on_align.
+ 'lrlll'.
$post_desc_align.
'rr'.
FS::UI::Web::cust_aligns(),
$post_desc_align.
'rr'.
FS::UI::Web::cust_aligns(),
@@
-91,6
+108,9
@@
'',
'',
'',
'',
'',
'',
+ @on_null,
+ '',
+ '',
'',
'',
'',
'',
'',
'',
@@
-105,6
+125,9
@@
'',
'',
'',
'',
'',
'',
+ @on_null,
+ '',
+ '',
'',
'',
'',
'',
'',
'',
@@
-124,6
+147,17
@@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
+my @on_header = ();
+my @on_field = ();
+my @on_null = ();
+my $on_align = '';
+if ($cgi->param('show_order_number')) {
+ @on_header = ('Order Number');
+ @on_field = (sub { shift->cust_bill_pay->cust_pay->order_number });
+ @on_null = ('');
+ $on_align = 'r';
+}
+
my $conf = new FS::Conf;
my %payby = FS::payby->payby2shortname;
my $conf = new FS::Conf;
my %payby = FS::payby->payby2shortname;
@@
-415,6
+449,7
@@
if ( $cgi->param('nottax') ) {
$join_pkg = ' LEFT JOIN cust_pkg USING ( pkgnum )
LEFT JOIN part_pkg USING ( pkgpart )
$join_pkg = ' LEFT JOIN cust_pkg USING ( pkgnum )
LEFT JOIN part_pkg USING ( pkgpart )
+ LEFT JOIN pkg_class USING ( classnum )
LEFT JOIN part_pkg AS override
ON pkgpart_override = override.pkgpart ';
$join_pkg .= ' LEFT JOIN cust_location USING ( locationnum ) '
LEFT JOIN part_pkg AS override
ON pkgpart_override = override.pkgpart ';
$join_pkg .= ' LEFT JOIN cust_location USING ( locationnum ) '
@@
-454,7
+489,8
@@
if ( $cgi->param('nottax') ) {
#warn "neither nottax nor istax parameters specified";
#same as before?
$join_pkg = ' LEFT JOIN cust_pkg USING ( pkgnum )
#warn "neither nottax nor istax parameters specified";
#same as before?
$join_pkg = ' LEFT JOIN cust_pkg USING ( pkgnum )
- LEFT JOIN part_pkg USING ( pkgpart ) ';
+ LEFT JOIN part_pkg USING ( pkgpart )
+ LEFT JOIN pkg_class USING ( classnum )';
}
}
@@
-477,7
+513,7
@@
my @select = ( 'cust_bill_pay_pkg.*',
'cust_pay._date AS cust_pay_date',
'cust_bill._date',
);
'cust_pay._date AS cust_pay_date',
'cust_bill._date',
);
-push @select, 'part_pkg.pkg' unless $cgi->param('istax');
+push @select, 'part_pkg.pkg
, pkg_class.classname
' unless $cgi->param('istax');
push @select, 'cust_main.custnum',
FS::UI::Web::cust_sql_fields();
push @select, 'cust_main.custnum',
FS::UI::Web::cust_sql_fields();
@@
-493,10
+529,10
@@
if ( $conf->exists('enable_taxclasses') && ! $cgi->param('istax') ) {
push @select, 'part_pkg.taxclass'; # or should this use override?
}
push @select, 'part_pkg.taxclass'; # or should this use override?
}
-warn "$join_cust_bill_pkg
- $join_pkg
- $join_pay
- $join_cust";
+
#
warn "$join_cust_bill_pkg
+
#
$join_pkg
+
#
$join_pay
+
#
$join_cust";
my $query = {
'table' => 'cust_bill_pay_pkg',
my $query = {
'table' => 'cust_bill_pay_pkg',