diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /FS/bin/freeside-dedup-cust_bill_pkg_detail-header | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'FS/bin/freeside-dedup-cust_bill_pkg_detail-header')
-rwxr-xr-x | FS/bin/freeside-dedup-cust_bill_pkg_detail-header | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/FS/bin/freeside-dedup-cust_bill_pkg_detail-header b/FS/bin/freeside-dedup-cust_bill_pkg_detail-header deleted file mode 100755 index d887f21c0..000000000 --- a/FS/bin/freeside-dedup-cust_bill_pkg_detail-header +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use vars qw( %seen $opt_d ); -use Getopt::Std; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch); -use FS::cust_bill_pkg_detail; - -getopts('d'); - -my $user = shift or die &usage; -adminsuidsetup $user; - -my $extra_sql = "AND detail LIKE 'Date,Time%'"; -my @cust_bill_pkg_detail = qsearch( { 'table' => 'cust_bill_pkg_detail', - 'hashref' => {format => 'C'}, - 'extra_sql' => $extra_sql, - } ); -for my $detail (@cust_bill_pkg_detail) { - if ( $seen{$detail->billpkgnum} ) { - if ($opt_d) { # dry run - print "DELETE cust_bill_pkg_detail WHERE detailnum=". $detail->detailnum. - "\n"; - } else { - $detail->delete; - } - } else { - $seen{$detail->billpkgnum} = 1; - } -} - -sub usage { - die "Usage:\n\n freeside-sqlradius-dedup-group [-d] user\n"; -} - -=head1 NAME - -freeside-dedup-cust_bill_pkg_detail-header - Command line tool to eliminate duplicate headers from cdr details on invoices - -=head1 SYNOPSIS - - freeside-dedup-cust_bill_pkg_detail-header user - -=head1 DESCRIPTION - - Removes all but one header when duplicate entries exist on invoice - cdr details. - - -d: dry run - -=head1 SEE ALSO - -L<FS::part_pkg::voip_cdr> - -=cut - |