[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.133.2.11, 1.133.2.12
Ivan,,,
ivan at wavetail.420.am
Thu Sep 29 20:01:48 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv32122
Modified Files:
Tag: FREESIDE_2_3_BRANCH
MyAccount.pm
Log Message:
add locale to customer editable fields, initialize ticket system on startup, customer_info_short, RT#13656
Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.133.2.11
retrieving revision 1.133.2.12
diff -u -w -d -r1.133.2.11 -r1.133.2.12
--- MyAccount.pm 28 Sep 2011 01:34:23 -0000 1.133.2.11
+++ MyAccount.pm 30 Sep 2011 03:01:46 -0000 1.133.2.12
@@ -44,13 +44,23 @@
use vars qw( @cust_main_editable_fields );
@cust_main_editable_fields = qw(
first last company address1 address2 city
- county state zip country daytime night fax
+ county state zip country
+ daytime night fax mobile
ship_first ship_last ship_company ship_address1 ship_address2 ship_city
- ship_state ship_zip ship_country ship_daytime ship_night ship_fax
+ ship_state ship_zip ship_country
+ ship_daytime ship_night ship_fax ship_mobile
+ locale
payby payinfo payname paystart_month paystart_year payissue payip
ss paytype paystate stateid stateid_state
);
+BEGIN { #preload to reduce time customer_info takes
+ if ( $FS::TicketSystem::system ) {
+ warn "$me: initializing ticket system\n" if $DEBUG;
+ FS::TicketSystem->init();
+ }
+}
+
sub _cache {
$cache ||= new FS::ClientAPI_SessionCache( {
'namespace' => 'FS::ClientAPI::MyAccount',
@@ -377,7 +387,8 @@
( $session->{'pkgnum'} ? 1 : 0 ), #nobalance
);
- $return{name} = $cust_main->first. ' '. $cust_main->get('last');
+ $return{name} = $cust_main->name;
+ $return{ship_name} = $cust_main->ship_name;
for (@cust_main_editable_fields) {
$return{$_} = $cust_main->get($_);
@@ -466,22 +477,23 @@
1, ##nobalance
);
- $return{name} = $cust_main->first. ' '. $cust_main->get('last');
+ $return{name} = $cust_main->name;
+ $return{ship_name} = $cust_main->ship_name;
$return{payby} = $cust_main->payby;
#none of these are terribly expensive if we want 'em...
- #for (@cust_main_editable_fields) {
- # $return{$_} = $cust_main->get($_);
- #}
- #
- #if ( $cust_main->payby =~ /^(CARD|DCRD)$/ ) {
- # $return{payinfo} = $cust_main->paymask;
- # @return{'month', 'year'} = $cust_main->paydate_monthyear;
- #}
- #
- #$return{'invoicing_list'} =
- # join(', ', grep { $_ !~ /^(POST|FAX)$/ } $cust_main->invoicing_list );
+ for (@cust_main_editable_fields) {
+ $return{$_} = $cust_main->get($_);
+ }
+
+ if ( $cust_main->payby =~ /^(CARD|DCRD)$/ ) {
+ $return{payinfo} = $cust_main->paymask;
+ @return{'month', 'year'} = $cust_main->paydate_monthyear;
+ }
+
+ $return{'invoicing_list'} =
+ join(', ', grep { $_ !~ /^(POST|FAX)$/ } $cust_main->invoicing_list );
#$return{'postal_invoicing'} =
# 0 < ( grep { $_ eq 'POST' } $cust_main->invoicing_list );
More information about the freeside-commits
mailing list