stuarta0 / banking-au

Australian Banking File Formats Library
MIT License
14 stars 2 forks source link

Two bugs #1

Open wizofaus opened 8 years ago

wizofaus commented 8 years ago

Your calculation of the net total is wrong (needs to be Math.Abs(debit - credit), and the Indicator field appears to need

    [FieldNullValue(Indicator.None)]

for it to deserialize properly. Also you get some strange errors deserializing if you use negative amounts.

stuarta0 commented 8 years ago

Do you have a redacted file that I can test with? I'm not sure whether it's all related to the negative amounts issue you mention, or whether the spec for net total shouldn't include other record transaction codes that aren't credit or debit.

wizofaus commented 8 years ago

I changed the code already so the files I’m generating are correct – the net should be the difference between the debit and credit totals, as per the spec (though you lose the sign, so there’s no way of telling from that amount whether the debits totalled higher or lower than the credits). The negative amounts problem is unrelated – aba files aren’t intended to store negative amounts.

From: Stuart Attenborrow [mailto:notifications@github.com] Sent: Wednesday, 20 July 2016 4:56 PM To: stuarta0/banking-au banking-au@noreply.github.com Cc: wizofaus d.nicholson@1paycorp.com; Author author@noreply.github.com Subject: Re: [stuarta0/banking-au] Two bugs (#1)

Do you have a redacted file that I can test with? I'm not sure whether it's all related to the negative amounts issue you mention, or whether the spec for net total shouldn't include other record transaction codes that aren't credit or debit.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/stuarta0/banking-au/issues/1#issuecomment-233857401, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFHaAZqoutCEdYynIEYrD76oxyCUsYO0ks5qXcZ7gaJpZM4JQbhj.