summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-04-27 02:56:41 -0700
committerIvan Kohler <ivan@freeside.biz>2015-04-27 02:56:41 -0700
commit189707c123fab3152d231bdb1d75bf9f65e016ca (patch)
tree63a817974543b548fb77379f35e33faac12ee83b /FS/FS
parent048756865bec53d4c5fd7e2b6240ea8ecd583eaa (diff)
multiple payment options (package display: make "No automatic charge" label work correctly), RT#23741
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/cust_main.pm11
1 files changed, 11 insertions, 0 deletions
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</unflagged_suspended_pkgs>