X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=03154adc3ad35cde697240ba286ce19ab2183db8;hb=46e04077cc22ff9d31e8e9896cbf97e31f1b0e7d;hp=796996554fd0ee543f6f0076b3ba032dca145644;hpb=8d421ec3cb2697a0fcc75db12a8975a2d92cf25f;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 796996554..03154adc3 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -5,6 +5,7 @@ use strict; #FS::cust_main:_Marketgear when they're ready to move to 2.1 use base qw( FS::cust_main::Packages FS::cust_main::Billing FS::cust_main::Billing_Realtime + FS::cust_main::Billing_Discount FS::otaker_Mixin FS::payinfo_Mixin FS::cust_main_Mixin FS::geocode_Mixin FS::Record @@ -2208,12 +2209,13 @@ Returns all notes (see L) for this customer. =cut sub notes { - my $self = shift; - #order by? + my($self,$orderby_classnum) = (shift,shift); + my $orderby = "_DATE DESC"; + $orderby = "CLASSNUM ASC, $orderby" if $orderby_classnum; qsearch( 'cust_main_note', { 'custnum' => $self->custnum }, '', - 'ORDER BY _DATE DESC' + "ORDER BY $orderby", ); }