Notifications
Announcements
No record found.
I'm facing an issue while completing the payment for a return order. The system is throwing the following exception: "Not more than 0.00 can be reversed." "The refund invoice total 522.58 is greater than the total refundable amount 493.00."
Could you please help me understand and resolve this? public void createCallCenterReturnPayment(SalesId _returnsalesId,SalesId _origSalesTable) { MCRCustPaymTable mcrCustPaymTable,origMcrCustPaymTable; SalesTable returnSalesTableBuf = SalesTable::find(_returnsalesId); SalesTable origSalesTableBuf = SalesTable::find(_origSalesTable); RetailChannelTable retailChannelTable; select firstonly retailChannelTable where retailChannelTable.RecId == returnSalesTableBuf.RetailChannelTable; if(retailChannelTable.ChannelType == RetailChannelType::MCRCallCenter) { MCRCustPaymStatus mcrCustPaymStatus = MCRCustPaymStatus::NotSubmitted; SalesTotals salesTotals = salesTotals::construct(returnSalesTableBuf,SalesUpdate::All); Total totalAmount = salesTotals.totalAmount(); //Total totalAmount1 = salesTotals.totalAmount() - salesTotals.totalMarkup() - salesTotals.totalTaxAmount(); select firstonly origMcrCustPaymTable where origMcrCustPaymTable.RefTableId == origSalesTableBuf.TableId && origMcrCustPaymTable.RefRecId == origSalesTableBuf.RecId; try { ttsbegin; mcrCustPaymTable.clear(); mcrCustPaymTable.Channel = returnSalesTableBuf.retailSalesTable().RetailChannel; mcrCustPaymTable.CurrencyCode = returnSalesTableBuf.CurrencyCode; mcrCustPaymTable.TenderTypeId = "2"; mcrCustPaymTable.RefTableId = returnSalesTableBuf.TableId; mcrCustPaymTable.RefRecId = returnSalesTableBuf.RecId; mcrCustPaymTable.CustAccount = returnSalesTableBuf.CustAccount; mcrCustPaymTable.OrigRefundRecID = origMcrCustPaymTable.RecId; mcrCustPaymTable.Status = mcrCustPaymStatus; mcrCustPaymTable.CustPaymType = MCRCustPaymType::RefundCheck; switch (mcrCustPaymStatus) { case MCRCustPaymStatus::NotSubmitted: case MCRCustPaymStatus::Authorized: mcrCustPaymTable.Amount = CurrencyExchange::round(totalAmount, returnSalesTableBuf.CurrencyCode); break; } mcrCustPaymTable.insert(); ttscommit; MCRSalesOrderTotals mcrSalesOrderTotals = new MCRSalesOrderTotals(returnSalesTableBuf, true); //complete MCREndOrder::endOrder(returnSalesTableBuf.SalesId, true, mcrSalesOrderTotals, false); } catch { Error("@BASIS_SOCancellation:NewLabel1"); } } }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Laurens vd Tang 301 Super User 2025 Season 2
André Arnaud de Cal... 118 Super User 2025 Season 2
Siv Sagar 105 Super User 2025 Season 2