diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-06-18 18:43:55 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-06-18 18:43:55 -0700 |
commit | c93e10d1ea0304bea31416c31706a92998fa0159 (patch) | |
tree | 98692bf572951d2c36f302a0d61fd3c186e2d64d | |
parent | 479ec8dd320258a22165d05da9624e6571c0daaf (diff) |
fix (part of) 3.x performance regression on customers with tons of invoices, RT#29646, RT#12367
-rw-r--r-- | FS/FS/Template_Mixin.pm | 2 | ||||
-rw-r--r-- | FS/FS/cust_bill.pm | 8 | ||||
-rw-r--r-- | FS/FS/cust_bill_ApplicationCommon.pm | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 1c373f95d..64f0149fc 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 58288b4b5..f36ff3b07 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 d8ccdd0bf..75d2647cb 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 { |