fastbill / fastbill-php-sdk

php sdk for the api of https://www.fastbill.com/
https://apidocs.fastbill.com/
MIT License
24 stars 14 forks source link

Creating ItemEntity with zero procent VAT #29

Closed jbrouns closed 3 years ago

jbrouns commented 4 years ago

It is not possible to create an ItemEntity with a vatPercent of 0.

Now the result gives this error: Uncaught FastBillSdk\Common\MissingPropertyException: The property vatPercent is not valid!

According to https://apidocs.fastbill.com/fastbill/en/invoice.html#invoice.create the VAT_PERCENT is required. But when I comment out the required property checks in the SDK, the API accepts the value of 0.

I think there are cases when 0 is a valid option (no tax is applied for transactions outside of EU for example)

What is your opinion?

Best regards, Julien

teiling88 commented 3 years ago

Hey @jbrouns, I fixed that and created the Version 0.0.9 which includes the patch :-)

jbrouns commented 3 years ago

Thank you very much!