-# Revision 1.9 1999-07-17 10:38:52 ivan
+# Revision 1.10 2000-07-17 12:49:29 ivan
+# better error message if a package isn't linked to a customer (that shouldn't happen)
+#
+# Revision 1.9 1999/07/17 10:38:52 ivan
# scott nelson <scott@ultimanet.com> noticed this mod_perl-triggered bug and
# gave me a great bugreport at the last rhythmethod
#
# scott nelson <scott@ultimanet.com> noticed this mod_perl-triggered bug and
# gave me a great bugreport at the last rhythmethod
#
my($cust_main)=qsearchs('cust_main',{'custnum'=>$cust_pkg->custnum});
my($pkgnum,$custnum,$name,$company)=(
$cust_pkg->pkgnum,
my($cust_main)=qsearchs('cust_main',{'custnum'=>$cust_pkg->custnum});
my($pkgnum,$custnum,$name,$company)=(
$cust_pkg->pkgnum,
- $cust_main->custnum,
- $cust_main->last. ', '. $cust_main->first,
- $cust_main->company,
+ $cust_pkg->custnum,
+ $cust_main ? $cust_main->last. ', '. $cust_main->first : '',
+ $cust_main ? $cust_main->company : '',
<TD><FONT SIZE=-1><A HREF="${p}view/cust_main.cgi?$custnum">$custnum</A></FONT></TD>
<TD><FONT SIZE=-1><A HREF="${p}view/cust_main.cgi?$custnum">$name</A></FONT></TD>
<TD><FONT SIZE=-1><A HREF="${p}view/cust_main.cgi?$custnum">$company</A></FONT></TD>
</TR>
END
<TD><FONT SIZE=-1><A HREF="${p}view/cust_main.cgi?$custnum">$custnum</A></FONT></TD>
<TD><FONT SIZE=-1><A HREF="${p}view/cust_main.cgi?$custnum">$name</A></FONT></TD>
<TD><FONT SIZE=-1><A HREF="${p}view/cust_main.cgi?$custnum">$company</A></FONT></TD>
</TR>
END