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

Files: 
CommentFileSizeAuthor
20120829-d8138c5d58u12ydnrd5nuyee6c.png79.88 KBfreakalis

Comments

Status:Active» Postponed

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

Status:Postponed» Postponed (maintainer needs more info)

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.

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

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