Back to PhocacartPrice class

Method getTaxFormat

public
getTaxFormat
(mixed $tax, mixed $taxCalculationType, mixed $format = 1)

Method getTaxFormat - Source code

public function getTaxFormat($tax, $taxCalculationType, $format = 1)
{
    if ($format == 0) {
        // IS USED FOR PERCENTAGE IN VAT TITLE ... e.g. VAT(10%)
        if ($taxCalculationType == 2) {
            // FIX
            $tax = $tax + 0;
        } else {
            // Percentage
            $tax = $tax + 0 . '%';
        }
    } else {
        // IS USED FOR PERCENTAGE in CALCUTATION: ... VAT(10%) --> 10,00 %
        if ($taxCalculationType == 2) {
            // FIX
            $tax = number_format((double) $tax, $this->price_decimals, $this->price_dec_symbol, $this->price_thousands_sep);
        } else {
            // Percentage
            $tax = number_format((double) $tax, $this->price_decimals, $this->price_dec_symbol, $this->price_thousands_sep) . ' %';
        }
    }
    return $tax;
}