From c6b853b4f0516450b3e27acd281f667eadaec9f4 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 26 Dec 2001 02:33:30 +0000 Subject: [PATCH] fix service display for duplicates --- httemplate/edit/cust_pay.cgi | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) 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 ''. ''; -- 2.11.0