[freeside-commits] branch master updated. 2262a7d8fce9b3353a74b77888421618f8a2b484

Mark Wells mark at 420.am
Sat May 26 15:16:48 PDT 2012


The branch, master has been updated
       via  2262a7d8fce9b3353a74b77888421618f8a2b484 (commit)
      from  6b21147108df6cd94522fcaaa9e06254bd74f993 (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 2262a7d8fce9b3353a74b77888421618f8a2b484
Author: Mark Wells <mark at freeside.biz>
Date:   Sat May 26 15:16:40 2012 -0700

    service contact fields in message templates, #940

diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 56338e5..62cb837 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -4001,7 +4001,7 @@ sub ship_name_short {
   my $self = shift;
   $self->service_contact 
     ? $self->ship_contact_firstlast 
-    : $self->name_company_or_firstlast;
+    : $self->name_short
 }
 
 =item contact
diff --git a/FS/FS/msg_template.pm b/FS/FS/msg_template.pm
index c3e781a..ffb4f52 100644
--- a/FS/FS/msg_template.pm
+++ b/FS/FS/msg_template.pm
@@ -468,11 +468,9 @@ sub substitutions {
       daytime night mobile fax
 
       has_ship_address
-      ship_last ship_first ship_company
       ship_name ship_name_short ship_contact ship_contact_firstlast
       ship_address1 ship_address2 ship_city ship_county ship_state ship_zip
       ship_country
-      ship_daytime ship_night ship_mobile ship_fax
 
       paymask payname paytype payip
       num_cancelled_pkgs num_ncancelled_pkgs num_pkgs
@@ -485,11 +483,15 @@ sub substitutions {
       signupdate dundate
       packages recurdates
       ),
-      #compatibility: obsolete ship_ fields
-      map ( { [ "ship_$_"   => sub { shift->$_ } ] } 
-        qw( last first company name name_short contact contact_firstlast
-            daytime night fax )
+      #compatibility: obsolete ship_ fields - use the non-ship versions
+      map (
+        { my $field = $_;
+          [ "ship_$field"   => sub { shift->$field } ]
+        }
+        qw( last first company daytime night fax )
       ),
+      # ship_name, ship_name_short, ship_contact, ship_contact_firstlast
+      # still work, though
       [ expdate           => sub { shift->paydate_epoch } ], #compatibility
       [ signupdate_ymd    => sub { $ymd->(shift->signupdate) } ],
       [ dundate_ymd       => sub { $ymd->(shift->dundate) } ],

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_main.pm    |    2 +-
 FS/FS/msg_template.pm |   14 ++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)




More information about the freeside-commits mailing list