fix (part of) 3.x performance regression on customers with tons of invoices, RT#29646...
[freeside.git] / FS / FS / cust_bill.pm
index 3113c20..31a749c 100644 (file)
@@ -2404,9 +2404,12 @@ Returns a string with the invoice number and date, for example:
 
 =cut
 
+#note: this uses _date_pretty_unlocalized because _date_pretty is too expensive
+# for backend use (and also does the wrong thing, localizing for end customer
+# instead of backoffice configured date format)
 sub invnum_date_pretty {
   my $self = shift;
-  $self->mt('Invoice #'). $self->invnum. ' ('. $self->_date_pretty. ')';
+  $self->mt('Invoice #'). $self->invnum. ' ('. $self->_date_pretty_unlocalized. ')';
 }
 
 #sub _items_extra_usage_sections {