I don't know if this problem originates in commerce core, commerce shipping or commerce tax.

When loading a commerce order ex: (from commerce_reports module)

$wrapper = entity_metadata_wrapper('commerce_order', $order);
$order_data = $wrapper->commerce_order_total->data->value();

foreach ($order_data['components'] as $component) {
 if (!empty($component['price']['data']['tax_rate'])) {
  // Component has tax info in price
 }
}

But when the component is a shipping line_item tax_rate is not loaded in the data price array.

Example: Order with 1 product 6% tax and shipping with 25% tax. No tax data is loaded to the shipping component
Commerce tax

CommentFileSizeAuthor
20120829-d8138c5d58u12ydnrd5nuyee6c.png79.88 KBfreakalis
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

googletorp’s picture

Status: Active » Postponed

How do you add the tax to the shipping line items?

googletorp’s picture

Status: Postponed » Postponed (maintainer needs more info)
freakalis’s picture

Im using Commerce shipping and Commerce Flat Rate http://drupal.org/project/commerce_flat_rate. You can choose tax when configure the cost for shipping.

rszrama’s picture

Project: Commerce Shipping » Commerce Flat Rate
Version: 7.x-2.x-dev » 7.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active
Summit’s picture

Hi, Could this be the problem for mine https://drupal.org/node/1243218#comment-7768183
greetings, Martijn

discipolo’s picture

Issue summary: View changes

i also noticed that the taxes i add to my shipping flatrate arent working if i use commerce_discounts. once i disable the discount rules (which for some other reason happens to me on cacheflush anyway) the shipping tax is included in the tax component of the order total as expected.

not sure yet if this is related to commerce discount or any of the patches i am using or something else.

discipolo’s picture

my issue was related to discounts.
shipping taxes work for me.