X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fphone_avail.html;h=312c84ea9792b0bf8925bb27b46a120a0ccb06f8;hb=737c5d8b82defb7e3e40a14ee33c4f80c64a8f71;hp=1335379ae107466337509c5aedf251f640d81b1b;hpb=073169e80bea0560b64e468a76121bf837de34f3;p=freeside.git diff --git a/httemplate/search/phone_avail.html b/httemplate/search/phone_avail.html index 1335379ae..312c84ea9 100644 --- a/httemplate/search/phone_avail.html +++ b/httemplate/search/phone_avail.html @@ -125,9 +125,11 @@ my $search = scalar(@search) my $addl_from = ' LEFT JOIN cust_svc USING ( svcnum ) '. #' LEFT JOIN part_svc USING ( svcpart ) '. ' LEFT JOIN cust_pkg USING ( pkgnum ) '. - ' LEFT JOIN cust_main USING ( custnum ) '; + FS::UI::Web::join_cust_main('cust_pkg', 'cust_pkg'); my $count_query = "SELECT COUNT(*) FROM phone_avail $search"; #$addl_from? +# All of these relationships are left joined in the many-to-one direction, +# so including $addl_from won't affect the count. Logic! my $hashref = {}; $hashref->{'ordernum'} = $1 if $cgi->param('ordernum') =~ /^(\d+)$/;