Currently the includes tax is shown only on price fields that are attached to commerce entities, why is this so? Wouldn't it be beneficial to have the selector to be present in every entity using the field?

Attached patch allows the included taxes to be selected on price fields attached to any entity type.

Comments

rszrama’s picture

Status:Active» Postponed

Won't be putting this in 1.x at the very least, but I'm not sure it's advisable anyways - for example, I wouldn't want this VAT incl. option to show up on line item unit price fields when pricing is supposed to originate with the product itself. Perhaps we can pursue instead some alternate method of determining whether or not a price field should show this - in fact, I feel like I've recommended this in another thread, where we simply add a setting to the price field to determine if a price field should show the "Includes VAT" option. If you see that, go ahead and close this one out.

tcmug’s picture

Continuing from that - I added a checkbox for field instance settings just for this. Commerce_price field is handled as an exception to always have includes tax on. The only thing I noticed that went wrong was the formatting of the fields in product edit forms.

I cant find the other issue you mentioned -- though I must admit I saw it just few days ago %)

tcmug’s picture

StatusFileSize
new11.67 KB

Updated the patch to use a variable instead of just replacing ALL price fields. This lead to weird issues like price components disappearing, which was not cool. It'll default to only commerce_product.

So, for example in settings.php, you do this:

<?php
$conf
['commerce_tax_include_tax_entities'] = array('commerce_product', 'field_collection_item');
?>
Tharna’s picture

Rerolled the patch for latest version (1.9).

AdamGerthel’s picture

Tested the patch, worked well for me