[freeside-commits] branch master updated. e71a8fbc7e88c05b22584040e4aab1f24655b921
Ivan
ivan at 420.am
Wed Mar 27 19:58:18 PDT 2013
The branch, master has been updated
via e71a8fbc7e88c05b22584040e4aab1f24655b921 (commit)
from 1724266692e1e3ebe8d71a540077ddee92118bb2 (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 e71a8fbc7e88c05b22584040e4aab1f24655b921
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Mar 27 19:58:15 2013 -0700
use part_pkg_msgcat in self-service, RT#19906
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 08e506c..8ccacc5 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -636,11 +636,12 @@ sub billing_history {
push @history, {
'type' => 'Line item',
- 'description' => $_->desc. ( $_->sdate && $_->edate
- ? ' '. time2str('%d-%b-%Y', $_->sdate).
- ' To '. time2str('%d-%b-%Y', $_->edate)
- : ''
- ),
+ 'description' => $_->desc( $cust_main->locale ).
+ ( $_->sdate && $_->edate
+ ? ' '. time2str('%d-%b-%Y', $_->sdate).
+ ' To '. time2str('%d-%b-%Y', $_->edate)
+ : ''
+ ),
'amount' => sprintf('%.2f', $_->setup + $_->recur ),
'date' => $cust_bill->_date,
'date_pretty' => time2str('%m/%d/%Y', $cust_bill->_date ),
@@ -1584,7 +1585,7 @@ sub list_pkgs {
my $primary_cust_svc = $_->primary_cust_svc;
+{ $_->hash,
$_->part_pkg->hash,
- pkg_label => $_->pkg_label,
+ pkg_label => $_->pkg_locale,
status => $_->status,
part_svc =>
[ map { $_->hashref }
@@ -1698,7 +1699,7 @@ sub list_svcs {
'svcdb' => $svcdb,
'label' => $label,
'value' => $value,
- 'pkg_label' => $cust_pkg->pkg_label,
+ 'pkg_label' => $cust_pkg->pkg_locale,
'pkg_status' => $cust_pkg->status,
'readonly' => ($part_svc->selfservice_access eq 'readonly'),
);
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 9e188af..ed059d1 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -2645,7 +2645,7 @@ sub statuscolor {
=item pkg_label
Returns a label for this package. (Currently "pkgnum: pkg - comment" or
-"pkg-comment" depending on user preference).
+"pkg - comment" depending on user preference).
=cut
@@ -2672,6 +2672,17 @@ sub pkg_label_long {
$label;
}
+=item pkg_locale
+
+Returns a customer-localized label for this package.
+
+=cut
+
+sub pkg_locale {
+ my $self = shift;
+ $self->part_pkg->pkg_locale( $self->cust_main->locale );
+}
+
=item primary_cust_svc
Returns a primary service (as FS::cust_svc object) if one can be identified.
-----------------------------------------------------------------------
Summary of changes:
FS/FS/ClientAPI/MyAccount.pm | 15 ++++++++-------
FS/FS/cust_pkg.pm | 13 ++++++++++++-
2 files changed, 20 insertions(+), 8 deletions(-)
More information about the freeside-commits
mailing list