my $agentnum = $opt{agentnum};
my $q = $opt{ignore_quantity} ? '1' : 'COALESCE(cust_pkg.quantity, 1)';
my $agentnum = $opt{agentnum};
my $q = $opt{ignore_quantity} ? '1' : 'COALESCE(cust_pkg.quantity, 1)';
- my $group_by = 'cust_location.censustract, technology, '.
- 'broadband_downstream, broadband_upstream ';
+ my $group_by = "$censustract, technology, broadband_downstream, broadband_upstream ";
my $order_by = $group_by;
"SELECT ".join(', ', @select) . "
my $order_by = $group_by;
"SELECT ".join(', ', @select) . "
my $date = $opt{date} || time;
my $agentnum = $opt{agentnum};
my $q = $opt{ignore_quantity} ? '1' : 'COALESCE(cust_pkg.quantity, 1)';
my $date = $opt{date} || time;
my $agentnum = $opt{agentnum};
my $q = $opt{ignore_quantity} ? '1' : 'COALESCE(cust_pkg.quantity, 1)';
# VoIP indicator (0 for non-VoIP, 1 for VoIP)
'COALESCE(is_voip, 0)',
# number of lines/subscriptions
# VoIP indicator (0 for non-VoIP, 1 for VoIP)
'COALESCE(is_voip, 0)',
# number of lines/subscriptions
"(is_voip = 1 OR is_phone = 1)",
);
push @where, "cust_main.agentnum = $agentnum" if $agentnum;
"(is_voip = 1 OR is_phone = 1)",
);
push @where, "cust_main.agentnum = $agentnum" if $agentnum;
my $order_by = $group_by;
"SELECT ".join(', ', @select) . "
my $order_by = $group_by;
"SELECT ".join(', ', @select) . "