Calculation a percent of a sale

More
10 years 7 months ago #19703 by canalejas
Hi, I have 2 problems:

I have a sale with this: 1000€ product + 210€ tax + 9€ shipcost = 1219€ TOTAL
I define that a sale deduces 3% to the vendor. (go to site, to me ;) )
I define 1 point = 1 €
With this sale the vendor give 1180 points.

Q1) -3% of 1219 is 1182.43 !! (the vendor thinks i'm a hacker !! :evil: )

Q2) I don't want give any points for the shipment, this is a coast for me !! (I want calculate -3% from 1210€)

Thank you !!

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #19708 by nordmograph
Hello

I don't understand what your problem here can you precise ?
Also this plugin allows a user to pay with points , comissions are not involved. Are you posting in the correct forum category ? Is this related to VMVendor points 2 vendor reward ?

So if I understand right you're writing that the vendor only gets 1180 pts when he should get 1182.57 right ?

Q2, you'll have to edit the order.php modification to get the percentage calculated before shipment. Is that what you need ?

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago - 10 years 7 months ago #19718 by canalejas

nordmograph wrote: Hello

I don't understand what your problem here can you precise ?
Also this plugin allows a user to pay with points , comissions are not involved. Are you posting in the correct forum category ? Is this related to VMVendor points 2 vendor reward ?

So if I understand right you're writing that the vendor only gets 1180 pts when he should get 1182.57 right ?

Q2, you'll have to edit the order.php modification to get the percentage calculated before shipment. Is that what you need ?


Q1: 3% of discount of 1219 points is not 1180 points. Is 1182,43 Yes this is the problem. I think it's a round problem?
Q2: Thank you, I try to modify them.

I think this post is correctly posted in points 2 vendor module (here), no? else move it please and sorry !!

Regards.
Last edit: 10 years 7 months ago by canalejas.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #19719 by nordmograph
No wrong category :)
I'll look at the code to find out what's causing this rounding issue.

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #19720 by canalejas

nordmograph wrote: No wrong category :)
I'll look at the code to find out what's causing this rounding issue.


Thank you !!

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #19734 by canalejas

nordmograph wrote: No wrong category :)
I'll look at the code to find out what's causing this rounding issue.


I reviewed the code order.php and correct. the percentage is calculated on the product before taxes and then these are added. That is correct. Also no shipping charges intevienen.
My apologies as I did not know where it came out of the 1180 points in my example.
A hug and sorry again.
:blush: :blush: :blush:

Please Log in or Create an account to join the conversation.

Time to create page: 0.367 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.