X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pay.cgi;h=dfef3c54292b86c32ea47ed6ad65dee73189f728;hb=c6b853b4f0516450b3e27acd281f667eadaec9f4;hp=6669b9de48c33a916c7a0cbb9e9e7c2fdd19d926;hpb=c00273147a2d400779fcdaf34f171b2180faa453;p=freeside.git
diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi
index 6669b9de4..dfef3c542 100755
--- a/httemplate/edit/cust_pay.cgi
+++ b/httemplate/edit/cust_pay.cgi
@@ -1,5 +1,5 @@
<%
-#
+#
use strict;
use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid );
@@ -121,15 +121,23 @@ print ''.
if ( defined $cust_main->dbdef_table->column('ship_last') ) {
+ my $pre = $cust_main->ship_last ? 'ship_' : '';
+
print '
'. ntable("#cccccc",2).
' | Service | '.
- $cust_main->getfield('ship_last'). ', '. $cust_main->ship_first. ' ';
- print $cust_main->ship_company. ' ' if $cust_main->ship_company;
- print $cust_main->ship_address1. ' ';
- print $cust_main->ship_address2. ' ' if $cust_main->ship_address2;
- print $cust_main->ship_city. ', '. $cust_main->ship_state. ' '. $cust_main->ship_zip. ' ';
- print $cust_main->ship_country. ' '
- if $cust_main->ship_country && $cust_main->ship_country ne $countrydefault;
+ $cust_main->get("${pre}last"). ', '.
+ $cust_main->get("${pre}first"). ' ';
+ print $cust_main->get("${pre}company"). ' '
+ if $cust_main->get("${pre}company");
+ print $cust_main->get("${pre}address1"). ' ';
+ print $cust_main->get("${pre}address2"). ' '
+ if $cust_main->get("${pre}address2");
+ print $cust_main->get("${pre}city"). ', '.
+ $cust_main->get("${pre}state"). ' '.
+ $cust_main->get("${pre}ship_zip"). ' ';
+ print $cust_main->get("${pre}country"). ' '
+ if $cust_main->get("${pre}country")
+ && $cust_main->get("${pre}country") ne $countrydefault;
print ' | '.
'
';