X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fbillco-upload;h=a5f67cda44182e581a3cab92aa28cd909033ec6d;hp=b224605bf82bad3dca5b1664b2989e4827ccf900;hb=793956b8a0c19d7d39103e94235b0ca13f0f3e84;hpb=0da0726449c32868963ddace7630892c37cdeb6f diff --git a/bin/billco-upload b/bin/billco-upload old mode 100644 new mode 100755 index b224605bf..a5f67cda4 --- a/bin/billco-upload +++ b/bin/billco-upload @@ -1,14 +1,15 @@ -#!/bin/sh +#!/usr/bin/perl -date = `date` -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;