From b51f95ce19785983728938439d1e2027b8e27569 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 15 Feb 2015 22:42:35 -0800 Subject: [PATCH] multiple payment options (remove freeside-daily and -monthly -p option), RT#23741 --- FS/FS/Cron/bill.pm | 2 -- FS/bin/freeside-daily | 11 ++++++++--- FS/bin/freeside-monthly | 8 ++++++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/FS/FS/Cron/bill.pm b/FS/FS/Cron/bill.pm index 98f1c2e6f..a82265452 100644 --- a/FS/FS/Cron/bill.pm +++ b/FS/FS/Cron/bill.pm @@ -190,8 +190,6 @@ sub bill_where { push @search, "( cust_main.archived != 'Y' OR archived IS NULL )"; #disable? - push @search, "cust_main.payby = '". $opt{'p'}. "'" - if $opt{'p'}; push @search, "cust_main.agentnum IN ( ". $opt{'a'}. " ) " if $opt{'a'}; diff --git a/FS/bin/freeside-daily b/FS/bin/freeside-daily index f14e2b337..af48ec0cb 100755 --- a/FS/bin/freeside-daily +++ b/FS/bin/freeside-daily @@ -12,6 +12,11 @@ getopts("p:a:d:vl:sy:nmrkg:o", \%opt); my $user = shift or die &usage; adminsuidsetup $user; + +die "The -p option has been removed in version 4 -- customers no longer have ". + "a single, specific payment type\n" + if $opt{'p'}; + my $log = FS::Log->new('daily'); $log->info('start'); @@ -108,7 +113,7 @@ sub untaint_argv { } sub usage { - die "Usage:\n\n freeside-daily [ -d 'date' ] [ -y days ] [ -p 'payby' ] [ -a agentnum,agentnum,... ] [ -s ] [ -v ] [ -l level ] [ -m ] [ -k ] user [ custnum custnum ... ]\n"; + die "Usage:\n\n freeside-daily [ -d 'date' ] [ -y days ] [ -a agentnum,agentnum,... ] [ -s ] [ -v ] [ -l level ] [ -m ] [ -k ] user [ custnum custnum ... ]\n"; } ### @@ -121,7 +126,7 @@ freeside-daily - Run daily billing and invoice collection events. =head1 SYNOPSIS - freeside-daily [ -d 'date' ] [ -y days ] [ -p 'payby' ] [ -a agentnum,agentnum,... ] [ -s ] [ -o ] [ -v ] [ -l level ] [ -m ] [ -r ] [ -k ] user [ custnum custnum ... ] + freeside-daily [ -d 'date' ] [ -y days ] [ -a agentnum,agentnum,... ] [ -s ] [ -o ] [ -v ] [ -l level ] [ -m ] [ -r ] [ -k ] user [ custnum custnum ... ] =head1 DESCRIPTION @@ -143,7 +148,7 @@ the bill and collect methods of a cust_main object. See L. with today's date, irregardless of the pretend date used to pre-generate the invoices. - -p: Only process customers with the specified payby (CARD, DCRD, CHEK, DCHK, BILL, COMP, LECB) + -p: Deprecated, will produce a fatal error (formerly was: Only process customers with the specified payby (CARD, DCRD, CHEK, DCHK, BILL, COMP, LECB)) -a: Only process customers with the specified agentnum. Multiple agentnums can be specified, separated with commas. diff --git a/FS/bin/freeside-monthly b/FS/bin/freeside-monthly index 431fbd86f..7be3776fc 100755 --- a/FS/bin/freeside-monthly +++ b/FS/bin/freeside-monthly @@ -12,6 +12,10 @@ getopts("p:a:d:vsy:m", \%opt); my $user = shift or die &usage; adminsuidsetup $user; +die "The -p option has been removed in version 4 -- customers no longer have ". + "a single, specific payment type" + if $opt{'p'}; + use FS::Cron::bill qw(bill); bill(%opt, 'check_freq'=>'1m' ); @@ -45,7 +49,7 @@ freeside-monthly - Run monthly billing and invoice collection events. =head1 SYNOPSIS - freeside-monthly [ -d 'date' ] [ -y days ] [ -p 'payby' ] [ -a agentnum ] [ -s ] [ -v ] user [ custnum custnum ... ] + freeside-monthly [ -d 'date' ] [ -y days ] [ -a agentnum ] [ -s ] [ -v ] user [ custnum custnum ... ] =head1 DESCRIPTION @@ -64,7 +68,7 @@ the bill and collect methods of a cust_main object. See L. "pretend date" 15 days from whatever was specified by the -d switch (or now, if no -d switch was given). - -p: Only process customers with the specified payby (CARD, DCRD, CHEK, DCHK, BILL, COMP, LECB) + -p: Deprecated, will produce a fatal error (formerly was: Only process customers with the specified payby (CARD, DCRD, CHEK, DCHK, BILL, COMP, LECB)) -a: Only process customers with the specified agentnum -- 2.11.0