You are here

function uc_line_item_tax_display in Ubercart 7.3

Tax line item callback.

1 string reference to 'uc_line_item_tax_display'
uc_taxes_uc_line_item in uc_taxes/uc_taxes.module
Implements hook_uc_line_item().

File

uc_taxes/uc_taxes.module, line 255
Ubercart Taxes module.

Code

function uc_line_item_tax_display($op, $order) {
  switch ($op) {
    case 'display':
      $lines = array();
      $taxes = uc_taxes_calculate($order);
      foreach ($taxes as $tax) {
        foreach ($order->line_items as $line_item) {
          if ($line_item['type'] == 'tax' && $line_item['data']['tax_id'] == $tax->id) {
            continue 2;
          }
        }
        $lines[] = _uc_taxes_to_line_item($tax);
      }
      return $lines;
  }
}