X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=f102d97eea2cb459448b8b76c17b09c27698a148;hp=a9d7ac7bd8cf7bba64a30ecde9753844b1c89ff2;hb=ad3bcb39580173f0ac1b6357cb49515d48af7ddf;hpb=0fda4498e5b48587090b03d40ea97fec1e024385 diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index a9d7ac7bd..f102d97ee 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -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