1

I want to calculate the tax on the profit from a product. In Holland, when you sell second-hand products you bought without tax, you have to calculate the tax on the profit.

Is this possible within Magento? I need to set it up per product because not all products will fit in this case.

Royw
  • 275
  • 2
  • 10

2 Answers2

0

Not by default. But it is a simple mathematical operation. So you should be able to make a product attribute where you insert the initial investment and then calculate tax based on that minus the final price and operation costs.

Claudiu Creanga
  • 6,247
  • 2
  • 49
  • 88
0

To answer your question: yes, it is possible within Magento.

Now, there is no need to make a new attribute as suggested by another answer, as Magento has a 'cost' attribute already built-in.

So, once you have your attributes set for your products (so you're actually entering in COGS), you'll do something like this in your config.xml:

<events>
    <sales_quote_save_after>
      <observers>
        <controller_action_after>
          <class>yourmodule/observer</class>
            <method>saveProfit</method>
          </controller_action_after>
       </observers>
     </sales_quote_save_after>
</events>

And inside your Module/Model/Observer:

public function saveProfit($observer) {
    // do stuff
}
Tim Hallman
  • 1,211
  • 11
  • 26