• Dear Subrata

    After solving the VAT partial wallet payment we notice that the numbers for de cart deduction do not make sense. but the numbers in the infobox are correct. we are no the lastet version 1.5.7 where you applied the 999 fix on line 78. if you want we can do again a session together to see what it is.

    Let me show what we know so far:

    Before we apply the partial wallet the values are correct in the info window:

    https://prnt.sc/it332thJxI24

    But when we apply the partial wallet payment then you apply the remaining 100 CHF amount without VAT -> – 92.51 CHF instead of the announced – 100 CHF

    Looks like 92.51 is NET VALUE. but you should deduct the GROSS value without changing the cart VAT amount. As it was announced in the info window.

    https://prnt.sc/CuoAMT9cRk6y

    let me know how we can help

    andreas

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter vengoch

    (@vengoch)

    dear @subrata

    we can confirm that the root cause happen only if the cart amount is close to the available wallet amount. is it true that the calculation is made by woo standard class, but you refer to the net value of the cart and not to the gross value of the cart. when the cart amount is close to the wallet amount the system won’t use the 100% available amount of the wallet to pay partial. may you just change to calculate to use the gross amount of the cart, then the wallet will be used 100% even if it is close.

    andreas

    I am experiencing a similar issue with the WooWallet plugin. The wallet balance is displayed correctly in the info window, but when applied during checkout, the deducted amount does not match the announced gross value. Instead, the deduction seems to be based on the net value, leading to inconsistencies in the final cart totals.

    For example:

    • Wallet balance:?10 € (Gross)
    • Expected deduction:?-10 €
    • Actual deduction:?-8.40 € (Net)

    This issue becomes even more apparent when the cart total is close to the available wallet balance. The system seems to incorrectly calculate the deduction based on the net value of the wallet, even though the gross value was announced in the info window.

    Can you confirm if the current logic refers to the net value of the cart instead of the gross value during calculation? If so, could the logic be updated to ensure that the gross wallet balance is applied consistently without modifying the cart VAT amount?

    Thank you for your help!

    Best regards,
    Simon

    Thread Starter vengoch

    (@vengoch)

    Dear @simonmista we haven’t heard from the plugin wallet dev guys so far.

    What we can say reviewing their code is that they add the announced wallet amount in the cart as negative value over the add-fee api of woocommerce and AFTER that woo corrects the amount not to have a negative NET-Values in the cart as this seems not to be allowed by woocommerce. Which makes sense somehow not so ‘sell’ negative orders. The main reason is that they use the fee-api and the partial wallet payment is not really a ‘fee’ it is in fact money without vat, a second payment methode without splitting the orders. I’m wondering how others solved that correctly.

    would be nice to hear something from the plugin dev guys…

    best regards,
    andreas

    Plugin Author Subrata Mal

    (@subratamal)

    @vengoch Yes you are right we have created a request to WooCommerce dev team to add a filter to alter fee amount here https://github.com/woocommerce/woocommerce/issues/28028

    For my setup, it only works correctly if I replace the following line of code:

    $max_discount = round( $this->get_total( 'items_total', true ) + $fee_running_total + $this->get_total( 'shipping_total', true ) + array_sum( $this->get_tax_class_costs() ) ) * -1;
    ------------> includes/class-wc-cart-total.php line no 285

    Additionally, I’ve added the following code to my theme:



    add_action('woocommerce_cart_calculate_fees', function ($cart) {
    foreach ($cart->get_fees() as $fee) {
    if (isset($fee->id) && strpos($fee->id, 'wallet') !== false) {
    $fee->amount = $fee->amount * (1 + 0.19);
    $fee->total = $fee->amount;
    }
    }
    }, 9999);

    Could you please take a look at this? This issue has been around for over 4 years…?https://github.com/woocommerce/woocommerce/issues/28028

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.