X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_bill.html;h=51241575ca12772fcf8cec31902c7aedc53ecf37;hp=36e8bc91b73b2f6756b95d24e959c74e3e177bc1;hb=5cd995865b91204f7ce9233a8ba4d5eee62f9be4;hpb=c0c6e3937fb2fa8f6b7cab217461515e837c444f
diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html
index 36e8bc91b..51241575c 100755
--- a/httemplate/search/cust_bill.html
+++ b/httemplate/search/cust_bill.html
@@ -1,19 +1,81 @@
-
-
- Invoice Search
-
-
-
- Invoice Search
-
-
-
-
-
+%>
+<%= include( 'elements/search.html',
+ 'title' => 'Invoice Search Results',
+ 'name' => 'invoices',
+ 'query' => $sql_query,
+ 'count_query' => $count_query,
+ 'count_addl' => [ '$%.2f total amount',
+ '$%.2f total outstanding balance',
+ ],
+ 'redirect' => $link,
+ 'header' =>
+ [ '', qw(Balance Amount Date ), 'Contact name', 'Company' ],
+ 'fields' => [
+ 'invnum',
+ sub { sprintf('$%.2f', shift->get('owed') ) },
+ sub { sprintf('$%.2f', shift->charged ) },
+ sub { time2str('%b %d %Y', shift->_date ) },
+ sub { my $cust_main = shift->cust_main;
+ $cust_main->get('last'). ', '. $cust_main->first;
+ },
+ sub { my $cust_main = shift->cust_main;
+ $cust_main->company;
+ },
+ ],
+ 'links' => [
+ $link,
+ $link,
+ $link,
+ $link,
+ $clink,
+ $clink,
+ ],
+ )
+%>