+print "<BR><BR>Customer #<B>$custnum</B>". ntable('#e8e8e8');
+my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
+ or die "unknown custnum $custnum";
+
+print '<TR><TD>'. ntable("#cccccc",2).
+ '<TR><TD ALIGN="right" VALIGN="top">Billing</TD><TD BGCOLOR="#ffffff">'.
+ $cust_main->getfield('last'). ', '. $cust_main->first. '<BR>';
+print $cust_main->company. '<BR>' if $cust_main->company;
+print $cust_main->address1. '<BR>';
+print $cust_main->address2. '<BR>' if $cust_main->address2;
+print $cust_main->city. ', '. $cust_main->state. ' '. $cust_main->zip. '<BR>';
+print $cust_main->country. '<BR>' if $cust_main->country
+ && $cust_main->country ne $countrydefault;
+
+print '</TD>'.
+ '</TR></TABLE></TD>';
+
+if ( defined $cust_main->dbdef_table->column('ship_last') ) {
+
+ print '<TD>'. ntable("#cccccc",2).
+ '<TR><TD ALIGN="right" VALIGN="top">Service</TD><TD BGCOLOR="#ffffff">'.
+ $cust_main->getfield('ship_last'). ', '. $cust_main->ship_first. '<BR>';
+ print $cust_main->ship_company. '<BR>' if $cust_main->ship_company;
+ print $cust_main->ship_address1. '<BR>';
+ print $cust_main->ship_address2. '<BR>' if $cust_main->ship_address2;
+ print $cust_main->ship_city. ', '. $cust_main->ship_state. ' '. $cust_main->ship_zip. '<BR>';
+ print $cust_main->ship_country. '<BR>'
+ if $cust_main->ship_country && $cust_main->ship_country ne $countrydefault;
+
+ print '</TD>'.
+ '</TR></TABLE></TD>';
+}
+
+print '</TR></TABLE>';
+
+
+print '<BR><BR>Payment'. ntable("#cccccc", 2).
+ '<TR><TD ALIGN="right">Date</TD><TD BGCOLOR="#ffffff">'.
+ time2str("%D",$_date). '</TD></TR>'.
+ qq!<INPUT TYPE="hidden" NAME="_date" VALUE="$_date">!;