You are here

function commerce_vat_rate_round_amount in Commerce VAT 7

Rounds a VAT amount for the specified currency.

Parameters

$amount: The VAT amount to round.

$currency_code: The currency code.

Return value

The rounded VAT amount.

3 calls to commerce_vat_rate_round_amount()
commerce_vat_commerce_line_item_rebase_unit_price in ./commerce_vat.module
Implements hook_commerce_line_item_rebase_unit_price().
commerce_vat_rate_apply in ./commerce_vat.module
Applies a vat rate to the unit price of a line item.
commerce_vat_rate_calculate in ./commerce_vat.module
Calculates a price array for the vat on the unit price of a line item.

File

./commerce_vat.module, line 451
Defines VAT rates and Rules integration for configuring vat rules for applicability and display.

Code

function commerce_vat_rate_round_amount($amount, $currency_code) {
  $currency = commerce_currency_load($currency_code);
  return commerce_currency_round($amount, $currency);
}