if ( length($email) == 0 and $conf->exists('cust_main-require_invoicing_list_email', $agentnum) ) {
$error = 'Email address required';
}
if ( length($email) == 0 and $conf->exists('cust_main-require_invoicing_list_email', $agentnum) ) {
$error = 'Email address required';
}
if ($conf->exists('cust_main-require_invoicing_list_email', $agentnum)) {
my $has_email = 0;
foreach my $prefix (grep /^contactnum\d+$/, $cgi->param) {
if ($conf->exists('cust_main-require_invoicing_list_email', $agentnum)) {
my $has_email = 0;
foreach my $prefix (grep /^contactnum\d+$/, $cgi->param) {