diff options
Diffstat (limited to 'bin/billco-upload')
-rw-r--r-- | bin/billco-upload | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/bin/billco-upload b/bin/billco-upload index f0adbd88b..ce4a43d5f 100644 --- a/bin/billco-upload +++ b/bin/billco-upload @@ -1,14 +1,20 @@ #!/bin/sh +AGENTNUMS="1 2 3" + date=`date +"%Y%m%d"` dir="/usr/local/etc/freeside/export.DBI:Pg:dbname=freeside/cust_bill" cd "$dir" -for a in header detail; do - mv spool-$a.csv $date-$a.csv -done +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 |