News:

Looking for documentation? Take a look on our wiki

Main Menu

discounts

Started by StompJames, October 03, 2017, 14:20:37 PM

Previous topic - Next topic

StompJames

Hi,

I am using the discount function on VM and want to understand how the calculation is made for a discount. In my backend DB system the value is passed as a minus against tax, so the main value is passed and then tax is a minus value.

Is this a standard way of things working or does it have to do with a specific discount function? What I would like to see is the discounted total appearing as the gross and then tax being calculated against this. This is how we see things in the orders page so maybe the tax minus is an issue with our integration? I just want to clarify and get some idea from the experts.]

Kind regards,

James

Joomla! 3.6.5
VirtueMart 3.2.4

Jörgen

Hello

The general idea to add taxes and discounts is with calculation rules.
https://docs.virtuemart.net/manual/general-concepts/204-tax-and-calculation-rules-overview.html

I suspect You are making an price override not a discount. This is something that was left from VM 1.0 and is not working very well in VM3. Check out the calculation rules and  see what You think.

Adding hidden categories like 50%_markup and 50%_discount is quite an easy way to handle markup and discount.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

StompJames

Hi,

Thanks for the reply, I'm using the coupon function in VM currently. My issue could be related to our system integration with the backend system we use.

What we need is for is for the website to pass the order net after the discount, this way the order net passed to ur system will be the value after discount. Then we can work out tax after that.

EG:
An order for £10 comes in with a discount of 50%.
The net is recorded as £8.333 (with VAT calc).
Our system passes the 8.333 and then has a tax value of -3.333 and gives us a gross of £5.
This then ends up in our system as a £10 order and £5 credit.

What I would like is this:
An order for £10 comes in with a discount of 50%.
The discount is taken from the gross and this becomes £5.
Then the net becomes 4.1666 (tax is the remainder).
This way our system ends up with one order for £5 and no credit.


I guess this is not really a VM issue but an issue with the way our system passes the orders through? Unless there is a way to achieve this in some other way that involves people using a set coupon and receiving a set discount?

I have used shopper group switching but this gets a bit messy and also means adding a price to every product when you change a discount.

Any ideas would be greatly appreciated.

Regards,

James


 





Jörgen

Hello again

This looks like a job for the integrator of Your backend system. But why don´t you want to see how much discount you are giving? Subtracting discount from gross valu would be easy. In my shop I see the total that the customer is paying after discount and the discount is only a information of how much I have given as discount. This is VM standard for a stored order. Changing the way virtuemart works because you have made some odd choices is not the right way to go. You actually have the information You need in the data just do a simple calculation gross - discount = net value and You are done.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

StompJames

Thanks Jorgen,

I agree that it is a backend system issue and I think we need to handle it there. I was asked to look in to it but I thought VM manipulation was a bad way to go to be honest. Sorry to bother you and thanks a lot for the help.

I am going to try using the tax/calc rules to save changing the price when we change the discount amount.

Regards,

James