mitch000001 / go-hbci

A client library to use the HBCI standard
Other
64 stars 11 forks source link

wrong booking date #20

Open svenjeppsson opened 5 years ago

svenjeppsson commented 5 years ago

I have a situation that I already have descripted here: Originally posted by @svenjeppsson in https://github.com/mitch000001/go-hbci/issues/19#issuecomment-456695842

Found the reason: https://github.com/mitch000001/go-hbci/blob/d1fd34bcbec7e3a2bfe1e4b651c7e22fb7140cc3/swift/mt940.go#L243-L246

ValutaDate ist 1.1.2019 BookingDate is actually 28.12.2018 diffdrences of month is 11 So this logic make the booking to 28.12.2020

I guess it is not so easy to just turn the add 1 year int subtract on yes. What are the other situations?

Is there no booking year in the mt940 data?

svenjeppsson commented 5 years ago

I have a solution for this, i will fix that in my fork