X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fbillco-upload;h=a5f67cda44182e581a3cab92aa28cd909033ec6d;hp=165eafadf65c951d59a0c56d7a48ea1b3228a453;hb=793956b8a0c19d7d39103e94235b0ca13f0f3e84;hpb=82a758a8e4aa37e1e312969b2b23b611205be9ec diff --git a/bin/billco-upload b/bin/billco-upload old mode 100644 new mode 100755 index 165eafadf..a5f67cda4 --- 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"; -echo 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;