我们有一件东西可以卖到100美元左右。对它征收5%的税。第三方支付网关的佣金占网关总金额的3% (即100+5%的3% )。由于无法收取3%的支付网关佣金客户,我们隐藏了这个额外的佣金下的项目价格。因此,价格应该从100增加到"X“的数量。
(100 + 5% tax) + 3% Commission = (X + 5% Tax) ;请注意,当从X+ 5%的税额增加时,佣金也会增加。
(100 + 5%) + 3% = (100 + 5) + 3.15 = 108.15如果我们发送108.15到网关,它将收取3.255的金额108.15,这意味着0.105额外。即。扣除网关佣金(104.895)后,我们收到的金额较少。
我需要单独列出不会给公司带来额外费用的商品价格。
$tax = 5 ; //5%
$itemAmount = 100 ;
$priceWithTax = $itemAmount + ($itemAmount * 5/100) ;
$commission = 3 ; //3%
//We sent 105 to gateway.. which results 105 to customer and 3.15 to company.
$priceWithTaxCommission = $priceWithTax /* or X */ + ($priceWithTax * $commission/100) ;
$ToGateway = $priceWithTax + ($priceWithTax* 3/100) ;
//Results 108.15, If we sent 108.15 to gateway it again charge 3% on 108.15. Which is wrong.包括支付网关佣金后如何找到产品价格?
发布于 2017-10-30 08:38:11
不要用“加”这个词来思考,用“乘”这个词来思考:
将你的价值乘以因子f:
f = 1/0.97
100 * (1/0.97) * 1.05 = ~108.25 (商店价格包括税收)
108.25 * 0.03 = ~3.25 (委员会)
-> 105.00 (剩下的税是100 + 5% )。
还可以参数化因子f:
f = 100 / (100 -委托)
请看一看我的回答,如果你想考虑你的零售价中的佣金税,请告诉我。你可以这样做,但在我看来,从会计角度来看,这是错误的。
发布于 2017-10-30 08:54:53
在本例中,使用此代码:
$mainPrice = 100;
$tax = 5;
$commission = 3;
$priceWithTax = $mainPrice + ($mainPrice * ($tax / 100));
echo $priceWithTax.'<hr/>';
$priceWithTaxCommission = $priceWithTax + ($priceWithTax * ($commission / 100));
echo $priceWithTaxCommission.'<hr>';
$x = $priceWithTaxCommission / (1+($tax / 100));
echo 'product price is=>'.$x.'<hr/>';
echo $x + ($x * ($tax / 100));此代码返回如下:
price with tax 105
price with tax and commission 108.15
product price is=>103
product price with commission 108.15https://stackoverflow.com/questions/47010418
复制相似问题