Tuesday, March 21, 2017

MySQL snippet : Calculate GST inclusive price from existing price

SELECT 
 name, 
 cost,
 price+ROUND( (price *(6/100)), 2 ) AS roundedgstvalue
FROM 
 `sma_products`
WHERE 
 `id` = '77';

2 comments:

  1. inclusive = price * (6/106) /* 100 + 6 */
    exclusive = price * (6/100)

    ReplyDelete