FluiTec / FluiTec.DatevSharp

DATEV-Library in C#
Other
14 stars 5 forks source link

Why is AccountLength that restrictive #6

Closed devbar closed 4 years ago

devbar commented 4 years ago

Thanks for this ground-breaking and easy to use library to produce datev compatible files.

What I am wondering about is the restriction to have account length 4 and 5 by default (or X and X+1 by setting X).

My base data is in DATEV SKR03 so my accounts have numbers with 4 digits. So e.g. if I want to close an account let's say 8400 to 8000, I am stucked.

Do you think it's a good idea to make the restriction optional e.g. by setting accountLength to 0 (no restriction)?

IInvocation commented 4 years ago

I'm not sure i'm getting you right (i'm neither an account nor a native speaker) - but i think you mean: The limit to AccountNumber (AccountLength = ImpersonalAccountLength+1) should not only allow AccountLength - but also ImpersonalAccountLength - right?

As far as i remember - the length of AccountLength must be ImpersonalAccountLength+1 (i'll check documentation on this tomorrow)

If both of this is true - i'll fix it right away by allowing ImpersonalAccountLength as well as ImpersonalAccountLength+1 / no limit however would be a bad idea since i'm 100% sure that ImpersonalAccountLength (and AccountLength) are limited to 9. (wouldnt expect datev to just swallow any higher number)

Thanks for helping here :)

devbar commented 4 years ago

I'm not sure i'm getting you right (i'm neither an account nor a native speaker)

Me too ;)

Ah okay, we are getting closer. You are right the default limit for personal accounts is 5 and for impersonal accounts 4. I read the documentation, now. But my problem is to book from impersonal account to impersonal account.

For example:

1600 Verbindlichkeiten 1000 €

to

0400 Betriebsaustattung 1000 €

I think a fix could be to allow ImpersonalAccountLength (4) in Account and ContraAccount but not PersonalAccountLength (5) for both.

+--------------------------+---------+
| Account  | ContraAccount | Allowed |
+--------------------------+---------+
| 4        | 4             | True    |
+--------------------------+---------+
| 4        | 5             | True    |
+--------------------------+---------+
| 5        | 4             | True    |
+--------------------------+---------+
| 5        | 5             | False   |
+--------------------------+---------+
IInvocation commented 4 years ago

This should fix the problem and still work according to the documentation - thanks for helping me out :)

devbar commented 4 years ago

Works like a charm, thank you very much