fix (part of) 3.x performance regression on customers with tons of invoices, RT#29646...
authorIvan Kohler <ivan@freeside.biz>
Thu, 19 Jun 2014 01:43:54 +0000 (18:43 -0700)
committerIvan Kohler <ivan@freeside.biz>
Thu, 19 Jun 2014 01:43:54 +0000 (18:43 -0700)
FS/FS/Template_Mixin.pm
FS/FS/cust_bill.pm
FS/FS/cust_bill_ApplicationCommon.pm

index 1c373f9..64f0149 100644 (file)
@@ -1821,7 +1821,7 @@ configured for the back-office.  Use _date_pretty for end-customer display use.
 
 sub _date_pretty_unlocalized {
   my $self = shift;
-  $self->time2str($date_format, $self->_date);
+  time2str($date_format, $self->_date);
 }
 
 =item _items_sections OPTIONS
index 31a749c..4fb4a7d 100644 (file)
@@ -2400,7 +2400,9 @@ sub invoice_barcode {
 =item invnum_date_pretty
 
 Returns a string with the invoice number and date, for example:
-"Invoice #54 (3/20/2008)"
+"Invoice #54 (3/20/2008)".
+
+Intended for back-end context, with regard to translation and date formatting.
 
 =cut
 
@@ -2409,7 +2411,9 @@ Returns a string with the invoice number and date, for example:
 # instead of backoffice configured date format)
 sub invnum_date_pretty {
   my $self = shift;
-  $self->mt('Invoice #'). $self->invnum. ' ('. $self->_date_pretty_unlocalized. ')';
+  #$self->mt('Invoice #').
+  'Invoice #'. #XXX should be translated ala web UI user (not invoice customer)
+    $self->invnum. ' ('. $self->_date_pretty_unlocalized. ')';
 }
 
 #sub _items_extra_usage_sections {
index d8ccdd0..75d2647 100644 (file)
@@ -503,6 +503,8 @@ sub cust_bill {
 Returns a string representing the invoice (see L<FS::cust_bill>), for example:
 "applied to Invoice #54 (3/20/2008)"
 
+Intended for back-end context, with regard to translation and date formatting.
+
 =cut
 
 sub applied_to_invoice {