From: Ivan Kohler <ivan@freeside.biz>
Date: Sun, 2 Nov 2014 19:10:38 +0000 (-0800)
Subject: fix dates on aradial usage import, RT#29053
X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;ds=sidebyside;h=8dfa2f14821acce6f5c89d447ba49b47339a3d36;hp=e3efeaeaa661d78fcbf0a257b929db15f7892495;p=freeside.git

fix dates on aradial usage import, RT#29053
---

diff --git a/bin/aradial-sftp_and_import b/bin/aradial-sftp_and_import
index 0cb6bca3a..53357033c 100755
--- a/bin/aradial-sftp_and_import
+++ b/bin/aradial-sftp_and_import
@@ -169,6 +169,7 @@ foreach my $filename ( @$ls ) {
     my @extra_values = ();
     if ( $hash{'Status-Type'} eq 'Start' ) {
 
+      push @keys, 'AcctStartTime';
       $dbhash{'AcctStartTime'} = $hash{'Date'};
 
       $sql = 'INSERT INTO radacct ( '. join(',', @keys).
@@ -177,6 +178,8 @@ foreach my $filename ( @$ls ) {
     } elsif ( $hash{'Status-Type'} eq 'Stop' ) {
 
       my $AcctSessionId = delete($dbhash{AcctSessionId});
+
+      push @keys, 'AcctStopTime';
       $dbhash{'AcctStopTime'} = $hash{'Date'};
 
       push @extra_values, $AcctSessionId;