RT#36813: Monthly Recurring Total [fixed order by]
authorJonathan Prykop <jonathan@freeside.biz>
Sun, 20 Sep 2015 00:36:55 +0000 (19:36 -0500)
committerJonathan Prykop <jonathan@freeside.biz>
Sun, 20 Sep 2015 00:36:55 +0000 (19:36 -0500)
httemplate/view/cust_main/billing.html

index f7ea68a..0c9f74a 100644 (file)
@@ -44,7 +44,7 @@
 %       'hashref'   => { 'custnum' => $cust_main->custnum, },
 %       'extra_sql' => 'AND ( cancel IS NULL OR cancel = 0 )
 %                       AND freq = '. dbh->quote($freq),
-%       'order_by'  => 'ORDER BY pkgnum', # to ensure old pkgs come before change_to_pkg
+%       'order_by'  => 'ORDER BY COALESCE(start_date,0), pkgnum', # to ensure old pkgs come before change_to_pkg
 %     }) or next;
 % 
 %     my $freq_pretty = $cust_pkg[0]->part_pkg->freq_pretty;