douhuan6305 2016-08-01 05:19
浏览 54
已采纳

从包括税收在内的总金额计算19%的税

I am trying to calculate the 19% of taxes from the total amount like this

<?php echo number_format($show['total']*0.19,0,',',''); ?>

The problem is, the product total price is 12990 so the real and correct taxes from this amount including the taxes is 2074 but with this code the result I get is 2468 and that is incorrect...

What is the correct formula to get the 19% taxes from the total amount including the taxes ( total to pay with taxes included )

  • 写回答

2条回答 默认 最新

  • dtqjbbr5283 2016-08-01 05:27
    关注

    Since you have value which is effectively 119%, you need

    $show['total'] / 1.19 * 0.19
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?