[freeside-commits] branch master updated. b7d918470cb8018332c05d17ef989ed4e9740ed3

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


The branch, master has been updated
       via  b7d918470cb8018332c05d17ef989ed4e9740ed3 (commit)
      from  ca69a0d849a8a54417c777559b3fc342f0f11415 (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 b7d918470cb8018332c05d17ef989ed4e9740ed3
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jun 18 18:43:54 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 31a749c..4fb4a7d 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -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 {
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