summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2006-01-03 08:45:27 +0000
committerivan <ivan>2006-01-03 08:45:27 +0000
commitff0c9737888772449b0b28b13657c0dc43fc0ae4 (patch)
tree53e5489b1e7b0617e78372cd78894472fde487d9
parenta223750d9f7a4548319007807c3564ff3a8ebe40 (diff)
agentnums 1-3
-rw-r--r--bin/billco-upload16
1 files changed, 11 insertions, 5 deletions
diff --git a/bin/billco-upload b/bin/billco-upload
index f0adbd8..ce4a43d 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