Partial invoice and Partial refund
Closed this issue · 3 comments
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 (*)
- Create an order with multiple items
- Create a partial invoice or Partial refund
Expected result (*)
- Total calculation is correct
Actual result (*)
- Total calculation is wrong
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
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.