projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't look up encryption config every record, RT#28526
[freeside.git]
/
FS
/
FS
/
cust_main.pm
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
74433d7
..
f102d97
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-1856,7
+1856,7
@@
sub check {
return "You are not permitted to create complimentary accounts."
if ! $self->custnum
&& $self->complimentary eq 'Y'
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"
if ( $self->paydate eq '' || $self->paydate eq '-' ) {
return "Expiration date required"
@@
-2015,6
+2015,17
@@
sub cust_payby {
});
}
});
}
+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>
=item unsuspend
Unsuspends all unflagged suspended packages (see L</unflagged_suspended_pkgs>