<?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/service/inventory/</title><description>WebSVN RSS feed &#x2013; SmartDukaan</description><lastBuildDate>Thu, 08 Oct 2026 16:21:05 +0530</lastBuildDate><generator>WebSVN 2.8.6-DEV</generator><language>en</language><link>https://svn.smartdukaan.com/log.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;max=40&amp;</link><atom:link href="https://svn.smartdukaan.com/rss.php?isdir=1&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;repname=SmartDukaan" rel="self" type="application/rss+xml" />
<item><pubDate>Wed, 30 Sep 2026 16:43:15 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37817 – fix(movement): shelf stock before arriving, one PO per cost, close ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 7 file(s) modified&lt;/strong&gt;&lt;br/&gt;fix(movement): shelf stock before arriving, one PO per cost, close PO on invoice cancel&lt;br /&gt;
&lt;br /&gt;
- Internal movement fills from shelf stock before stock still arriving (a pending PO dated at&lt;br /&gt;
  midnight ranked ahead of same-day receipts, pricing movements from units that never shipped).&lt;br /&gt;
- A quantity spanning stock at different costs is raised as one PO per cost at once instead of&lt;br /&gt;
  being refused (first PO takes every item&apos;s oldest cost, the next the following cost).&lt;br /&gt;
- Refuse a movement from a warehouse to itself.&lt;br /&gt;
- Cancelling a movement&apos;s invoice/DC takes the order&apos;s qty off its PO and pre-closes it when&lt;br /&gt;
  nothing is left open, as refunds already did.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/InternalMovementAvailabilityModel.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/OrderRepository.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/PurchaseReturnServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/InternalMovementPricingService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/InternalMovementPricingServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/PurchaseOrderServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37817</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37817</guid></item>
<item><pubDate>Mon, 28 Sep 2026 16:50:59 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37797 – Stop a settled debit note being received a second time ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;Stop a settled debit note being received a second time&lt;br /&gt;
&lt;br /&gt;
A return settled before the receive workflow (first purchase_return_order&lt;br /&gt;
2026-03-16) wrote the warehouse SALE_RET scan, a returnorderinfo row and a&lt;br /&gt;
wallet refund, but never touched the debit note: it stayed CREATED with no&lt;br /&gt;
purchase_return_order. Those are exactly the two things the receive screens&lt;br /&gt;
read, so 5,557 fully settled notes looked like they were still awaiting&lt;br /&gt;
receipt, Receive button included.&lt;br /&gt;
&lt;br /&gt;
Receiving one of them (DN UPBLY975/4, IMEI 864973083197734, Antu Enterprises)&lt;br /&gt;
restored to the partner a phone that had already been returned, refunded&lt;br /&gt;
Rs 38,999 and resold to another partner, and a duplicate debit note followed&lt;br /&gt;
that Finance could not refund.&lt;br /&gt;
&lt;br /&gt;
- receiveDebitNoteItems: refuse a note that already has a return order, one&lt;br /&gt;
  whose status is not CREATED, and one whose every unit is already back at the&lt;br /&gt;
  warehouse. Checked BEFORE the condition-mismatch gate - a mismatch there&lt;br /&gt;
  returns into rejectOnConditionMismatch without reaching any later check, and&lt;br /&gt;
  acknowledging that rejection hands the stock back to the partner. That is&lt;br /&gt;
  how the Antu case slipped through.&lt;br /&gt;
- getAlreadyReturnedDebitNotes: the last of those checks, batched for a page of&lt;br /&gt;
  notes. Mirrors applyReceipt - SALE_RET/DOA_IN/SALE_RET_UNUSABLE for the unit&lt;br /&gt;
  against the order its invoice was billed on - so a screen can never disagree&lt;br /&gt;
  with what the refund step will accept.&lt;br /&gt;
- processInvoiceReturn: one open return per document.&lt;br /&gt;
- sql/backfill_debit_note_status_old_flow_20260924.sql: APPLIED on hadb1&lt;br /&gt;
  2026-09-24. 4,154 notes -&gt; APPROVED, 6,639 items -&gt; RETURNED, on the same&lt;br /&gt;
  evidence (returned and refunded). Open notes 5,557 -&gt; 1,404; the rest are&lt;br /&gt;
  left CREATED for review, bucketed in fofo._dn_backfill_20260922.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/backfill_debit_note_status_old_flow_20260924.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37797</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37797</guid></item>
<item><pubDate>Mon, 28 Sep 2026 15:37:36 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37792 – feat(cart): carry bag at Rs 1 per smartphone over Rs ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 11 file(s) modified&lt;/strong&gt;&lt;br/&gt;feat(cart): carry bag at Rs 1 per smartphone over Rs 12,000, extras at listing price&lt;br /&gt;
&lt;br /&gt;
One carry bag (item 32046) is priced at Rs 1 for each smartphone (category&lt;br /&gt;
10006) in the cart selling above Rs 12,000; bags beyond that count are priced&lt;br /&gt;
at the carry bag&apos;s listing price, and Bronze partners pay listing for all.&lt;br /&gt;
Closes the leak where bag-only carts of hundreds of bags at Rs 1 were placed&lt;br /&gt;
from the old app. CarryBagQuote (via CartService.getCarryBagQuote) is the&lt;br /&gt;
single rule; the cart carries it as one line at a blended price.&lt;br /&gt;
&lt;br /&gt;
- CartService/CartServiceImpl, CartResponse, OpenCartValidationResult: expose&lt;br /&gt;
  the quote on the cart.&lt;br /&gt;
- OrderLineAllocator: an item may now have more than one cart line (the flat&lt;br /&gt;
  and listing-priced parts); its units fill the lines in order.&lt;br /&gt;
- TransactionServiceImpl: item quantities merge instead of failing on a&lt;br /&gt;
  duplicate item id.&lt;br /&gt;
- PurchaseServiceImpl: partner GRN creates one stock record per billed price;&lt;br /&gt;
  the GRN screen shows the blended unit price; dead&lt;br /&gt;
  createScannedNonSerializedItem removed.&lt;br /&gt;
- PurchaseReturnServiceImpl: debit-note PDF picks the order billed at the&lt;br /&gt;
  returned stock&apos;s price; refundOrder spreads a non-serialized return over the&lt;br /&gt;
  item&apos;s orders with room left (same price first) instead of loading it all&lt;br /&gt;
  on the first order.&lt;br /&gt;
&lt;br /&gt;
Tests: CarryBagQuoteTest 6/6, OrderLineAllocatorTest 13/13.&lt;br /&gt;
Deploy with profitmandi-web (same change) and the partner apps.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/cart/CartService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/cart/CartServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/cart/v2/OpenCartValidationResult.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/CarryBagQuote.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/CartResponse.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/OrderLineAllocator.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/TransactionServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/test/java/com/spice/profitmandi/dao/model/CarryBagQuoteTest.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/test/java/com/spice/profitmandi/service/transaction/OrderLineAllocatorTest.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37792</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37792</guid></item>
<item><pubDate>Mon, 28 Sep 2026 14:34:01 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37790 – Return refund as B2C when NIC refuses the buyer&apos;s GSTIN ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 13 file(s) modified&lt;/strong&gt;&lt;br/&gt;Return refund as B2C when NIC refuses the buyer&apos;s GSTIN&lt;br /&gt;
&lt;br /&gt;
A return whose credit note NIC refuses because the BUYER&apos;s GSTIN is&lt;br /&gt;
cancelled or invalid could not be settled at all: the approval threw, and&lt;br /&gt;
with it went the refund, the stock and the return rows (NSUPDL5176, Mobile&lt;br /&gt;
Hub, GSTIN 08DCUPD7948K1ZP). Where the invoice itself had never been filed&lt;br /&gt;
the return was instead refunded with no credit note at all, leaving the&lt;br /&gt;
refund undocumented.&lt;br /&gt;
&lt;br /&gt;
Raising the note automatically is not the answer - it is Finance&apos;s call,&lt;br /&gt;
and the GST on a cancelled-GSTIN sale is not recoverable, so paying the&lt;br /&gt;
full value back loses it. Both flows therefore record the refusal and stop.&lt;br /&gt;
&lt;br /&gt;
GstProService: getIrnFailureReason (NIC&apos;s refusal for an invoice),&lt;br /&gt;
isInvalidBuyerGstin (that refusal is about the buyer&apos;s registration -&lt;br /&gt;
deliberately NOT a state-code mismatch, which is a data error to fix and&lt;br /&gt;
retry, nor anything naming our own seller GSTIN) and briefIrnReason (one&lt;br /&gt;
plain-ASCII line of 128 chars; credit_note is latin1 and sql_mode is empty,&lt;br /&gt;
so anything else would store as &apos;?&apos;).&lt;br /&gt;
&lt;br /&gt;
PurchaseReturnServiceImpl: both the invoice-return and the debit-note&lt;br /&gt;
refund detect that refusal, record it through ReturnIrnFailureRecorder and&lt;br /&gt;
throw ReturnIrnGstinFailureException. The recorder commits in REQUIRES_NEW&lt;br /&gt;
because the approval it records is about to roll back, and it only inserts -&lt;br /&gt;
return_irn_failure carries no foreign key on purpose, since an FK check&lt;br /&gt;
would take a shared lock on the very PurchaseReturnOrder row the dying&lt;br /&gt;
transaction may still hold.&lt;br /&gt;
&lt;br /&gt;
Finance may then settle the return as B2C for the rest of that calendar day:&lt;br /&gt;
refundAsB2c credits the value NET of GST in whole rupees (B2cRefundQuote,&lt;br /&gt;
HALF_UP per line, so the line table and the total always agree), restores&lt;br /&gt;
the stock and issues a local credit note for exactly that amount with no tax&lt;br /&gt;
on its lines, no IRN and NIC&apos;s reason recorded. The amount is fixed - the&lt;br /&gt;
caller must pass back the quoted figure - and a remark and explicit consent&lt;br /&gt;
are required. On a later day the option only reopens after a fresh approval&lt;br /&gt;
attempt is refused again, so NIC is always re-checked first.&lt;br /&gt;
&lt;br /&gt;
Mails: every refusal notifies Accounts L2 and above; the B2C settlement&lt;br /&gt;
notifies them and the partner&apos;s Warehouse L1/L2, both tabulated.&lt;br /&gt;
&lt;br /&gt;
The partner account statement is unaffected: it skips RETURNS notes and&lt;br /&gt;
credits returns from returnorderinfo, so the new notes cannot double-credit.&lt;br /&gt;
&lt;br /&gt;
DEPLOY ORDER: apply sql/add_return_b2c_refund_20260921.sql BEFORE any war&lt;br /&gt;
built from this dao. CreditNote now maps irn_skip_reason and b2c, so every&lt;br /&gt;
credit-note read in web, fofo and cron fails until the columns exist.&lt;br /&gt;
Untested beyond compilation.&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ReturnIrnFailure.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/CreditNote.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ReturnIrnFailureRepository.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ReturnIrnFailureRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/GstProService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/B2cRefundQuote.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnNotificationService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnNotificationServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ReturnIrnFailureRecorder.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ReturnIrnGstinFailureException.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/add_return_b2c_refund_20260921.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37790</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37790</guid></item>
<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=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37776</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37776</guid></item>
<item><pubDate>Tue, 15 Sep 2026 21:38:25 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37647 – Invoice/DN return: file credit note at NIC only when the ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;Invoice/DN return: file credit note at NIC only when the invoice IRN was filed&lt;br /&gt;
&lt;br /&gt;
- GstProService.hasFiledIrn: invoice has a real IRN with ack date (DCs excluded)&lt;br /&gt;
- applyInvoiceReturnViaCreditNote: filed IRN -&gt; CN + NIC CRN as before;&lt;br /&gt;
  not filed + INTERNAL buyer -&gt; CN issued locally, NIC skipped;&lt;br /&gt;
  not filed + other buyer -&gt; refund without CN, CN sequence untouched&lt;br /&gt;
- DN refund path: not filed + INTERNAL buyer -&gt; local CN, NIC skipped&lt;br /&gt;
Fixes approval failing with &apos;Recipient GSTIN state code does not match&apos; on&lt;br /&gt;
internal invoices whose IRN was never generated (NSPRJ41943, NSPRJ41950).&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/GstProService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37647</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37647</guid></item>
<item><pubDate>Tue, 15 Sep 2026 17:23:02 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37634 – feat(pricing): tag_listing price change log; retire vendoritempricing writes/reads in dao; ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 14 file(s) modified&lt;/strong&gt;&lt;br/&gt;feat(pricing): tag_listing price change log; retire vendoritempricing writes/reads in dao; price drops no longer touch vendor catalog pricing&lt;br /&gt;
&lt;br /&gt;
- New catalog.tag_listing_price_log (sql/create_tag_listing_price_log_20260915.sql, applied on prod 2026-09-15) + TagListingPriceService: the single setter for tag_listing DP/MOP/MRP, logging old/new values, source and user&lt;br /&gt;
- Remove applyPriceDrop (r37622): price drops write only price_drop + tag_listing; sql/revert_price_drop_vendor_catalog_pricing_20260915.sql restores the 30 rows it wrote (run on prod)&lt;br /&gt;
- VendorCatalogPricingService: reference TP = latest approved external TP (single + batched); internal suppliers rejected on create, bulk upload and approval&lt;br /&gt;
- Stop copying pricing into vendoritempricing on approval and item upload; tag listing detail TP from reference TP; indent DP from tag_listing only&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/catalog/TagListingPriceLog.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/inventory/SaholicInventoryCIS.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/TagListingPriceLogRepository.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/TagListingPriceLogRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/inventory/VendorCatalogPricingLogRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/inventory/VendorCatalogPricingLogRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/catalog/ItemLoaderService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/VendorCatalogPricingService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/VendorCatalogPricingServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/tag/TagListingPriceService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/tag/TagListingPriceServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/tag/TagServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/create_tag_listing_price_log_20260915.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/revert_price_drop_vendor_catalog_pricing_20260915.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37634</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37634</guid></item>
<item><pubDate>Mon, 14 Sep 2026 17:10:35 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37622 – feat(billing): price warehouse billing from the external supplier of the ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 9 file(s) modified&lt;/strong&gt;&lt;br/&gt;feat(billing): price warehouse billing from the external supplier of the billed stock; auto-approve price drop DP/MOP into vendor catalog pricing&lt;br /&gt;
&lt;br /&gt;
- BillingPricingService resolves TP/NLC per order from vendor_catalog_pricing of the most recent external supplier of the units scanned out (serial trace, else own external PO); units reversed by SALE_RET are ignored&lt;br /&gt;
- Falls back to the latest approved external catalog price when no supplier can be traced; vendorId stays the warehouse vendor&lt;br /&gt;
- addBillingDetailsForGrouppedOrders no longer reads vendoritempricing (removes NPE when the row is missing); order.vendorId set to the origin supplier&lt;br /&gt;
- VendorCatalogPricingService.applyPriceDrop writes approved pricing logs for external vendors with the price drop DP/MOP, keeping each vendor&apos;s TP on the effective date&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/BillingPriceModel.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/InventoryItemExternalOriginModel.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/warehouse/WarehouseInventoryItemRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/warehouse/WarehouseInventoryItemRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/VendorCatalogPricingService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/VendorCatalogPricingServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/TransactionServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/BillingPricingService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/BillingPricingServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37622</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37622</guid></item>
<item><pubDate>Fri, 11 Sep 2026 17:29:49 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37588 – Serve partner investment from a 2-minute snapshot instead of a ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 17 file(s) modified&lt;/strong&gt;&lt;br/&gt;Serve partner investment from a 2-minute snapshot instead of a 3-hour cache&lt;br /&gt;
&lt;br /&gt;
getInvestment() was @Cacheable on a 3-hour Redis cache that addAmountToWallet&lt;br /&gt;
evicted but consumeAmountFromWallet did not. A partner whose advance payment was&lt;br /&gt;
swept straight to a loan had the money counted twice - once as a still-cached&lt;br /&gt;
wallet balance, once as the reduced utilisation - overstating their credit limit&lt;br /&gt;
by the payment x their tier until the cache expired.&lt;br /&gt;
&lt;br /&gt;
Replaced with fofo.partner_investment, refreshed every 2 minutes by&lt;br /&gt;
PartnerInvestmentSweepService. Every coupled term is read in one pass, so wallet&lt;br /&gt;
and utilisation (and in-stock and aged-Apple) can never come from different&lt;br /&gt;
moments. A shorter TTL would only have made the error rarer - it scales with the&lt;br /&gt;
payment, not the delay.&lt;br /&gt;
&lt;br /&gt;
- PartnerInvestment entity/repository + partner_investment_snapshot.sql&lt;br /&gt;
- PartnerInvestmentSweepService: 9 batched reads, stores base_value for change&lt;br /&gt;
  detection, refreshes aged-Apple for partners whose stock moved intra-day&lt;br /&gt;
- getInvestment/getInvestmentsForFofoStores both read the snapshot, so the two&lt;br /&gt;
  paths no longer disagree; live compute retained as fallback&lt;br /&gt;
- selectActivatedStockAmountByFofoIds: batches an N+1 that cost 233ms x 1690&lt;br /&gt;
  partners (6.6 min -&gt; 1.0 s)&lt;br /&gt;
- getFirstBillingDates: batches another N+1 (4.6 s -&gt; 0.67 s)&lt;br /&gt;
- selectPendingGrnOrders(List) now applies the same SD_START_DATE floor as the&lt;br /&gt;
  single-partner overload; the two were reporting different GRN-pending&lt;br /&gt;
- selectPartnerStockValueMap takes excludeActivated: an activated Apple handset&lt;br /&gt;
  held past the aging window was added once to in-stock and subtracted twice&lt;br /&gt;
  (activated stock, then the aged haircut). 90 units, 24 partners, Rs 65.19 lakh&lt;br /&gt;
  double-deducted. Live-demo passes false - no overlap there.&lt;br /&gt;
- applyManualAdjustment: routes the two hand-rolled admin wallet adjustments&lt;br /&gt;
  through WalletServiceImpl so they take the FOR UPDATE lock&lt;br /&gt;
- add_idx_order_grn_pending.sql: covering index, GRN query 1320ms -&gt; 514ms&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/InventoryItem.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/PartnerInvestment.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/Order.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/InventoryItemRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/InventoryItemRepositoryImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PartnerInvestmentRepository.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PartnerInvestmentRepositoryImpl.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/dao/repository/transaction/TransactionRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/TransactionRepositoryImpl.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/PartnerInvestmentServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/PartnerInvestmentSweepService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/wallet/WalletService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/wallet/WalletServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/add_idx_order_grn_pending.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/partner_investment_snapshot.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37588</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37588</guid></item>
<item><pubDate>Thu, 10 Sep 2026 02:52:18 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37563 – Filter delisted SKUs out of creation pickers; add rolling 24m ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 7 file(s) modified&lt;/strong&gt;&lt;br/&gt;Filter delisted SKUs out of creation pickers; add rolling 24m delist migration&lt;br /&gt;
&lt;br /&gt;
Creation screens could offer items whose catalog.tag_listing.active = 0:&lt;br /&gt;
- Item.selectAllModels (scheme/offer model dropdown) joined tag_listing with&lt;br /&gt;
  no active predicate. Adding tl.active = true also gives the model-level&lt;br /&gt;
  rollup, since callers dedupe to catalogItemId: a model whose colours are&lt;br /&gt;
  all inactive now yields no rows, one keeping a listed colour stays.&lt;br /&gt;
- The shared partner item picker had no active filter at all. Added a second&lt;br /&gt;
  basis via getAllPartnerItemStringDescription(anyColor, activeOnly);&lt;br /&gt;
  activeOnly participates in the fofoItems cache key so the two bases cannot&lt;br /&gt;
  serve each other&apos;s cached results. Default stays false for screens that&lt;br /&gt;
  inspect or edit existing records.&lt;br /&gt;
- New TagListing.selectActiveItemIds named query backs the filter.&lt;br /&gt;
&lt;br /&gt;
Also adds the rolling 24-month delist migration: zero stock both sides, no&lt;br /&gt;
outstanding vendor PO (status IN (1,2), external supplier, unfulfilled &gt; 0 --&lt;br /&gt;
INIT is excluded as it is a drawer of stale drafts), and re-categorises&lt;br /&gt;
fully-dark mobile models to OTHER. Idempotent, audited, rollback documented.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/catalog/Item.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/catalog/TagListing.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/TagListingRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/TagListingRepositoryImpl.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/resources/sql/delist_inactive_listings_rolling_24m.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37563</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37563</guid></item>
<item><pubDate>Fri, 04 Sep 2026 23:19:17 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37535 – purchase return: guard invoice cancellation, and surface rejected-with-DN returns  ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;purchase return: guard invoice cancellation, and surface rejected-with-DN returns&lt;br /&gt;
&lt;br /&gt;
PurchaseReturnServiceImpl gains assertInvoiceNotCancelled and assertNotGrnd, so a&lt;br /&gt;
cancellation is refused when the invoice is already cancelled or the goods have been&lt;br /&gt;
GRN&apos;d - a return cannot be undone once the stock has been received in.&lt;br /&gt;
&lt;br /&gt;
PurchaseReturnOrderRepositoryImpl also counts returns that were rejected but never&lt;br /&gt;
acknowledged by the retailer while carrying a debit note, which otherwise fell out&lt;br /&gt;
of the pending queue despite still owing an action.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PurchaseReturnOrderRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37535</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37535</guid></item>
<item><pubDate>Thu, 03 Sep 2026 18:21:48 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37529 – purchase return: auto-approve invoice cancellation where it is safe  ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;purchase return: auto-approve invoice cancellation where it is safe&lt;br /&gt;
&lt;br /&gt;
GstProService.isCancellableWithoutApproval: a DC invoice cancels without approval;&lt;br /&gt;
anything else needs the order to be unshipped AND the IRN to still be cancellable.&lt;br /&gt;
&lt;br /&gt;
PurchaseReturnServiceImpl marks the order INVOICE_CANCELLED with the refund actor,&lt;br /&gt;
timestamp and reason recorded, and sets each line item&apos;s returnQty to its full&lt;br /&gt;
quantity - a cancelled invoice returns everything on it.&lt;br /&gt;
&lt;br /&gt;
Committed on behalf of the working copy; dao goes first so the method exists before&lt;br /&gt;
the fofo controller that calls it.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/GstProService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37529</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37529</guid></item>
<item><pubDate>Mon, 31 Aug 2026 11:10:00 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37464 – Track aged Apple stock on partner investment; add category filter ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 5 file(s) modified&lt;/strong&gt;&lt;br/&gt;Track aged Apple stock on partner investment; add category filter to stock value lookup&lt;br /&gt;
&lt;br /&gt;
selectPartnerStockValueMap now takes a nullable categoryId so the same query&lt;br /&gt;
serves both the existing Live Demo exclusion (null = all categories) and the&lt;br /&gt;
new Apple handset lookup (category 10006). Existing callers pass null and are&lt;br /&gt;
behaviourally unchanged.&lt;br /&gt;
&lt;br /&gt;
PartnerDailyInvestment carries agedAppleStockAmount, populated in both the&lt;br /&gt;
single and batch investment paths. It is JPA-@Transient, so no schema change,&lt;br /&gt;
and it still travels through the partnerStat.tmp serialization the FOFO&lt;br /&gt;
investment screen reads. Deliberately not part of getTotalInvestment() -- the&lt;br /&gt;
deduction is a credit-limit policy, so stock value is unchanged for checkout,&lt;br /&gt;
the investment-OK gates and partner-facing screens.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/PartnerDailyInvestment.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/InventoryItemRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/InventoryItemRepositoryImpl.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/PartnerInvestmentServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37464</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37464</guid></item>
<item><pubDate>Thu, 13 Aug 2026 18:29:56 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37308 – DN receipt: reject on condition mismatch instead of silently reclassifying ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;DN receipt: reject on condition mismatch instead of silently reclassifying&lt;br /&gt;
&lt;br /&gt;
The receive screen defaulted the Condition dropdown to GOOD and receiveDebitNoteItems&lt;br /&gt;
overwrote purchase_return_item.type with whatever was submitted. A DOA return received&lt;br /&gt;
without touching the dropdown was rewritten BAD-&gt;GOOD, so on reject -&gt; acknowledge the&lt;br /&gt;
restoreInventory branch put the unit back into good (sellable) stock instead of bad.&lt;br /&gt;
UKHD948/57: IMEI 353243710802439 was declared DOA, rejected as &apos;wrong entry&apos;, restored&lt;br /&gt;
as good stock and resold at MOP 3h44m later.&lt;br /&gt;
&lt;br /&gt;
- receiveDebitNoteItems now compares each submitted condition against the stored one and&lt;br /&gt;
  rejects the WHOLE debit note on any mismatch (PRO + rejectReturn are both per-DN and&lt;br /&gt;
  there is no model for a partial receipt). PRO is still persisted so the receipt attempt&lt;br /&gt;
  stays on record, then stamped rejected; no scans, no refund, no IRN work.&lt;br /&gt;
- Removed the pri.setReturnType(rt) overwrite. Past the gate the submitted condition always&lt;br /&gt;
  equals the stored one, and applyReceipt already reads it off the entity. Rejected returns&lt;br /&gt;
  now keep the declared type, so restoreReturnedItems restores to the right bucket.&lt;br /&gt;
- New notifyReturnRejectedConditionMismatch: to partner, cc Logistics L2/L3, RBM L1/L2 and&lt;br /&gt;
  Sales L1 + first populated level in L2..L4. Sales ladder is sparse (L2 262 partners,&lt;br /&gt;
  L3 64, L4 1582 of 1524 open stores) so a fixed L2/L3 rule resolves to nobody for most.&lt;br /&gt;
- getTeamEmails now filters inactive users and dedupes. csService.getAuthUserByCategoryId&lt;br /&gt;
  (2-arg) does not filter active unlike its 1-arg sibling; fixed here rather than in&lt;br /&gt;
  CsServiceImpl because that overload has ~25 other call sites where dropping inactive&lt;br /&gt;
  users would change report scoping.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnNotificationService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnNotificationServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37308</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37308</guid></item>
<item><pubDate>Tue, 11 Aug 2026 02:29:47 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37290 – Credit Note IRN: credit only the returned units, not the ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;Credit Note IRN: credit only the returned units, not the whole invoice&lt;br /&gt;
&lt;br /&gt;
refundOrder persisted the CreditNote and its lines from the returned&lt;br /&gt;
inventory items, but then called generateCreditNoteIrn(invoiceNumber, ...),&lt;br /&gt;
which rebuilt the NIC payload by re-reading the original invoice - every&lt;br /&gt;
line at billed quantity. A 1-pc DOA return against NSDL37092 therefore&lt;br /&gt;
tried to register a CN covering the full invoice (2 phones + 27 carry&lt;br /&gt;
bags, Rs 26,664.27) against a Rs 13,332 wallet refund, and the legacy&lt;br /&gt;
4-digit HSN on the carry-bag line failed NIC validation with error 2311.&lt;br /&gt;
&lt;br /&gt;
The wallet credit, the CreditNote row and its lines were always correct;&lt;br /&gt;
only the e-invoice payload was wrong.&lt;br /&gt;
&lt;br /&gt;
- InvoiceService.getInvoicePdfModelForIrn: optional returnedQtyByOrderId&lt;br /&gt;
  restricts the item list to the returned orders and prices each line at&lt;br /&gt;
  the returned quantity. The existing single-arg method delegates with&lt;br /&gt;
  null, so invoice PDF generation is unchanged. Margin-scheme, delivery&lt;br /&gt;
  challan, IMEI-suffix and HSN handling apply to the reduced line as-is.&lt;br /&gt;
- GstProService.generateCreditNoteIrn: 4-arg overload taking the map; the&lt;br /&gt;
  3-arg version delegates with null for whole-invoice returns.&lt;br /&gt;
- PurchaseReturnServiceImpl.refundOrder: passes orderReturnQtyMap, which&lt;br /&gt;
  was already built for the ReturnOrderInfo rows.&lt;br /&gt;
&lt;br /&gt;
Verified against the NIC sandbox using the real NSDL37092 rows: the old&lt;br /&gt;
payload is rejected with error 2311, the new payload is accepted&lt;br /&gt;
(DocTyp CRN, ItemCnt 1, MainHsnCode 85171300, TotInvVal 13331.99).&lt;br /&gt;
&lt;br /&gt;
Not covered here: applyInvoiceReturnViaCreditNote still sends the whole&lt;br /&gt;
invoice, so an invoice partially returned earlier re-credits those units.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/GstProService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/invoicing/InvoiceService.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37290</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37290</guid></item>
<item><pubDate>Thu, 06 Aug 2026 10:54:32 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37244 – Hot deal attributes: five mandatory fields (warranty_months 0-12, item_condition NEW/OPEN_BOX/REFURBISHED, ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 10 file(s) modified&lt;/strong&gt;&lt;br/&gt;Hot deal attributes: five mandatory fields (warranty_months 0-12, item_condition NEW/OPEN_BOX/REFURBISHED, activated, finance_mapping, affordability) on model_hot_deal - entity+enum+attributes holder, service validation (no defaults), addDeal/updateDeal signatures, selectActiveByCatalogItemIds/selectAllActive repo queries, hotDealTags on FofoCatalogResponse, DDL script, tests (14 green)&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/catalog/HotDealCondition.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/catalog/ModelHotDeal.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/ModelHotDealRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/ModelHotDealRepositoryImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/catalog/HotDealAttributes.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/catalog/ModelHotDealService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/catalog/ModelHotDealServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/FofoCatalogResponse.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/model_hot_deal_attributes.sql&lt;br /&gt;~ /trunk/profitmandi-dao/src/test/java/com/spice/profitmandi/service/catalog/ModelHotDealServiceImplTest.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37244</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37244</guid></item>
<item><pubDate>Thu, 23 Jul 2026 18:06:38 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37136 – Release scheme payout and price-hike deduction on every GRN scan ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 5 file(s) modified&lt;/strong&gt;&lt;br/&gt;Release scheme payout and price-hike deduction on every GRN scan instead of purchase completion; serialize per-purchase processing with FOR UPDATE lock on fofo.purchase to prevent duplicate credits/debits under concurrent runs&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PurchaseRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PurchaseRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/pricing/PriceHikeServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/scheme/SchemeServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37136</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37136</guid></item>
<item><pubDate>Thu, 23 Jul 2026 13:18:41 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37132 – Add bulk approval of vendor catalog pricing via file re-upload: ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;Add bulk approval of vendor catalog pricing via file re-upload: approveBulkVendorCatalogPricing validates re-uploaded file rows against pending requests (all-or-nothing) and approves them; extract single-row approval into approveVendorCatalogPricingLog; share workbook parsing between upload and verify paths&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/VendorCatalogPricingService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/VendorCatalogPricingServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37132</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37132</guid></item>
<item><pubDate>Tue, 07 Jul 2026 12:40:43 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37024 – FOFO add-to-cart: show held Live Demo IMEIs as disabled &apos;Sellable ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;FOFO add-to-cart: show held Live Demo IMEIs as disabled &apos;Sellable from &amp;lt;date&gt;&apos; checkboxes instead of falling back to quantity field&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/InventoryServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37024</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=37024</guid></item>
<item><pubDate>Thu, 02 Jul 2026 17:31:00 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36999 – Price-hike deduction (self-contained): revert hike logic from price-drop flow + ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 11 file(s) modified&lt;/strong&gt;&lt;br/&gt;Price-hike deduction (self-contained): revert hike logic from price-drop flow + remove deduct_on_hike flag; add GRN hook (PurchaseServiceImpl, before schemes) and on-demand executor endpoint that debit under-charged units billed in the hike&apos;s [affected_on, created_on] window. Idempotent per (hike, imei).&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/config/AsyncConfig.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/PriceDrop.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/PriceDropRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/PriceDropRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/pricecircular/PriceCircularService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/pricing/PriceDropServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/pricing/PriceHikeService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/pricing/PriceHikeServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/pricing/PriceHikeWorker.java&lt;br /&gt;x /trunk/profitmandi-dao/src/main/resources/sql/add_deduct_on_hike_to_price_drop.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36999</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36999</guid></item>
<item><pubDate>Tue, 30 Jun 2026 15:22:32 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36958 – Flagship credit: fire interest-free limits at billing + per-IMEI conversion ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 12 file(s) modified&lt;/strong&gt;&lt;br/&gt;Flagship credit: fire interest-free limits at billing + per-IMEI conversion&lt;br /&gt;
&lt;br /&gt;
- createLoanForBilling now detects flagship lines inside the billing transaction (fixes the&lt;br /&gt;
  REQUIRES_NEW visibility bug where flagship detection re-queried uncommitted invoice_number and&lt;br /&gt;
  never fired). Creates one combined flagship limit (is_flagship=1, limit_block=1, 30-day deadline)&lt;br /&gt;
  plus one transaction.loan_imei row per device.&lt;br /&gt;
- convertFlagshipOnSale / IMEI activation now convert only the sold device&apos;s slice (matched by IMEI),&lt;br /&gt;
  so same-model siblings and other billing tranches keep their interest-free window; full convert at&lt;br /&gt;
  30-day expiry. Lock order aligned (loan -&gt; loan_imei) to avoid sale/expiry deadlock.&lt;br /&gt;
- New transaction.loan_imei table + LoanImei entity/repository (migration_loan_imei_table.sql).&lt;br /&gt;
- selectAllLoansByInvoice: PurchaseReturn now settles BOTH the real loan and the flagship limit on a&lt;br /&gt;
  flagship-invoice return (prevents credit leak from a stranded limit).&lt;br /&gt;
- Cap guard (flagship credit never exceeds amount drawn) and robust limit settlement (paisa threshold&lt;br /&gt;
  instead of exact float equality).&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/LoanImei.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/LoanImeiRepository.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/LoanImeiRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/LoanRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/LoanRepositoryImpl.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/PurchaseReturnServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/order/OrderServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/SDCreditService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/SDCreditServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/TransactionServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/migration_loan_imei_table.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36958</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36958</guid></item>
<item><pubDate>Thu, 25 Jun 2026 14:20:36 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36926 – Link returnorderinfo to credit_note in DN-refund path (approveDebitNoteRefund)  approveDebitNoteRefund ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;Link returnorderinfo to credit_note in DN-refund path (approveDebitNoteRefund)&lt;br /&gt;
&lt;br /&gt;
approveDebitNoteRefund issues a RETURNS credit note but created the&lt;br /&gt;
ReturnOrderInfo rows before the CN and never set credit_note_id, so DN&lt;br /&gt;
returns showed a null FK (blank CN in reports) despite a valid CN existing.&lt;br /&gt;
r36817 only wired this FK into applyInvoiceReturnViaCreditNote. Collect the&lt;br /&gt;
created ReturnOrderInfo rows and stamp credit_note_id after the CN is&lt;br /&gt;
persisted (parity with the invoice-return path).&lt;br /&gt;
&lt;br /&gt;
Add backfill_dn_return_credit_note_id.sql to link existing null-FK rows by&lt;br /&gt;
invoice -&gt; RETURNS CN, excluding ambiguous multi-CN invoices.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/backfill_dn_return_credit_note_id.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36926</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36926</guid></item>
<item><pubDate>Thu, 25 Jun 2026 11:01:00 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36925 – Vendor catalog pricing: validate single-create path (reject non-positive ids/prices, null ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Vendor catalog pricing: validate single-create path (reject non-positive ids/prices, null effectedOn) and gate vendor_item_pricing propagation behind the effected-date check so back-dated approvals no longer overwrite item-level prices&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/VendorCatalogPricingServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36925</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36925</guid></item>
<item><pubDate>Fri, 19 Jun 2026 17:49:30 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36880 – Harden bulk vendor catalog pricing upload: set creator authId, skip ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Harden bulk vendor catalog pricing upload: set creator authId, skip null rows, aggregate row errors, validate price sanity (tp/dp/mop&gt;0) and duplicate/pending requests&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/VendorCatalogPricingServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36880</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36880</guid></item>
<item><pubDate>Wed, 10 Jun 2026 14:43:25 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36817 – Link returnorderinfo to credit_note via credit_note_id FK  Add a ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;Link returnorderinfo to credit_note via credit_note_id FK&lt;br /&gt;
&lt;br /&gt;
Add a direct credit_note_id column on returnorderinfo so a return row&lt;br /&gt;
can be tied to the Credit Note it was refunded via, replacing the&lt;br /&gt;
indirect/ambiguous association through original_invoice_number + the CN&lt;br /&gt;
number embedded in refundDescription. Stamped in&lt;br /&gt;
applyInvoiceReturnViaCreditNote; migration adds the column and backfills&lt;br /&gt;
existing rows by parsing the CN number out of refundDescription.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/ReturnOrderInfo.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/add_credit_note_id_to_returnorderinfo.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36817</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36817</guid></item>
<item><pubDate>Wed, 27 May 2026 20:18:27 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36719 – Add total_amount to credit_note: new column + backfill from lines, ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 4 file(s) modified&lt;/strong&gt;&lt;br/&gt;Add total_amount to credit_note: new column + backfill from lines, populate at all 5 CN/DN creation points, fix account statement query (cn.created_at -&gt; cn.create_timestamp)&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/CreditNote.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/PurchaseReturnServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/CreditNoteServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36719</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36719</guid></item>
<item><pubDate>Thu, 21 May 2026 14:45:45 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36624 – Thrift cleanup: migrate types, remove dead code, add moved files ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 13 file(s) modified&lt;/strong&gt;&lt;br/&gt;Thrift cleanup: migrate types, remove dead code, add moved files&lt;br /&gt;
&lt;br /&gt;
- Added Affiliate.java POJO (replaces Thrift struct)&lt;br /&gt;
- Moved from profitmandi-common: WalletHistoryModel, ExcelUtils, CustomOrder&lt;br /&gt;
- Removed dead createReturnTransaction method from ReturnService/Impl&lt;br /&gt;
- Removed dead getPartnerStockOnDate from InventoryService/Impl&lt;br /&gt;
- Replaced CatalogServiceException with Exception in PdfPoSheetGenerator&lt;br /&gt;
- Removed Thrift client imports from UserServiceImpl&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/common&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/common/model&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/common/model/CustomOrder.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/common/util&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/common/util/ExcelUtils.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/common/util/WalletHistoryModel.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/transaction/ReturnService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/ReturnServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/UserServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/PdfPoSheetGenerator.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/in/shop2020/model/v1/user/Affiliate.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36624</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36624</guid></item>
<item><pubDate>Sun, 17 May 2026 15:15:25 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36578 – Flagship credit: fix sale conversion to use invoice reference, add ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 6 file(s) modified&lt;/strong&gt;&lt;br/&gt;Flagship credit: fix sale conversion to use invoice reference, add IMEI activation trigger&lt;br /&gt;
&lt;br /&gt;
- Sale flow: removed unnecessary model_flagship table lookup at sale time. The flagship loan&apos;s invoice number already links to the purchase orders, making the date-based check redundant and incorrect (would miss conversions if flagship entry removed after billing).&lt;br /&gt;
- IMEI activation: added flagship conversion in addActivatedImeis() for newly activated serials. Groups by partner, checks flagship limits, converts via invoice matching. Covers Samsung/Vivo/Oppo/Realme activation crons and manual UI uploads.&lt;br /&gt;
- Repository: added date-parameterized selectActiveFlagshipCatalogIds(catalogIds, asOfDate) overload for future use. Existing method delegates with LocalDate.now().&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/ModelFlagshipRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/ModelFlagshipRepositoryImpl.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/order/OrderServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/SDCreditService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/SDCreditServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36578</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36578</guid></item>
<item><pubDate>Sat, 16 May 2026 14:41:29 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36573 – refactor: extract RTV methods from PurchaseReturnService into ReturnToVendorService, add ReturnPermissionHelper ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 5 file(s) modified&lt;/strong&gt;&lt;br/&gt;refactor: extract RTV methods from PurchaseReturnService into ReturnToVendorService, add ReturnPermissionHelper and PurchaseReturnOrderStatus&lt;/div&gt;+ /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/enumuration/PurchaseReturnOrderStatus.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/PurchaseReturnController.java&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ReturnPermissionHelper.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36573</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36573</guid></item>
<item><pubDate>Sat, 16 May 2026 14:10:17 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36568 – refactor: RTV - add local caching, batch queries, typed DTO, ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 8 file(s) modified&lt;/strong&gt;&lt;br/&gt;refactor: RTV - add local caching, batch queries, typed DTO, fix documentNumber overwrite and settledAmount validation&lt;/div&gt;+ /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/DebitNoteLineInfo.java&lt;br /&gt;~ /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ImeiInvoiceGroup.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/warehouse/PurchaseReturn.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/warehouse/WarehousePurchaseRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/warehouse/WarehousePurchaseRepositoryImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ReturnToVendorService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ReturnToVendorServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ReturnToVendorController.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36568</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36568</guid></item>
<item><pubDate>Sat, 16 May 2026 12:24:49 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36559 – feat: auto-generate debit notes on RTV with proper DN/{prefix}/{sequence} numbering</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;feat: auto-generate debit notes on RTV with proper DN/{prefix}/{sequence} numbering&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/warehouse/WarehouseLineItem.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/finance-debit-note-generated.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36559</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36559</guid></item>
<item><pubDate>Sat, 16 May 2026 11:34:53 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36558 – RTV: always set lastScanType to PURCHASE_RETURN in markItemReturned (informational, not ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;RTV: always set lastScanType to PURCHASE_RETURN in markItemReturned (informational, not conditional on full drain)&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36558</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36558</guid></item>
<item><pubDate>Fri, 15 May 2026 16:22:18 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36544 – Refactor RTV (Return to Vendor) flow: replace native SQL with ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;Refactor RTV (Return to Vendor) flow: replace native SQL with repository/service methods, extract reusable helpers (resolvePurchase, resolveLineItem, markItemReturned, createPurchaseReturnEntity), fix availability bug by adding saholicInventoryService.reduceAvailability, validate returnability by currentQuantity&gt;0 instead of lastScanType&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/warehouse/WarehouseInventoryItemRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/warehouse/WarehouseInventoryItemRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36544</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36544</guid></item>
<item><pubDate>Sat, 09 May 2026 21:48:04 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36507 – Skip Credit Note IRN generation for Delivery Challan (DC) returns ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Skip Credit Note IRN generation for Delivery Challan (DC) returns — same GSTIN on both sides causes NIC rejection. Cancel EWB best-effort instead.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36507</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36507</guid></item>
<item><pubDate>Tue, 05 May 2026 20:05:29 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36477 – Invoice return: IRN/EWB cancellation on approve, Logistics L2+ permission, DL ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 6 file(s) modified&lt;/strong&gt;&lt;br/&gt;Invoice return: IRN/EWB cancellation on approve, Logistics L2+ permission, DL GST disabled&lt;br /&gt;
&lt;br /&gt;
- approveInvoiceReturn now cancels IRN+EWB when cancellable (path B) before falling back to Credit Note (path A)&lt;br /&gt;
- DC/challan EWB cancelled best-effort before Credit Note path&lt;br /&gt;
- Added enabled flag to GstEInvoiceUser; DL GSTIN disabled in E_INVOICE_USERS and EWB_USERS&lt;br /&gt;
- isGstEnabled guard added to all public GST API methods in GstProService&lt;br /&gt;
- Logistics L2+ can now approve/reject invoice returns (not just Finance)&lt;br /&gt;
- invoice-return.vm uses canApproveInvoiceReturn for INV-prefix button visibility&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/api/model/GstEInvoiceUser.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/GstProAuthService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/GstProService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/PurchaseReturnController.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/invoice-return.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36477</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36477</guid></item>
<item><pubDate>Mon, 04 May 2026 11:31:48 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36455 – Fix: populate saleQtyByKey for serialized items too, include DOA_IN in ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix: populate saleQtyByKey for serialized items too, include DOA_IN in returnQtyByKey&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36455</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36455</guid></item>
<item><pubDate>Sat, 02 May 2026 17:14:12 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36450 – Refactor applyReceipt: extract scan creation to WarehouseInventoryService.recordReturnScan with validation for ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;Refactor applyReceipt: extract scan creation to WarehouseInventoryService.recordReturnScan with validation for all return types (SALE_RET/DOA_IN/SALE_RET_UNUSABLE), qty&gt;0, sold-qty capacity check, and SALE_RET warehouse capacity check&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.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;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36450</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36450</guid></item>
<item><pubDate>Sat, 02 May 2026 16:53:13 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36449 – Fix duplicate PurchaseReturnItem creation for serialized items - use list ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix duplicate PurchaseReturnItem creation for serialized items - use list query with CREATED/APPROVED status check instead of single-result query&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36449</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36449</guid></item>
<item><pubDate>Fri, 01 May 2026 23:48:55 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36446 – DN lifecycle: decouple rejection from restore, add DebitNoteStatus, retailer acknowledgment ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 8 file(s) modified&lt;/strong&gt;&lt;br/&gt;DN lifecycle: decouple rejection from restore, add DebitNoteStatus, retailer acknowledgment flow&lt;br /&gt;
&lt;br /&gt;
- Add DebitNoteStatus enum (CREATED/RECEIVED/APPROVED/REJECTED/CANCELLED) on debit_note table&lt;br /&gt;
- Add retailer_acknowledge_timestamp on purchase_return_order&lt;br /&gt;
- rejectReturn() no longer calls restoreReturnedItems() — inventory stays reduced until retailer confirms goods received back&lt;br /&gt;
- New acknowledgeRejectedReturn(): retailer confirms receipt, restores inventory+schemes+offers, DN→CANCELLED&lt;br /&gt;
- Set DN status in receiveDebitNoteItems (RECEIVED), refundOrder (APPROVED), rejectReturn (REJECTED)&lt;br /&gt;
- notifyReturnRejected: updated message, added Finance L1+L2 to CC&lt;br /&gt;
- notifyItemsReceived: added Finance L1&lt;br /&gt;
- New notifyRejectedGoodsAcknowledged notification&lt;br /&gt;
- SQL migration with backfill for existing data&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/DebitNote.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/PurchaseReturnOrder.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/enumuration/fofo/DebitNoteStatus.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnNotificationService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnNotificationServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/migration_dn_status_retailer_ack.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36446</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36446</guid></item>
<item><pubDate>Wed, 29 Apr 2026 18:41:19 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36429 – Fix credit limit settlement not happening on billing and post-billing ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix credit limit settlement not happening on billing and post-billing cancellation&lt;br /&gt;
&lt;br /&gt;
createLoanForBilling has REQUIRES_NEW (added for lock isolation against&lt;br /&gt;
order row locks held by the billing method). Inside that new transaction it&lt;br /&gt;
queried orders to find which were just billed — but the billing timestamps&lt;br /&gt;
set in the suspended outer transaction are invisible, so the condition&lt;br /&gt;
always evaluates FALSE when all orders are billed in one call. The limit&lt;br /&gt;
block is never converted to a loan and never released.&lt;br /&gt;
&lt;br /&gt;
Fix: remove the order query. The caller already passes invoiceAmount (sum&lt;br /&gt;
of walletAmount for the billed orders). Use it directly with Math.min to&lt;br /&gt;
cap at pendingAmount. REQUIRES_NEW kept for lock isolation.&lt;br /&gt;
&lt;br /&gt;
Also: cancelInvoiceFully and applyInvoiceReturnViaCreditNote (post-billing&lt;br /&gt;
invoice cancellation/return paths) credit the partner wallet but never&lt;br /&gt;
settle the non-limit loan created during billing. Added settleLoan call&lt;br /&gt;
after wallet credit in both paths, guarded by settledOn == null check.&lt;br /&gt;
&lt;br /&gt;
Data defect: 95 stuck limit blocks totaling Rs 56.95 lakh across partners.&lt;br /&gt;
Most have no actual loan created. Needs one-time remediation via&lt;br /&gt;
fixBlockedCredit() in ScheduledTasks.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/PurchaseReturnServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/SDCreditServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36429</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36429</guid></item>
</channel></rss>