Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / search / cust_tax_exempt.cgi
index b1abada..f075d19 100644 (file)
@@ -14,7 +14,7 @@
                  'fields'      => [
                    'exemptnum',
                    sub { $_[0]->month. '/'. $_[0]->year; },
-                   sub { my $h = $_->h_search('insert');
+                   sub { my $h = $_[0]->h_search('insert');
                          $h ? time2str('%L/%d/%Y', $h->history_date ) : ''
                        },
                    sub { $money_char. $_[0]->amount; },
@@ -50,9 +50,7 @@
 %>
 <%init>
 
-my $join_cust = "
-    LEFT JOIN cust_main USING ( custnum )
-";
+my $join_cust = FS::UI::Web::join_cust_main('cust_tax_exempt');
 
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('View customer tax exemptions');