Closed samuel-iseli closed 1 year ago
@nixnuex do you know why the codeclimate checks are not running? Added support for VAT needed by ortoloco. Could you deploy after reviewing?
Thanks a lot! Migration runs through, but for a bill amount of 1000.00 I get:
Inklusive MWST von 2.5% (24.39)
is there some issue with the rounding? Is this a float vs decimal issue?
And: with the VAT amount in brackets without unit, it's kind of hard to interpret. How could we add a configurable unit everywhere?
The VAT calculation is correct as 1000 is the amount including VAT. The VAT amount is then x/(1+r)*r where r is the VAT rate, eg 0.025.
Ah sorry, so everything looks good. Do we need to bump the version somewhere? In the past, updates were not pulled correctly otherwise.
Regarding CodeClimate, @motu55 might be able to help.
Added VAT support
vat_number
andvat_percent
fields (attention, vat_percent is really percent, unlike the rate fields)vat_rate
field andvat_amount
derived property. Rate is a float, e.g. 2.5% -> rate 0.025.vat_amount
fieldWhen generating bills and
vat_percent
is configured in settings, each new bill is initialized with the vat rate from settings. Only the subscription items on bills get anvat_amount
.The total VAT amount and number is shown for an invoice in the user web view and the PDF file, if the invoice contains VAT.
The bookings export has a new column for VAT amounts of subscription items.
Additional change: