X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fbillco-upload;h=a5f67cda44182e581a3cab92aa28cd909033ec6d;hp=f0adbd88b946417425ffde59df717f862d5ecaad;hb=29d80a8582103ead0b5910391cabc45cb85fa836;hpb=2fa0c10b17335cf02aaa1b65781b09db8f0f3301 diff --git a/bin/billco-upload b/bin/billco-upload index f0adbd88b..a5f67cda4 100644 --- a/bin/billco-upload +++ b/bin/billco-upload @@ -1,14 +1,15 @@ -#!/bin/sh +#!/usr/bin/perl -date=`date +"%Y%m%d"` -dir="/usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/cust_bill" -cd "$dir" +use FS::UID qw(adminsuidsetup); +use FS::Cron::upload; -for a in header detail; do - mv spool-$a.csv $date-$a.csv -done +adminsuidsetup shift or die "usage: billco-upload username agentnum\n"; +my $agentnum = shift or die "usage: billco-upload username agentnum\n"; -zip $date.zip $date-header.csv $date-detail.csv - -echo $dir/$date.zip +FS::Cron::upload::billco_upload( 'agentnum' => $agentnum, + 'date' => time, + 'v' => 1, + 'l' => 2, + ); +1;