summaryrefslogtreecommitdiff
path: root/FS/bin/freeside-setinvoice
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2010-12-27 00:04:45 +0000
committercvs2git <cvs2git>2010-12-27 00:04:45 +0000
commitc82d349f864e6bd9f96fd1156903bc1f7193a203 (patch)
treee117a87533656110b6acd56fc0ca64289892a9f5 /FS/bin/freeside-setinvoice
parent74e058c8a010ef6feb539248a550d0bb169c1e94 (diff)
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'FS/bin/freeside-setinvoice')
-rw-r--r--FS/bin/freeside-setinvoice42
1 files changed, 0 insertions, 42 deletions
diff --git a/FS/bin/freeside-setinvoice b/FS/bin/freeside-setinvoice
deleted file mode 100644
index 708e2fa30..000000000
--- a/FS/bin/freeside-setinvoice
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use FS::UID qw(adminsuidsetup);
-use FS::Conf;
-use FS::Record qw(qsearch qsearchs);
-use FS::cust_main;
-use FS::svc_acct;
-
-&untaint_argv; #what it sounds like (eww)
-my $user = shift or die &usage;
-
-adminsuidsetup $user;
-
-foreach my $cust_main (
- grep { ! scalar($_->invoicing_list) }
- qsearch( 'cust_main', {} )
-) {
- my @dest;
- my @cust_pkg = $cust_main->ncancelled_pkgs;
- foreach my $cust_pkg ( @cust_pkg ) {
- foreach my $cust_svc ( $cust_pkg->cust_svc ) {
- my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $cust_svc->svcnum } );
- push @dest, $svc_acct->svcnum if $svc_acct;
- }
- }
- push @dest, 'POST' unless @dest;
- $cust_main->invoicing_list(\@dest);
-}
-
-sub untaint_argv {
- foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV
- $ARGV[$_] =~ /^(.*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
- $ARGV[$_]=$1;
- }
-}
-
-sub usage {
- die "Usage:\n\n freeside-setinvoice user\n";
-}
-
-