[freeside-commits] branch master updated. 34697ae9ceec5c656a44b4c3ed8bfba29b39eea6
Ivan
ivan at 420.am
Sun Feb 3 19:45:19 PST 2013
The branch, master has been updated
via 34697ae9ceec5c656a44b4c3ed8bfba29b39eea6 (commit)
from d2eeb4a5d310fe5eb1b16ada10b57e01511122f9 (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 34697ae9ceec5c656a44b4c3ed8bfba29b39eea6
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sun Feb 3 19:45:14 2013 -0800
add location to credit application detail, RT#21054
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index eb2cd4d..be910c6 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -4085,15 +4085,34 @@ sub ship_contact_firstlast {
$contact->get('first') . ' '. $contact->get('last');
}
-=item country_full
+#XXX this doesn't work in 3.x+
+#=item country_full
+#
+#Returns this customer's full country name
+#
+#=cut
+#
+#sub country_full {
+# my $self = shift;
+# code2country($self->country);
+#}
-Returns this customer's full country name
+=item county_state_county [ PREFIX ]
+
+Returns a string consisting of just the county, state and country.
=cut
-sub country_full {
+sub county_state_country {
my $self = shift;
- code2country($self->country);
+ my $locationnum;
+ if ( @_ && $_[0] && $self->has_ship_address ) {
+ $locationnum = $self->ship_locationnum;
+ } else {
+ $locationnum = $self->bill_locationnum;
+ }
+ my $cust_location = qsearchs('cust_location', { locationnum=>$locationnum });
+ $cust_location->county_state_country;
}
=item geocode DATA_VENDOR
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main.pm | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
More information about the freeside-commits
mailing list