UK Vat change from 17.5 to 15% - How will this affect your code?

前端 未结 9 1614
醉梦人生
醉梦人生 2020-12-24 08:04

The UK VAT system is changing from 17.5% to 15%. What strategies have you used in your code to store the VAT, and how will the change affect your applications. Do you store

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-24 08:44

    I am just working on something to do this for when the rate changes back.

    Which ever way you do it, there's no need to record a start and an end date in your vat table since the vat periods run directly after each other.

    You can access the correct vat by doing a query like the one below, where vat_date is the start date for the VAT rate.

    SELECT * FROM vat WHERE NOW() > vat_date ORDER BY vat_date DESC LIMIT 1
    

提交回复
热议问题