Well I was thinking of how I should store and handle it inside postgres. Someone else told me to use numeric(4, 4) as type. And I could do checks using scale(rate) and rate >= 0 😀 I think that feels like a good solution. Then all values will have to be between 0 and 0.9999 (0-99,99%)
05/22/2022, 9:05 PM
Numeric is the recommended type "on the web" for % in Postgres. BUT what will you do when VAT is greater than 100% 😂
05/22/2022, 9:33 PM
Doubt VAT will ever be greater than 99,99% for selling some casual products, but if so, numeric(5, 4) would allow for VAT rates of up to 999,99%, right?😎
05/23/2022, 2:12 AM
@Ludvig like I said, any solution is great as long as you stick with it and stay consistent through out your front end.