projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix unit price display for one-time charges, #39641, from #31276
[freeside.git]
/
bin
/
part_pkg-bulk_change
diff --git
a/bin/part_pkg-bulk_change
b/bin/part_pkg-bulk_change
index
aecfea5
..
cf65c39
100755
(executable)
--- a/
bin/part_pkg-bulk_change
+++ b/
bin/part_pkg-bulk_change
@@
-1,19
+1,22
@@
#!/usr/bin/perl
use strict;
#!/usr/bin/perl
use strict;
-use vars qw( $opt_r $opt_o $opt_v );
+use vars qw( $opt_r $opt_
p $opt_
o $opt_v );
use Getopt::Std;
use FS::UID qw(adminsuidsetup);
use FS::Record qw(qsearch qsearchs);
use FS::part_pkg;
use FS::part_pkg_option;
use Getopt::Std;
use FS::UID qw(adminsuidsetup);
use FS::Record qw(qsearch qsearchs);
use FS::part_pkg;
use FS::part_pkg_option;
-getopts('ro:v:');
+getopts('r
p:
o:v:');
my $user = shift or &usage;
adminsuidsetup $user;
my $user = shift or &usage;
adminsuidsetup $user;
-foreach my $part_pkg ( qsearch('part_pkg', {}) ) {
+my %plan;
+%plan = ( 'plan' => $opt_p ) if $opt_p;
+
+foreach my $part_pkg ( qsearch('part_pkg',\%plan) ) {
next if ! $part_pkg->freq && $opt_r;
my %hash = (
next if ! $part_pkg->freq && $opt_r;
my %hash = (
@@
-50,7
+53,7
@@
cust_main-bulk_change
=head1 DESCRIPTION
=head1 DESCRIPTION
-Command-line tool to change
the payby field for a group of customer
s.
+Command-line tool to change
a set of package definition
s.
-r: recurring package definitions only
-r: recurring package definitions only