summaryrefslogtreecommitdiff
path: root/httemplate/search/phone_avail.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-02-05 16:23:29 -0800
committerMark Wells <mark@freeside.biz>2013-02-05 16:23:29 -0800
commitfed12e8214a8a951377961ccbe7a09171b1e38c2 (patch)
treeb3c902ff90c7397d49716844506a81f921ad9fa4 /httemplate/search/phone_avail.html
parentfc8d730d0a7b31b617c963c5619bd3f45c5c3eb6 (diff)
make customer location columns available in various reports, #940
Diffstat (limited to 'httemplate/search/phone_avail.html')
-rw-r--r--httemplate/search/phone_avail.html4
1 files changed, 3 insertions, 1 deletions
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+)$/;