summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-06-18 18:43:54 -0700
committerIvan Kohler <ivan@freeside.biz>2014-06-18 18:43:54 -0700
commitb7d918470cb8018332c05d17ef989ed4e9740ed3 (patch)
tree207794a64e6cfdb850e079dbf7aba10086343754 /FS
parentca69a0d849a8a54417c777559b3fc342f0f11415 (diff)
fix (part of) 3.x performance regression on customers with tons of invoices, RT#29646, RT#12367
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Template_Mixin.pm2
-rw-r--r--FS/FS/cust_bill.pm8
-rw-r--r--FS/FS/cust_bill_ApplicationCommon.pm2
3 files changed, 9 insertions, 3 deletions
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 {