summaryrefslogtreecommitdiff
path: root/bin/billco-upload
diff options
context:
space:
mode:
Diffstat (limited to 'bin/billco-upload')
-rw-r--r--bin/billco-upload20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/billco-upload b/bin/billco-upload
new file mode 100644
index 0000000..ce4a43d
--- /dev/null
+++ b/bin/billco-upload
@@ -0,0 +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 AGENTNUM in $AGENTNUMS; do
+
+ for a in header detail; do
+ mv agentnum$AGENTNUM-$a.csv agentnum$AGENTNUM-$date-$a.csv
+ done
+
+ zip agentnum$AGENTNUM-$date.zip agentnum$AGENTNUM-$date-header.csv agentnum$AGENTNUM-$date-detail.csv
+
+ echo $dir/agentnum$AGENTNUM-$date.zip
+
+done
+