Experimental project

This is a sandbox project, which contains experimental code for developer use only.

This module recalculates VAT amounts of each Drupal Commerce Line-items that has product discount attached as a component.

Calculation triggers on rules event "Calculating the sell price of a product".

Default rule (Calculate VAT on discount) is generated with weight 5 so that this event updates currently calculated prices.

Idea is to subtract the VAT amount with same ratio as the line item price.
New component is being added to line-item price as a positive value, so that the order total calculation is not being messed up.

Tested with percentage and fixed price discount with product discount. Product prices are saved including VAT.

WARNING!! This module is on development stage! Using it in product environment is not recommended!

NOTE! This module does not calculate updated VAT on order discounts - at least not yet.

AttachmentSize
Commerce Calc Discount VAT screenshot163.6 KB

Project information

  • Module categories: E-commerce
  • Created by kihear on , updated