477 report: detect errors and fix them more easily, #32499, from #24047
[freeside.git] / FS / FS / cust_pkg.pm
index e42dd4e..01ee36f 100644 (file)
@@ -4970,9 +4970,8 @@ sub search {
         'agentnum'  => $agentnum,
         'detail'    => 1
       );
-      my $row = $report->[$rownum]
+      my $pkgnums = $report->{detail}->[$rownum]
         or die "row $rownum is past the end of the report";
-      my $pkgnums = $row->[-1] || '0';
         # '0' so that if there are no pkgnums (empty string) it will create
         # a valid query that returns nothing
       warn "PKGNUMS:\n$pkgnums\n\n"; # XXX debug