piesync / billbo

Easy to use billing service for Stripe with VAT support
MIT License
73 stars 3 forks source link

Difference between "No VAT payable" and "Zero VAT rate" #81

Closed dv closed 8 years ago

dv commented 8 years ago

Checking out this code:

  # Calculates VAT rate.
  #
  # country_code     - ISO country code.
  # vat_registered   - true if customer is vat registered
  #
  # Returns an integer (rate).
  def vat_rate(country_code:, vat_registered:)
    # VAT Rate is zero if country code is nil.
    return 0 if country_code.nil?

    # Companies pay VAT in the origin country when you are VAT registered there.
    # Individuals always need to pay the VAT rate set in their origin country.
    if registered?(country_code) || (eu?(country_code) && !vat_registered)
      VAT_RATES[country_code]

    # Companies in other EU countries don't need to pay VAT.
    # All non-EU customers don't need to pay VAT.
    else
      0
    end
  end

I notice that zero-rate VAT and no VAT is made equivalent. Fiscally speaking they are two different animals entirely, though. If I remember correctly, adding 0% VAT rate to something or adding no VAT to something incurs different reporting requirements.

Maybe we should update this API to return nil vs 0 where appropriate. In this case, only Companies in other EU countries don't need to pay VAT. should get 0, where everyone else gets nil.

But maybe we should get that checked with an accountant to be sure :)

challengee commented 8 years ago

As you can see in https://github.com/piesync/billbo/tree/master/spec/visual, you always have to mention VAT, if it's zero, we have to explain why (see the asterix). I don't think there's a situation where we don't mention VAT on the invoice.

dv commented 8 years ago

Aha I see, perfect 👍