diff options
Diffstat (limited to 'httemplate/search/cust_pay.cgi')
-rwxr-xr-x | httemplate/search/cust_pay.cgi | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/httemplate/search/cust_pay.cgi b/httemplate/search/cust_pay.cgi index 42b3c01bc..64fe1f93a 100755 --- a/httemplate/search/cust_pay.cgi +++ b/httemplate/search/cust_pay.cgi @@ -68,7 +68,7 @@ my $hsearch = join(' AND ', map { "$_ = '$search{$_}'" } keys %search ); $count_query = "SELECT COUNT(*), SUM(paid) ". - "FROM cust_pay JOIN cust_main USING ( custnum )". + "FROM cust_pay LEFT JOIN cust_main USING ( custnum )". ( $hsearch ? " WHERE $hsearch " : '' ). $search; @@ -77,7 +77,7 @@ 'table' => 'cust_pay', 'hashref' => \%search, 'extra_sql' => "$search ORDER BY _date", - 'addl_from' => 'JOIN cust_main USING ( custnum )', + 'addl_from' => 'LEFT JOIN cust_main USING ( custnum )', }; } else { |