<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SmartDukaan &#x2013; /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ReturnReversal.java</title><description>WebSVN RSS feed &#x2013; SmartDukaan</description><lastBuildDate>Wed, 07 Oct 2026 02:57:57 +0530</lastBuildDate><generator>WebSVN 2.8.6-DEV</generator><language>en</language><link>https://svn.smartdukaan.com/log.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Fentity%2Ffofo%2FReturnReversal.java&amp;max=40&amp;</link><atom:link href="https://svn.smartdukaan.com/rss.php?path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Fentity%2Ffofo%2FReturnReversal.java&amp;repname=SmartDukaan" rel="self" type="application/rss+xml" />
<item><pubDate>Thu, 24 Sep 2026 20:16:26 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37776 – returns: reverse a refunded debit-note return whose goods never reached ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 16 file(s) modified&lt;/strong&gt;&lt;br/&gt;returns: reverse a refunded debit-note return whose goods never reached the warehouse&lt;br /&gt;
&lt;br /&gt;
Once a return was refunded nothing could undo it - rejectReturn refuses an already&lt;br /&gt;
refunded one - so a return booked and paid for goods that never arrived left phantom&lt;br /&gt;
warehouse stock, the unit missing from partner stock, the order marked returned, a&lt;br /&gt;
wallet credit and a filed credit note, with no way back.&lt;br /&gt;
&lt;br /&gt;
ReturnReversalService.reverse(imei, reason, by, dryRun) undoes exactly one unit:&lt;br /&gt;
the warehouse return scan (row deleted so a genuine return later is not rejected as a&lt;br /&gt;
duplicate) and the stock it added, partner stock with its schemes/price drop/offers,&lt;br /&gt;
the order&apos;s return quantity and status, the wallet refund as a REVERSAL entry, and the&lt;br /&gt;
return item / debit note. Guards refuse anything that has moved since the refund, and a&lt;br /&gt;
dry run reports the plan without writing.&lt;br /&gt;
&lt;br /&gt;
The credit note follows movement and the NIC clock: inside the 24h window, and only&lt;br /&gt;
when the note credits nothing but this unit, its IRN is cancelled and the note marked&lt;br /&gt;
cancelled; past it a DBN with its own IRN is issued against the note&lt;br /&gt;
(CreditNoteService.issueReturnReversalDebitNote, stored as CN_CANCELLATION with no&lt;br /&gt;
margin month so the statement does not show it twice - the wallet REVERSAL is the&lt;br /&gt;
statement line); a note never filed at NIC is voided locally. Every local write happens&lt;br /&gt;
first and NIC last, so a refusal rolls the whole reversal back.&lt;br /&gt;
&lt;br /&gt;
fofo.return_reversal (return_reversal_20260921.sql) records each reversal and, unique&lt;br /&gt;
per return item, makes it once-only. Also adds cancelled=0 to the RETURNS_CN branches of&lt;br /&gt;
the account statement queries, without which a cancelled note keeps crediting the&lt;br /&gt;
statement - no current effect, no RETURNS note is cancelled today.&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ReturnReversal.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ReturnReversalRepository.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ReturnReversalRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/CreditNoteRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/CreditNoteRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/OrderRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/InventoryService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/InventoryServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ReturnReversalModel.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ReturnReversalService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ReturnReversalServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/CreditNoteService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/CreditNoteServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/WarehouseInventoryService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/WarehouseInventoryServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/return_reversal_20260921.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Fentity%2Ffofo%2FReturnReversal.java&amp;rev=37776</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Fentity%2Ffofo%2FReturnReversal.java&amp;rev=37776</guid></item>
</channel></rss>