function uc_taxes_get_included_tax in Ubercart 7.3
Calculates the taxes that should be included in a product's display price.
Parameters
$product: The product whose included taxes are to be calculated.
1 call to uc_taxes_get_included_tax()
- uc_taxes_entity_view_alter in uc_taxes/
uc_taxes.module - Implements hook_entity_view_alter().
File
- uc_taxes/
uc_taxes.module, line 669 - Ubercart Taxes module.
Code
function uc_taxes_get_included_tax($product, $order = NULL) {
$amount = 0;
$suffixes = array();
foreach (uc_taxes_filter_rates($order) as $tax) {
if ($tax->display_include) {
$taxable = uc_taxes_apply_item_tax($product, $tax);
if (!empty($taxable)) {
$amount += $taxable * $tax->rate;
$suffixes[$tax->inclusion_text] = $tax->inclusion_text;
}
}
}
return array(
$amount,
$suffixes,
);
}