if ( $cgi->param('pkgnum') ) {
- my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cgi->param('pkgnum') } );
+ my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => scalar($cgi->param('pkgnum')) } );
$object->agentnum( $cust_pkg->cust_main->agentnum );
$opt->{action} = 'Custom';
$recur_disabled = $object->freq ? 0 : 1;
+ $recur_show_zero_disabled =
+ $object->freq
+ ? $object->option('recur_fee') > 0 ? 1 : 0
+ : 1;
+
};
my $discount_error_callback = sub {
: ''
). '>';
- } elsif ( $href->{$field}{'type'} eq 'select-rt-customfield' ) {
+ } elsif ( $href->{$field}{'type'} =~ /^select-rt-/ ) {
- $html .= include('/elements/select-rt-customfield.html',
+ $html .= include('/elements/'.$href->{$field}{'type'}.'.html',
'name' => $layer.'__'.$field,
'curr_value' => $options{$field},
map { $_ => $href->{$field}{$_} }