return "You are not permitted to create complimentary accounts."
if ! $self->custnum
&& $self->complimentary eq 'Y'
- && ! $FS::CurrentUser->CurrentUser->access_right('Complimentary customer');
+ && ! $FS::CurrentUser::CurrentUser->access_right('Complimentary customer');
if ( $self->paydate eq '' || $self->paydate eq '-' ) {
return "Expiration date required"
});
}
+sub has_cust_payby_auto {
+ my $self = shift;
+ scalar( qsearch({
+ 'table' => 'cust_payby',
+ 'hashref' => { 'custnum' => $self->custnum, },
+ 'extra_sql' => " AND payby IN ( 'CARD', 'CHEK' ) ",
+ 'order_by' => 'LIMIT 1',
+ }) );
+
+}
+
=item unsuspend
Unsuspends all unflagged suspended packages (see L</unflagged_suspended_pkgs>