Magento rounding issue on Grand Total - php

I'm having a strange issue on Magento Grand Total.
I have a product of 99.99€ (inc. tax). The tax is 23% rate.
I have created a Promo Code to have 25% discount on that product.
I've set up the Tax Calculation Method based on the Row Total
I've set up the Apply Customer Tax to be after discount
I've set up the Apply Discount on Prices to be including tax.
The problem comes when I add the product and put a promo code, that created a change on 0.01€. Changing the precision to 4 or the rounding to 4 sometimes solves the issue but creates issues with payment gateways.
The cart page shows the following info:
Subtotal Excl Tax - 81.29
Subtotal Incl Tax - 99.99
Discount - 25.00
Tax - 14.02
Grand Total - 74.98
The grand total should be 74.99€ (99.99€ from the product - 25.00€ from the discount).

Related

Apply coupon after calculate the shipping rate - woocommerce

I am building my website by using woocommerce, but i faced the problem of calculating the total amount of the order.
There is a shipping method which is 15% additional fee of the order, and there is a coupon offers $10 discount.
But woocommerce seems like apply the coupon before calculate shipping fee.
For example, the order total amount is $100, the expected result should be (100*1.15) - 10 = 105, but when i tested in the checkout page, the total amount is (100-10) * 1.15 = 103.5.
May I know how to apply the coupon after calculate the shipping fee?
Thank you.
I want to calculate amount correctly in woocommerce, which is apply coupon after calculate the shipping fee.

How to exclude tax from price in magento 1.9?

i have magento 1.9
here tax is assumed as 5%
i have two types products some includes the tax in its price and some not include the tax in price.
now i want the subtotal like this
product price ==> 1995
subtotal ==> 1895
tax ==> 100
grand total ==> 1995
for excluding tax products and
for non-excluding tax products i want subtotal like this.
product price ==> 1995
subtotal ==> 1995
tax ==> 100
grand total ==> 2095
In magento There is option in Tax setting to Manage subtotal and grand total for Tax. I am not sure if you are looking for same or not. I can't add image in comment so i add answer. Hope it will help.
See below another setting for cross price check.
Cheers!

Woocommerce tax rounding issue

I have an item in my WooCommerce shop that costs 24.17 exclusive of Tax. I have a tax rate setup of 20%.
If I add 3 of these products to my cart then it gives me a total including Tax of £87.01 when I would expect to get £87.
24.17 plus 20% is £29.004, why is it not rounding this down to £29.00?
When WooCommerce calculates the tax it first multiples the price without tax by the quantity being ordered. So as far as WooCommerce is concerned, the price to apply tax to is £72.51. It adds 20% to this value. You then get £87.012. It is this final number which is rounded down to £87.01.
To show that mathematically:
24.17 x 3 x (1 + 0.2) = 87.012.
If you want WooCommerce to change the way it calculates that tax you'll have to add the code to your functions.php file. It might look a little like the following:
add_filter( 'woocommerce_get_price_excluding_tax', 'custom_edit_price_function',10,3);
function custom_edit_price_function($price, $qty, $product) {
//calculate price how you like it here.
return $price;
}

Mangento - How to show Shipping fee in Subtotal but not calculated in Grand Total?

I am currently using Mangeto 1.9.1 and a custom shipping method which is the only one for my store.
Everything works cool but i want the shipping price to appear in the subtotal when order is created but to be not calculated in the Grand Total?
How i can show the shipping fee in subtotal but this fee must not be calculated and added in Grand Total ?
Thanks in advance!

Changing currency in cart column unit price excluse tax error when currency converted

I've two store view, one in EUR (primary currency) and the other in Dollar.
Tax is 21% for both stores, included in product price.
In the cart, if I change the store to the Dollar store view, column "Unit Price (Excl. Tax)" isn't correctly calculated. It seems that only on this field currency conversion is done two times.
This is the content of the store
http://dl.dropbox.com/u/546584/cart_problem_DOLLAR.png
http://dl.dropbox.com/u/546584/cart_problem_EUR.png
Some one can halp me solve this problem?
I've done a lot of debug but can't bring myself out of the tunnel.
Tkis!
If the store is saving the prices incl. tax, then You'd be careful when calculating the price excl. the tax.
If the tax is 21%, then the price incl. tax is 121% of the price excl. tax, thus the price excl. tax should be calculated like $priceExclTax = $priceInclTax / 1.21;.
Download version 1.7.0.2
Copy to local
Mage_Tax_Model_Sales_Total_Quote_Subtotal
That should fix your problem

Categories