summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorivan <ivan>2005-07-14 11:18:06 +0000
committerivan <ivan>2005-07-14 11:18:06 +0000
commit541d9682ea6f43e78b59dbf2f2aa282843117360 (patch)
treea7905aa6d9058f67b5e29df654b73b1da7bfe272 /httemplate/search
parent08662d58e7b9a13cf841e9c89daa39b28655724e (diff)
move account search (httemplate/search/svc_acct.cgi) to new template, cust-fields configuration value to control which customer fields are shown on reports
Diffstat (limited to 'httemplate/search')
-rwxr-xr-xhttemplate/search/cust_bill.html36
1 files changed, 10 insertions, 26 deletions
diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html
index 5e904e114..2108653a8 100755
--- a/httemplate/search/cust_bill.html
+++ b/httemplate/search/cust_bill.html
@@ -95,7 +95,7 @@
'cust_bill.*',
#( map "cust_main.$_", qw(custnum last first company) ),
'cust_main.custnum as cust_main_custnum',
- ( map "cust_main.$_", qw(last first company) ),
+ FS::UI::Web::cust_sql_fields(),
"$owed as owed",
),
'extra_sql' => "$extra_sql $orderby"
@@ -106,8 +106,7 @@
my $link = [ "${p}view/cust_bill.cgi?", 'invnum', ];
my $clink = sub {
my $cust_bill = shift;
- my $cust_main = $cust_bill->cust_main;
- $cust_main
+ $cust_bill->cust_main_custnum
? [ "${p}view/cust_main.cgi?", 'custnum' ]
: '';
};
@@ -154,32 +153,18 @@
'count_query' => $count_query,
'count_addl' => $count_addl,
'redirect' => $link,
- 'header' =>
- [ 'Invoice #', qw(Balance Amount Date), 'Contact name',
- 'Company' ],
+ 'header' => [ 'Invoice #',
+ 'Balance',
+ 'Amount',
+ 'Date',
+ FS::UI::Web::cust_header(),
+ ],
'fields' => [
'invnum',
sub { sprintf($money_char.'%.2f', shift->get('owed') ) },
sub { sprintf($money_char.'%.2f', shift->charged ) },
sub { time2str('%b %d %Y', shift->_date ) },
- sub { my $cust_bill = shift;
- # my $cust_main = $cust_bill->cust_main;
- # $cust_main
- # ? $cust_main->get('last'). ', '. $cust_main->first
- # : "WARNING: can't find cust_main.custnum ".
- # $cust_bill->custnum. ' (cust_bill.invnum '.
- # $cust_bill->invnum. ')';
- if ( $cust_bill->cust_main_custnum ) {
- FS::cust_main::name($cust_bill);
- } else {
- "WARNING: can't find cust_main.custnum ".
- $cust_bill->custnum. ' (cust_bill.invnum '.
- $cust_bill->invnum. ')';
- }
- },
- sub { my $cust_main = shift->cust_main;
- $cust_main ? $cust_main->company : '';
- },
+ \&FS::UI::Web::cust_fields,
],
'align' => 'rrrrll',
'links' => [
@@ -187,8 +172,7 @@
$link,
$link,
$link,
- $clink,
- $clink,
+ ( map { $clink } FS::UI::Web::cust_header() ),
],
)