Page 1 of 1

ABA files V7

PostPosted: Wed Jan 27, 2016 12:28 pm
by tonys
Hi,

I need the Self balancing coded added to the make ABA file in V7


The output gave you the extra line below (second from the bottom)

0 01BWA KENLOW (1982) PTY LTD 173918Jiwa 0000000110515
1015-209493311287 500002760925ZIPTRACK PTY LTD Kenlow 306-068 4974883KENLOW 00000000
1306-068 4974883T130002760925KENLOW (1982) PTY LTD ZIPTRAK PAYMENT 306-068 4974883KENLOW (1982) PT00000000
7306-068 000000000000027609250002760925 000002

Original V6 Breakout below.

Make ABA File
'-------------
Const ForReading = 1, ForWriting = 2

Dim FileName
Dim fso, f
Dim TextOut
Dim lCreditor
Dim RecordCount
Dim TotalDebits
Dim TotalCredits
Dim DirectEntryUserID

DirectEntryUserID = "173918"

FileName = "j:\aba bankwest\" & ChequePaymentObject.BatchNo & ".ABA"

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile(FileName, True)

TextOut = "0" _
& Space(17) _
& "01" _
& Left(ChequePaymentObject.BankEFTCode & Space(3), 3) _
& Space(7) _
& Left(ChequePaymentObject.BankAccountName & Space(26), 26) _
& Right("000000" & DirectEntryUserID, 6) _
& Left("Jiwa " & ChequePaymentObject.BatchNo & Space(12), 12)

TextOut = TextOut & Right("00" & Mid(ChequePaymentObject.Database.FormatDate(ChequePaymentObject.DateRun),13,2),2) _
& Right("00" & Mid(ChequePaymentObject.Database.FormatDate(ChequePaymentObject.DateRun),10,2),2) _
& Right("00" & Mid(ChequePaymentObject.Database.FormatDate(ChequePaymentObject.DateRun),7,2),2)

TextOut = TextOut & Space(40)

f.WriteLine TextOut

RecordCount = 0

For Each lCreditor In ChequePaymentObject.Creditors
If lCreditor.ChequeAmount <> 0 Then

RecordCount = RecordCount + 1

TotalCredits = TotalCredits + lCreditor.ChequeAmount

TextOut = "1" _
& Left(lCreditor.BankAccountBSBN & Space(7), 7) _
& Right(Space(9) & lCreditor.BankAccountNo, 9) _
& " " _
& "50" _
& Right("0000000000" & Trim(Replace(CStr(FormatNumber(lCreditor.ChequeAmount, 2,,,0)),".","")),10) _
& Left(lCreditor.BankAccountName & Space(32), 32) _
& Left(lCreditor.CreditorAltAccNo & Space(18), 18) _
& Left(ChequePaymentObject.BankAccountBSBN & Space(7), 7) _
& Right(Space(9) & ChequePaymentObject.BankAccountNumber, 9) _
& Left("KENLOW" & Space(16), 16) _
& "00000000"

f.WriteLine TextOut
End If
Next

RecordCount = RecordCount + 1
TotalDebits = TotalCredits
TextOut = "1" _
& Left(ChequePaymentObject.BankAccountBSBN & Space(7), 7) _
& Right(Space(9) & ChequePaymentObject.BankAccountNumber, 9) _
& Left("T", 1) _
& "13" _
& Right("0000000000" & Trim(Replace(CStr(FormatNumber(TotalDebits, 2,,,0)),".","")), 10) _
& Left(ChequePaymentObject.BankAccountName & Space(32), 32) _
& Left("Creditors Payments" & Space(18), 18) _
& Left(ChequePaymentObject.BankAccountBSBN & Space(7), 7) _
& Right(Space(9) & ChequePaymentObject.BankAccountNumber, 9) _
& Left(ChequePaymentObject.BankAccountName & Space(16), 16) _
& "00000000"

f.WriteLine TextOut

TextOut = "7" _
& Left(ChequePaymentObject.BankAccountBSBN & Space(7), 7) _
& Space(12) _
& Right("0000000000" & Trim(Replace(CStr(FormatNumber(TotalCredits - TotalDebits,2,,0)),".","")), 10) _
& Right("0000000000" & Trim(Replace(CStr(FormatNumber(TotalCredits, 2,,,0)),".","")), 10) _
& Right("0000000000" & Trim(Replace(CStr(FormatNumber(TotalDebits, 2,,,0)),".","")), 10) _
& Space(24) _
& Right("000000" & RecordCount, 6) _
& Space(40)

f.WriteLine TextOut

f.Close

MsgBox FileName & " Created."

End Sub

Re: ABA files V7  Topic is solved

PostPosted: Wed Jan 27, 2016 1:47 pm
by Mike.Sheen
Attached is what I believe is the addition of that balancing record to the output file.

I've just used a visual comparison of the breakout script you provided and the standard V7 Export plugin. Without a proper specification of what how the file is supposed to be structured I can't be sure it is correct.

Make sure you disable the standard version 7 export to ABA plugin once you have imported the attached plugin.

Re: ABA files V7

PostPosted: Thu Feb 04, 2016 11:24 am
by tonys
Thanks
I'll load it and have a test.

Cheers

Re: ABA files V7

PostPosted: Wed Mar 09, 2016 9:24 pm
by Mike.Sheen
tonys wrote:Thanks
I'll load it and have a test.

Cheers


Did it work?