Closed sergii-zheleznytskyi closed 3 years ago
Hi @sergii-zheleznytskyi ,
Thanks for sharing the details, we are currently looking into it and will get back to you on this shortly.
Hello @lsretailomni Do you have an updates on the issue?
@sergii-zheleznytskyi this has been fixed and released in 1.9.0.
Preconditions (*)
When the order has multiple items, and you try to create a partial invoice and partial refund, the invoice total or credit memo will be calculated in a wrong way
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Code that causes the issue: for invoice: src/Omni/Model/Invoice/Total/GiftCardLoyaltyPoints.php for a refund: src/Omni/Model/Creditmemo/Total/GiftCardLoyaltyPoints.php
$grandTotalAmount = $invoice->getOrder()->getGrandTotal(); $baseGrandTotalAmount = $invoice->getOrder()->getBaseGrandTotal(); $invoice->setGrandTotal($grandTotalAmount); // we are re-seting grand total from order regardles the items we are invpoicing $invoice->setBaseGrandTotal($baseGrandTotalAmount); // we are re-seting base grand total from order regardles the items we are invoicing