Closed rojtjo closed 2 years ago
Cheers. Could you please add an accompanying test case that would have caught this error.
Hi @rojtjo, this is a breaking change. I don't have dim1 on my total line to choose the debtor ledger of the customer, instead of providing it in the request. After this update i get the following error: "Dimensie 1 moet altijd worden ingevuld.//De dimensie 1 mag niet leeg zijn als dimensie 2 gevuld is., Dimensie op niveau 2 mag niet worden ingevuld omdat de dimensie op niveau 1 leeg gelaten is."
So this change is not only applicable to the VAT line, but also to the Totals line. I hope you are able to correct this. Thank you.
It's been a while since I added this change so I'll have to read up on this again. If you happen to have time to create a pull request for this feel free, otherwise I'll try to have a look at this somewhere next week.
If you could have a look, that would be great. Thanks.
Hi @edwin-easytrans,
I'm sorry for the delay, I've been really busy these last few weeks.
I just pushed a potential fix to the fix/only-skip-setting-dim1-on-vat-line
branch. You should be able to install this using composer require php-twinfield/twinfield:dev-fix/only-skip-setting-dim1-on-vat-line
.
After you confirm this fixes your problem I'll merge these changes and make a new release.
Hi @rojtjo, Thank you very much for the fix. I have tested the changes and it works great again. Really appreciate your help!
Great to hear! I have created a new release (3.3.0) which includes these changes.
I ran into a TypeError while omitting dim1 field on a transaction line with type VAT. According to the Twinfield documentation the dim1 field can be empty for these transaction lines.
This seems to be true for all transaction types which allow VAT lines.