X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=bin%2Fbillco-upload;h=ce4a43d5f4ed54a4a87fef693d77af6767d66260;hb=21ff7d72efff4294d16c1e6cf3c4eb374659c5d8;hp=b224605bf82bad3dca5b1664b2989e4827ccf900;hpb=0da0726449c32868963ddace7630892c37cdeb6f;p=freeside.git diff --git a/bin/billco-upload b/bin/billco-upload index b224605bf..ce4a43d5f 100644 --- a/bin/billco-upload +++ b/bin/billco-upload @@ -1,14 +1,20 @@ #!/bin/sh -date = `date` -dir = /usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/cust_bill -cd $dir +AGENTNUMS="1 2 3" -for a in header detail; do - mv spool-$a.csv $date-$a.csv -done +date=`date +"%Y%m%d"` +dir="/usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/cust_bill" +cd "$dir" + +for AGENTNUM in $AGENTNUMS; do + + for a in header detail; do + mv agentnum$AGENTNUM-$a.csv agentnum$AGENTNUM-$date-$a.csv + done -zip $date.zip $date-header.csv $date-detail.csv + zip agentnum$AGENTNUM-$date.zip agentnum$AGENTNUM-$date-header.csv agentnum$AGENTNUM-$date-detail.csv -echo $dir/$date.zip + echo $dir/agentnum$AGENTNUM-$date.zip + +done