[freeside-commits] branch FREESIDE_3_BRANCH updated. c93e10d1ea0304bea31416c31706a92998fa0159

Ivan ivan at 420.am
Wed Jun 18 18:43:56 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  c93e10d1ea0304bea31416c31706a92998fa0159 (commit)
      from  479ec8dd320258a22165d05da9624e6571c0daaf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c93e10d1ea0304bea31416c31706a92998fa0159
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jun 18 18:43:55 2014 -0700

    fix (part of) 3.x performance regression on customers with tons of invoices, RT#29646, RT#12367

diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 1c373f9..64f0149 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -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
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index 58288b4..f36ff3b 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -2458,7 +2458,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
 
@@ -2467,7 +2469,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 {
diff --git a/FS/FS/cust_bill_ApplicationCommon.pm b/FS/FS/cust_bill_ApplicationCommon.pm
index d8ccdd0..75d2647 100644
--- a/FS/FS/cust_bill_ApplicationCommon.pm
+++ b/FS/FS/cust_bill_ApplicationCommon.pm
@@ -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 {

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Template_Mixin.pm              |    2 +-
 FS/FS/cust_bill.pm                   |    8 ++++++--
 FS/FS/cust_bill_ApplicationCommon.pm |    2 ++
 3 files changed, 9 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list