src/Genesis/API/Request/Financial/Alternatives/Klarna/Item.php
public function getTotalTaxAmount()
    {
        // Convert to minor units for more accurate calculations
        $total_amount = CurrencyUtils::amountToExponent($this->getTotalAmount(), $this->currency);
        $tax_rate     = CurrencyUtils::amountToExponent($this->tax_rate, $this->currency);

        $total_tax_amount = ceil(
            $total_amount - ( ($total_amount * 10000) / (10000 + $tax_rate) )
        );

        return CurrencyUtils::exponentToAmount($total_tax_amount, $this->currency);
    }
public function getTotalTaxAmount()
    {
        // Convert to minor units for more accurate calculations
        $total_amount = CurrencyUtils::amountToExponent($this->getTotalAmount(), $this->currency);
        $tax_rate     = CurrencyUtils::amountToExponent($this->tax_rate, $this->currency);

        $total_tax_amount = ceil(
            $total_amount - ( ($total_amount * 10000) / (10000 + $tax_rate) )
        );

        return CurrencyUtils::exponentToAmount($total_tax_amount, $this->currency);
    }
public function getTotalTaxAmount ( ) { // Convert to minor units for more accurate calculations $ total_amount = CurrencyUtils :: amountToExponent ( $ this -> getTotalAmount ( ) , $ this -> currency ) ; $ tax_rate = CurrencyUtils :: amountToExponent ( $ this -> tax_rate , $ this -> currency ) ; $ total_tax_amount = ceil ( $ total_amount - ( ( $ total_amount * 10000 ) / ( 10000 + $ tax_rate ) ) ) ; return CurrencyUtils :: exponentToAmount ( $ total_tax_amount , $ this -> currency ) ; }
Calculate order item total tax amount.
Round it up to next whole number

@return integer
Calculate order item total tax amount . Round it up to next whole number