Skip to content

Commit

Permalink
https://github.com/mage2pro/core/issues/168
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Nov 13, 2022
1 parent 131b01a commit 9d3d9db
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Tax/lib/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@
* It is normal for an order position to have zero price: e.g., in case of free shipping.
* @used-by df_oqi_tax_rate()
* @used-by df_tax_rate_shipping()
* @param float $withTax
* @param float $withoutTax
* @return float
*/
function df_tax_rate($withTax, $withoutTax) {return !$withoutTax ? 0 :
function df_tax_rate(float $withTax, float $withoutTax):float {return !$withoutTax ? 0 :
100 * ($withTax - $withoutTax) / $withoutTax
;}

/**
* 2017-09-30
* @used-by \Dfe\YandexKassa\Charge::pTaxLeafs()
* @param O $o
* @return float
*/
function df_tax_rate_shipping(O $o) {return df_tax_rate($o->getShippingInclTax(), $o->getShippingAmount());}
function df_tax_rate_shipping(O $o):float {return df_tax_rate($o->getShippingInclTax(), $o->getShippingAmount());}

0 comments on commit 9d3d9db

Please sign in to comment.