<?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/repository/fofo/</title><description>WebSVN RSS feed &#x2013; SmartDukaan</description><lastBuildDate>Thu, 08 Oct 2026 16:36:52 +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%2Fdao%2Frepository%2Ffofo%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%2Fdao%2Frepository%2Ffofo%2F&amp;repname=SmartDukaan" rel="self" type="application/rss+xml" />
<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%2Fdao%2Frepository%2Ffofo%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%2Fdao%2Frepository%2Ffofo%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%2Fdao%2Frepository%2Ffofo%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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37776</guid></item>
<item><pubDate>Thu, 24 Sep 2026 17:21:58 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37764 – feat(store-closure): require reason, remark and approval mail to close a ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 7 file(s) modified&lt;/strong&gt;&lt;br/&gt;feat(store-closure): require reason, remark and approval mail to close a store; mail closure report&lt;br /&gt;
&lt;br /&gt;
- fofo.store_closure audit table (reason, remark, approval document, closed_by); migration applied on hadb1&lt;br /&gt;
- StoreClosureService: validates and closes, queues closure report with approval attached to the&lt;br /&gt;
  partner&apos;s Sales L2, top 3 Sales levels, top Accounts level and the closer&lt;br /&gt;
- StoreAccess: single home for store close/deactivate/activate/extend-billing access lists;&lt;br /&gt;
  neeraj.gupta can close, mohit.gulati removed from extend billing&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/StoreClosure.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/enumuration/fofo/StoreClosureReason.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/StoreClosureRepository.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/StoreClosureRepositoryImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/StoreAccess.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/StoreClosureService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/migration_store_closure.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37764</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37764</guid></item>
<item><pubDate>Mon, 21 Sep 2026 12:33:17 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37732 – purchase return: look up the open return against a document ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;purchase return: look up the open return against a document&lt;br /&gt;
&lt;br /&gt;
selectOpenByDocumentReference returns the return still outstanding against a&lt;br /&gt;
document reference - neither refunded nor rejected - or null when none is.&lt;br /&gt;
&lt;br /&gt;
Backs a duplicate guard on the invoice-return submit path: the same invoice was&lt;br /&gt;
being submitted twice, the closest pair eight seconds apart, and finance was&lt;br /&gt;
rejecting the extras by hand. A settled return deliberately does not count, since&lt;br /&gt;
rejecting a return is precisely what frees the invoice to be raised again.&lt;br /&gt;
&lt;br /&gt;
Repository lands first so the method exists before the caller uses it.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PurchaseReturnOrderRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PurchaseReturnOrderRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37732</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37732</guid></item>
<item><pubDate>Tue, 15 Sep 2026 13:16:00 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37628 – feat(mail): filter inactive auth users from outgoing mail  InactiveAuthUserRecipientFilter ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 9 file(s) modified&lt;/strong&gt;&lt;br/&gt;feat(mail): filter inactive auth users from outgoing mail&lt;br /&gt;
&lt;br /&gt;
InactiveAuthUserRecipientFilter drops @smartdukaan.com recipients whose auth.auth_user is inactive (cached, 5 min refresh, fail-open). Remove inactive hardcoded recipients (sm@, praveen.sharma, tejus.lohani).&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PendingOrderServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/service/LocationTrackingServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/service/loiForm/LoiFormServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/mail/InactiveAuthUserRecipientFilter.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/serviceConfig/ServiceConfigServiceImpl.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/user/StoreTimelineTatServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/test/java/com/spice/profitmandi/service/mail&lt;br /&gt;+ /trunk/profitmandi-dao/src/test/java/com/spice/profitmandi/service/mail/InactiveAuthUserRecipientFilterTest.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37628</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37628</guid></item>
<item><pubDate>Fri, 11 Sep 2026 19:19:38 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37592 – Fix live-demo deduction lost in the investment snapshot; maintain aged-Apple ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 8 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix live-demo deduction lost in the investment snapshot; maintain aged-Apple qty&lt;br /&gt;
&lt;br /&gt;
BUG FIX to r37588. InventoryService.getTotalAmountInStock() returns stock net of&lt;br /&gt;
live-demo units held past 90 days, and both original investment paths assigned&lt;br /&gt;
that netted value to inStockAmount - which is why&lt;br /&gt;
PartnerDailyInvestment.getTotalInvestment() carries no separate demo term. The&lt;br /&gt;
sweep stored the RAW snapshot sum and never applied the deduction, overstating&lt;br /&gt;
investment for 328 partners by Rs 5.19 crore and their limits by roughly Rs 1.3&lt;br /&gt;
crore. Maxwell validated clean earlier only because he holds no demo stock.&lt;br /&gt;
&lt;br /&gt;
Fixed by storing what is measured and deriving what is computed: the column is&lt;br /&gt;
now in_stock_gross_amount and getNetInStockAmount() applies the haircut. The demo&lt;br /&gt;
holding moves on its own daily clock, so storing the netted figure would have&lt;br /&gt;
meant re-netting it in three places every time the haircut changed - the same&lt;br /&gt;
&apos;two things must move together&apos; trap behind the original cache bug. Deriving it&lt;br /&gt;
means a daily demo refresh flows through to stock and base with nothing to sync.&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
- aged_apple_qty stored on the snapshot and maintained on the same daily cycle as&lt;br /&gt;
  aged_apple_stock_amount, so the partner banner reads a saved count instead of&lt;br /&gt;
  running a count query per dashboard load, and count and value can never disagree&lt;br /&gt;
- selectPartnerStockCountMap mirrors selectPartnerStockValueMap, including the&lt;br /&gt;
  activated exclusion&lt;br /&gt;
- selectAgedAppleStock lists the units behind the haircut for the partner view&lt;br /&gt;
- FofoUser exposes aged_apple_stock / aged_apple_qty&lt;br /&gt;
- stock-moved detection compares GROSS: a demo unit crossing 90 days changes net&lt;br /&gt;
  stock but nothing physically moved, and that is the daily refresh&apos;s job&lt;br /&gt;
&lt;br /&gt;
Schema: partner_investment_snapshot.sql updated (in_stock_gross_amount,&lt;br /&gt;
aged_apple_qty). Applied to prod - the table was empty, so it was dropped and&lt;br /&gt;
recreated from the script.&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/entity/fofo/PartnerInvestment.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/FofoUser.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/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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37592</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37592</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%2Fdao%2Frepository%2Ffofo%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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37588</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%2Fdao%2Frepository%2Ffofo%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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37535</guid></item>
<item><pubDate>Mon, 31 Aug 2026 17:59:05 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37481 – imei activation: one 2-day billing floor for every brand, and ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;imei activation: one 2-day billing floor for every brand, and drop two dead methods&lt;br /&gt;
&lt;br /&gt;
The pending pool is a UNION of two channels, not an intersection: an imei qualifies&lt;br /&gt;
if WE billed it to the partner (selectImeiActivationByBrand) or the PARTNER billed it&lt;br /&gt;
on to the end customer (selectImeiActivationByBrandTertiary). The two are disjoint by&lt;br /&gt;
construction -- the secondary query excludes anything carrying a FofoLineItem -- so a&lt;br /&gt;
unit moves from one to the other as it sells through and is never asked about twice.&lt;br /&gt;
Said so on the interface, since the pairing was only documented at the call sites.&lt;br /&gt;
&lt;br /&gt;
billedBefore moves from now-1d to now-2d, so both channels ask only about stock billed&lt;br /&gt;
MORE THAN 2 DAYS ago. Anything sold in the last 48 hours has essentially never been&lt;br /&gt;
activated yet, so the lookup is spent for nothing; it is not lost, the same imei comes&lt;br /&gt;
back into the pool as soon as it crosses the floor, and again every day after that&lt;br /&gt;
until it activates. Kept in the repository rather than per caller so vivo, oppo, realme,&lt;br /&gt;
motorola and the new carlcare pass inherit one rule instead of drifting apart.&lt;br /&gt;
&lt;br /&gt;
Costs almost nothing today -- secondary pool, old floor vs new:&lt;br /&gt;
&lt;br /&gt;
  itel 1550 -&gt; 1550    realme    849 -&gt;  849    oppo     2021 -&gt; 2019&lt;br /&gt;
  vivo 5018 -&gt; 5016    motorola 1168 -&gt; 1153    tecno     502 -&gt;  495&lt;br /&gt;
&lt;br /&gt;
26 rows across six brands, each deferred by one day.&lt;br /&gt;
&lt;br /&gt;
Removed as dead:&lt;br /&gt;
&lt;br /&gt;
  selectImeiActivationPendingByRealme -- a verbatim duplicate of&lt;br /&gt;
  selectImeiActivationPendingByBrand down to the named query and the parameters. Nothing&lt;br /&gt;
  called it; StandAlone already used the brand-generic method for realme and said so in&lt;br /&gt;
  a comment, which is now updated.&lt;br /&gt;
&lt;br /&gt;
  selectImeiSoldNotActivatedByBrand -- interface, impl and named query. No callers&lt;br /&gt;
  anywhere in web, fofo, cron or dao.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ActivatedImei.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ActivatedImeiRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ActivatedImeiRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37481</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37481</guid></item>
<item><pubDate>Mon, 31 Aug 2026 16:07:40 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37471 – IMEI activation pools: skip stock billed today or yesterday  ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;IMEI activation pools: skip stock billed today or yesterday&lt;br /&gt;
&lt;br /&gt;
Both pool named queries now exclude serials whose sale is inside the last 48&lt;br /&gt;
hours -- o.billingTimestamp for the secondary path, fo.createTimestamp for the&lt;br /&gt;
tertiary one. A handset sold in the last two days has essentially never been&lt;br /&gt;
activated yet, so the lookup is spent for nothing: measured on prod, the&lt;br /&gt;
sold-within-180-days cohort returns an activation date on 2.4% (vivo) to 8.4%&lt;br /&gt;
(oppo) of lookups, against 43-97% for stock sold over a year ago.&lt;br /&gt;
&lt;br /&gt;
billedBefore is set in ActivatedImeiRepositoryImpl rather than passed by the&lt;br /&gt;
caller, so no method signature changes and every brand inherits it -- vivo,&lt;br /&gt;
oppo, realme and motorola all draw from these two queries and nothing outside&lt;br /&gt;
profitmandi-cron uses them.&lt;br /&gt;
&lt;br /&gt;
This is correctness rather than capacity: it trims 30 imeis from the oppo pool&lt;br /&gt;
and 9 from realme.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ActivatedImei.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ActivatedImeiRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37471</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37471</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%2Fdao%2Frepository%2Ffofo%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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37464</guid></item>
<item><pubDate>Thu, 27 Aug 2026 20:27:13 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37446 – Per-brand batch sizes, and stop chrome forking a GPU process ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 6 file(s) modified&lt;/strong&gt;&lt;br/&gt;Per-brand batch sizes, and stop chrome forking a GPU process it cannot use&lt;br /&gt;
&lt;br /&gt;
maxResults was hardcoded in the shared repository methods, so Oppo and Vivo were&lt;br /&gt;
forced to the same secondary batch (10) and all three to the same tertiary (10).&lt;br /&gt;
It is now a parameter, set per brand at the call site.&lt;br /&gt;
&lt;br /&gt;
Sizing is arithmetic, from measured IN-BATCH per-imei time. Solving&lt;br /&gt;
M * 86400 / (300 + M*t) = needed/day:&lt;br /&gt;
&lt;br /&gt;
  brand    needed/day   t       M required   set to&lt;br /&gt;
  Vivo         9,407    0.8s        36         50    clears, ~12,700/day&lt;br /&gt;
  Realme       1,973   13.4s        10         10    was 5 = ~1,177/day, short&lt;br /&gt;
  Oppo         4,798   14.6s        88         10    HELD, see below&lt;br /&gt;
&lt;br /&gt;
Correcting an earlier measurement of mine: I reported Vivo at 13.6s per imei and&lt;br /&gt;
concluded its backlog could not be cleared. That averaged across the ~300s idle&lt;br /&gt;
gaps BETWEEN batches. In-batch it is 0.8s -- Vivo is 17x faster than I said, is&lt;br /&gt;
idle ~97% of the time, and 50 clears its pool comfortably. There is no wait in&lt;br /&gt;
the Vivo path; it is simply fast.&lt;br /&gt;
&lt;br /&gt;
Oppo is deliberately NOT raised. At 14.6s it would need M=88, which means&lt;br /&gt;
20-minute batches and near-permanent chrome sessions. But that 14.6s predates the&lt;br /&gt;
retry cap (r37445), which cuts exhausted imeis from 20 attempts to 7 and should&lt;br /&gt;
drop it sharply. Re-measure before sizing Oppo, rather than guessing high on a&lt;br /&gt;
box with 3GB free.&lt;br /&gt;
&lt;br /&gt;
Also: --disable-gpu, --disable-dev-shm-usage, --disable-software-rasterizer on&lt;br /&gt;
both selenium tasks. Headless needs no GPU yet chrome forks a gpu-process per&lt;br /&gt;
browser -- 6 were alive across the fleet, pure overhead. No behaviour change.&lt;br /&gt;
&lt;br /&gt;
Batch size does not raise peak concurrency (fixedDelay means one batch per job at&lt;br /&gt;
a time, so never more than 4 drivers). It raises DUTY CYCLE, which converts&lt;br /&gt;
chrome&apos;s footprint from intermittent to sustained. That matters here: tomcat is&lt;br /&gt;
9.4GB, available is ~3GB, and the two OOM kills this month both took tomcat.&lt;br /&gt;
&lt;br /&gt;
Cron-only deploy. The dao signature change has no callers outside cron.&lt;/div&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/CheckOppoWarrantyTask.java&lt;br /&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/CheckRealmeWarrantyTask.java&lt;br /&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/StandAlone.java&lt;br /&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/VivoImeiActivationService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ActivatedImeiRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ActivatedImeiRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37446</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37446</guid></item>
<item><pubDate>Fri, 21 Aug 2026 14:30:40 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37377 – Queries behind the Sale Returns action-pending queue  The Sale ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 4 file(s) modified&lt;/strong&gt;&lt;br/&gt;Queries behind the Sale Returns action-pending queue&lt;br /&gt;
&lt;br /&gt;
The Sale Returns screen could only ever list purchase return orders received inside the&lt;br /&gt;
chosen date window, which left the returns that actually need someone unreachable: a&lt;br /&gt;
return order is written at receive time, so a debit note the warehouse has not received&lt;br /&gt;
yet has no return order at all and could not appear however the list was sorted.&lt;br /&gt;
&lt;br /&gt;
- selectPendingByWarehouseIds returns every unsettled return order with no date bound -&lt;br /&gt;
  received but unrefunded, or rejected but not yet acknowledged by the retailer. A return&lt;br /&gt;
  nobody acted on only gets older, so bounding it by date is what buried it&lt;br /&gt;
- selectUnreceivedSince finds debit notes with no return order against them, which is the&lt;br /&gt;
  only place a not-yet-received return exists. Cancelled notes are excluded&lt;br /&gt;
- selectEarliestCreateTimestamp exposes when the receive/refund flow went live. Notes&lt;br /&gt;
  raised before the first return order ever recorded were settled through the older&lt;br /&gt;
  item-level flow and are not a queue anyone can work, so the caller uses this to bound&lt;br /&gt;
  the lookup off the data rather than off a date pinned in code&lt;br /&gt;
- both listing queries now take an optional fofoId, so the partner filter is a predicate&lt;br /&gt;
  rather than a post-filter - filtering after the 200 row cap would silently drop a&lt;br /&gt;
  partner&apos;s older rows&lt;br /&gt;
&lt;br /&gt;
Counts on live data: 6 unsettled return orders, 24 unreceived debit notes since the flow&lt;br /&gt;
started, against 5,618 older notes correctly left out.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/DebitNoteRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/DebitNoteRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PurchaseReturnOrderRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PurchaseReturnOrderRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37377</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37377</guid></item>
<item><pubDate>Mon, 17 Aug 2026 17:46:07 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37327 – super retailer club 5 live</title><description>&lt;div&gt;&lt;strong&gt;ranu – 21 file(s) modified&lt;/strong&gt;&lt;br/&gt;super retailer club 5 live&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOrderRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOrderRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/config/AppConfig.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/DashboardController.java&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/1 GM Gold Coin.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/accessories.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/calendar_.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/CURRENTLY AIMING FOR.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/download.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/Group 4.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/Maharaja.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/Mobile And tv.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/Raftaar.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/Shuruaat.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/Tarakki.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/Target.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/TOTAL ACHIEVEMENT.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/Udaan.png&lt;br /&gt;+ /trunk/profitmandi-fofo/src/main/webapp/resources/images/src-images/Vijeta.png&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/dashboard1.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37327</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37327</guid></item>
<item><pubDate>Fri, 14 Aug 2026 18:17:18 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37319 – Fix partner-performance tertiary: aggregate order items (qty*mop), not the POS-typed ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 6 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix partner-performance tertiary: aggregate order items (qty*mop), not the POS-typed order header&lt;br /&gt;
&lt;br /&gt;
The tertiary panel summed fofo_order.total_amount - a price typed at the partner POS&lt;br /&gt;
and never validated against the catalogue - and attributed each whole order to its&lt;br /&gt;
first line item&apos;s brand via .get(0). One mistyped digit inflated reported sell-out&lt;br /&gt;
10x, and mixed-brand orders booked 100% to the first brand, leaving the rest at zero.&lt;br /&gt;
Defect dates from r32000/r32034 (May 2023); the panel was the only tertiary consumer&lt;br /&gt;
diverging from the qty*mop basis.&lt;br /&gt;
&lt;br /&gt;
- New FofoOrder.selectMonthlyBrandTertiary: sum(quantity*mop) grouped by&lt;br /&gt;
  (year*100+month) and item brand - the same basis selectPartnerTertiarySales&lt;br /&gt;
  already uses for the DSR and the partner tier calculation&lt;br /&gt;
- PerformanceController: replaces two entity-loading queries (every FofoOrder and&lt;br /&gt;
  FofoOrderItem for 6 months) with one aggregate; all items now count, each under&lt;br /&gt;
  its own brand&lt;br /&gt;
- Month labels unchanged - toMonthLabel rebuilds the MMM&apos;&apos;uu key, template untouched&lt;br /&gt;
- Remove V2FofoPerformanceController, the /v2/fofo JSON copy carrying the same defect&lt;br /&gt;
&lt;br /&gt;
Verified against dev DB for fofo_id 175139501: Jul 2026 now 16,94,939 (panel&lt;br /&gt;
previously showed 50,92,440); all six months match the qty*mop basis.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/FofoOrder.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/MonthlyBrandTertiaryModel.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOrderRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOrderRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/PerformanceController.java&lt;br /&gt;x /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/V2FofoPerformanceController.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37319</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37319</guid></item>
<item><pubDate>Thu, 06 Aug 2026 14:56:50 +0530</pubDate><dc:creator>vikas</dc:creator><title>Rev 37248 – Updated Escalation Level</title><description>&lt;div&gt;&lt;strong&gt;vikas – 15 file(s) modified&lt;/strong&gt;&lt;br/&gt;Updated Escalation Level&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/auth/LocationTracking.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/auth/LocationTrackingRemarkScore.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/auth/LocationTrackingRemarkScoreRepository.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/auth/LocationTrackingRemarkScoreRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOrderRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOrderRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/resources/shared-prod.properties&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/resources/shared-staging.properties&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/BeatJourneyController.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/BeatPlanController.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/resources/js/beat-plan-app.js&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/beat-journey.vm&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/beat-plan-day-view.vm&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/beat-plan-window.vm&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/beat-report-data.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37248</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37248</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%2Fdao%2Frepository%2Ffofo%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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37136</guid></item>
<item><pubDate>Tue, 14 Jul 2026 15:07:47 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37089 – Optimize partnerPerformance data access: fofoId-scoped + month-bucketed query variants  ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 13 file(s) modified&lt;/strong&gt;&lt;br/&gt;Optimize partnerPerformance data access: fofoId-scoped + month-bucketed query variants&lt;br /&gt;
&lt;br /&gt;
- Order: fofoId-scoped billing-avg named queries (replace all-partner scan+filter)&lt;br /&gt;
- MonthlyTarget: selectByDatesAndFofoId batches 7 per-month lookups into one&lt;br /&gt;
- SchemeInOut/OfferPayout: month-bucketed ...ByMonth earnings queries collapsing the&lt;br /&gt;
  per-month loop; new MonthlyBrandIncomeModel / MonthlyOfferPayoutModel&lt;br /&gt;
All additive; existing shared queries and their callers unchanged.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/OfferPayout.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/SchemeInOut.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/model/MonthlyBrandIncomeModel.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/MonthlyOfferPayoutModel.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/MonthlyTargetRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/MonthlyTargetRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/OfferPayoutRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/OfferPayoutRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/SchemeInOutRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/SchemeInOutRepositoryImpl.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;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37089</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37089</guid></item>
<item><pubDate>Fri, 10 Jul 2026 13:41:13 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37055 – allocation of hid and opening stock suggested qty logic updated ...</title><description>&lt;div&gt;&lt;strong&gt;ranu – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;allocation of hid and opening stock suggested qty logic updated as per tarun sir&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/FofoOpeningStock.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOpeningStockRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/IndentController.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37055</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=37055</guid></item>
<item><pubDate>Wed, 01 Jul 2026 14:57:41 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 36981 – changeList</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;changeList&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/MonthlyTargetRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36981</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36981</guid></item>
<item><pubDate>Wed, 01 Jul 2026 14:57:32 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 36980 – optimize bi report</title><description>&lt;div&gt;&lt;strong&gt;ranu – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;optimize bi report&lt;/div&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ScheduledTasksTest.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/MonthlyTargetRepository.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36980</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36980</guid></item>
<item><pubDate>Wed, 01 Jul 2026 12:34:04 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 36972 – changeList</title><description>&lt;div&gt;&lt;strong&gt;ranu – 20 file(s) modified&lt;/strong&gt;&lt;br/&gt;changeList&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ActivatedImei.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/LoanStatement.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/entity/transaction/ReturnOrderInfo.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/UserWalletHistory.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/BrandWiseModel.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/cs/CsService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/cs/CsServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ActivatedImeiRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ActivatedImeiRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOrderItemRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOrderItemRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/LoanStatementRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/LoanStatementRepositoryImpl.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/dao/repository/transaction/ReturnOrderInfoRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/ReturnOrderInfoRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/UserWalletHistoryRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/UserWalletHistoryRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36972</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36972</guid></item>
<item><pubDate>Tue, 30 Jun 2026 17:42:20 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36967 – Add date-range query methods for approved HID allocations (filter by ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;Add date-range query methods for approved HID allocations (filter by approval date)&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/RequestedHidAllocationRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/RequestedHidAllocationRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36967</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36967</guid></item>
<item><pubDate>Wed, 24 Jun 2026 18:01:37 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36920 – Remove unused Digify retailer integration (controllers, entity, repository, model, views, ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;Remove unused Digify retailer integration (controllers, entity, repository, model, views, JS handler, assets)&lt;/div&gt;x /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/DigifyRetailer.java&lt;br /&gt;x /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/DigifyRetailerRepository.java&lt;br /&gt;x /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/DigifyRetailerRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36920</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36920</guid></item>
<item><pubDate>Mon, 22 Jun 2026 19:29:59 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36901 – HID requested-allocations: fully batch HID computation (batched tier + SUM(current_qty) ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 5 file(s) modified&lt;/strong&gt;&lt;br/&gt;HID requested-allocations: fully batch HID computation (batched tier + SUM(current_qty) + 2-day sales per pair, replacing per-partner query) and add Pending list pagination&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/FofoOpeningStock.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOpeningStockRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOpeningStockRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/RequestedHidAllocationRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/RequestedHidAllocationRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36901</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36901</guid></item>
<item><pubDate>Mon, 22 Jun 2026 18:16:25 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36898 – HID allocation: batch the requested-allocations screen (catalog-filtered HID query + ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 9 file(s) modified&lt;/strong&gt;&lt;br/&gt;HID allocation: batch the requested-allocations screen (catalog-filtered HID query + batched billed/activated serial lookups) and add approved-list pagination (50/page) reusing GenericRepository paginated+count helpers&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/FofoOpeningStock.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOpeningStockRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOpeningStockRepositoryImpl.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/RequestedHidAllocationRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/RequestedHidAllocationRepositoryImpl.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;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36898</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36898</guid></item>
<item><pubDate>Mon, 22 Jun 2026 15:00:50 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36894 – HID allocation: requested qty is now an additional one-time allowance ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 7 file(s) modified&lt;/strong&gt;&lt;br/&gt;HID allocation: requested qty is now an additional one-time allowance (purchase-limit override, HID target unchanged); add approved_by column; add 5-day billed/activated serial lookups for the edit screen&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/RequestedHidAllocation.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoOpeningStockRepositoryImpl.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/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/resources/sql/migration_requested_hid_allocation_approved_by.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36894</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36894</guid></item>
<item><pubDate>Wed, 27 May 2026 17:23:27 +0530</pubDate><dc:creator>aman</dc:creator><title>Rev 36708 – Fix:Credit note report fix</title><description>&lt;div&gt;&lt;strong&gt;aman – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix:Credit note report fix&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/InventoryItemRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ReportsController.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36708</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36708</guid></item>
<item><pubDate>Tue, 26 May 2026 13:00:31 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36679 – Filter focused model shortage report by brands partner stocked in ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 4 file(s) modified&lt;/strong&gt;&lt;br/&gt;Filter focused model shortage report by brands partner stocked in past 30 days&lt;/div&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/ScanRecordRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/ScanRecordRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36679</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36679</guid></item>
<item><pubDate>Sat, 23 May 2026 12:57:00 +0530</pubDate><dc:creator>vikas</dc:creator><title>Rev 36649 – Reverted deleted files</title><description>&lt;div&gt;&lt;strong&gt;vikas – 4 file(s) modified&lt;/strong&gt;&lt;br/&gt;Reverted deleted files&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/UpSaleAgentCollection.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/UpsellCallDetail.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/UpsellRazorpayPaymentStatus.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/UpsellRazorpayPaymentStatusRepository.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36649</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36649</guid></item>
<item><pubDate>Sat, 23 May 2026 12:28:59 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 36646 – delete commit</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;delete commit&lt;/div&gt;x /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/UpsellRazorpayPaymentStatusRepository.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36646</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36646</guid></item>
<item><pubDate>Sun, 10 May 2026 02:06:27 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 36508 – code committed for scheme and offers earning for v2</title><description>&lt;div&gt;&lt;strong&gt;ranu – 8 file(s) modified&lt;/strong&gt;&lt;br/&gt;code committed for scheme and offers earning for v2&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/OfferPayout.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/SchemeInOut.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/OfferPayoutRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/OfferPayoutRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/SchemeInOutRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/SchemeInOutRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/V2FofoSchemeController.java&lt;br /&gt;+ /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/V2SchemeController.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36508</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36508</guid></item>
<item><pubDate>Mon, 04 May 2026 19:38:09 +0530</pubDate><dc:creator>vikas</dc:creator><title>Rev 36471 – V2 Profile Update APIs</title><description>&lt;div&gt;&lt;strong&gt;vikas – 9 file(s) modified&lt;/strong&gt;&lt;br/&gt;V2 Profile Update APIs&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/FofoPartnerDocument.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/FranchiseeBankAccount.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoPartnerDocumentRepository.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/FofoPartnerDocumentRepositoryImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/FranchiseeBankAccountService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/FranchiseeBankAccountServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/V2FofoBankAccountController.java&lt;br /&gt;+ /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/V2FofoPartnerDocumentController.java&lt;br /&gt;+ /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/V2FofoProfileUpdateController.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36471</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36471</guid></item>
<item><pubDate>Mon, 27 Apr 2026 19:54:23 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36407 – Sale-return reversal: cancellability gate, CN on approve, INV reject, ROI ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 6 file(s) modified&lt;/strong&gt;&lt;br/&gt;Sale-return reversal: cancellability gate, CN on approve, INV reject, ROI semantics&lt;br /&gt;
&lt;br /&gt;
GstProService.isIrnCancellable(invoiceNumber): predicate extracted from&lt;br /&gt;
the inline 24h check used in cancelInvoiceGst, so callers outside the&lt;br /&gt;
service can decide branching without duplicating the rule. DC and no-IRN&lt;br /&gt;
cases return false — those paths use EWB cancel / credit-note issuance.&lt;br /&gt;
&lt;br /&gt;
PurchaseReturnServiceImpl: split single-phase return-receive into&lt;br /&gt;
submitReceiptForApproval + applyReceipt. Submit persists per-item return&lt;br /&gt;
type on PurchaseReturnItem so apply (called inline on auto-approve, or&lt;br /&gt;
later from refundOrder when finance clicks Process Refund) can replay&lt;br /&gt;
the scan loop without the original itemReturnTypes map.&lt;br /&gt;
&lt;br /&gt;
processInvoiceReturn(autoApprove=true) no longer creates a PRO. Routes&lt;br /&gt;
through new cancelInvoiceFully which calls gstProService.cancelInvoiceGst&lt;br /&gt;
(the canonical IRN-cancel path setting Order.status=INVOICE_CANCELLED)&lt;br /&gt;
and adds wallet credit + warehouse-stock restoration. Cancellations now&lt;br /&gt;
live on Order/EInvoiceDetails screens, not in the returns ledger —&lt;br /&gt;
matches standard ERP practice and the existing cancelInvoiceGst flow.&lt;br /&gt;
&lt;br /&gt;
processInvoiceReturn(autoApprove=false) creates an INV-prefix PRO in&lt;br /&gt;
pending state and calls notifyFinanceApprovalPending (Finance L1+L2&lt;br /&gt;
emails resolved dynamically from PositionRepository).&lt;br /&gt;
&lt;br /&gt;
approveInvoiceReturn now runs applyInvoiceReturnViaCreditNote — raises&lt;br /&gt;
local CreditNote + CreditNoteLine rows (sequential CN# from&lt;br /&gt;
SellerWarehouse), issues CRN at GST via generateCreditNoteIrn, restores&lt;br /&gt;
warehouse stock, populates ReturnOrderInfo (this path IS a customer&lt;br /&gt;
return without DN — ROI is the right anchor), credits wallet. Drops the&lt;br /&gt;
old applyInvoiceReturnEffects helper which mishandled both cancel and&lt;br /&gt;
return-via-CN as the same path.&lt;br /&gt;
&lt;br /&gt;
rejectInvoiceReturn: new method for finance to reject pending INV PROs.&lt;br /&gt;
Sale stands — only stamps reject_timestamp/reject_remark. No inventory,&lt;br /&gt;
no wallet, no GST action, no ROI. Closes the gap where finance had&lt;br /&gt;
Approve as the only option on a pending INV PRO.&lt;br /&gt;
&lt;br /&gt;
refundOrder gains a refund guard (PRO must exist, not refunded, not&lt;br /&gt;
rejected) and applyReceipt-if-needed at the top — Finance&apos;s existing&lt;br /&gt;
Process Refund button now drives approve+refund atomically.&lt;br /&gt;
&lt;br /&gt;
PurchaseReturnOrderRepository.selectByWarehouseIdsAndDateRange: Hibernate&lt;br /&gt;
query for a date-range listing on /return/invoice (default last 30&lt;br /&gt;
days, limit 200).&lt;br /&gt;
&lt;br /&gt;
@Transactional(rollbackFor=Exception.class) at class level —&lt;br /&gt;
ProfitMandiBusinessException is checked, so Spring&apos;s default rollback&lt;br /&gt;
didn&apos;t fire on guard failures, allowing partial commits. Closing that&lt;br /&gt;
silently broken behaviour.&lt;br /&gt;
&lt;br /&gt;
LineItemImei N+1 fix: receiveDebitNoteItems / refundOrder / rejectReturn&lt;br /&gt;
each iterated orders calling selectByLineItemId per row. Switched to the&lt;br /&gt;
existing batch selectByLineItemIds(List).&lt;br /&gt;
&lt;br /&gt;
Email template finance-receipt-approval-pending.vm and SQL migration&lt;br /&gt;
migration_imei_net_margin_modal_api.sql added (registers the&lt;br /&gt;
/getImeiNetMarginModal endpoint in dtr.api and grants access to the&lt;br /&gt;
roles that currently access /order).&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PurchaseReturnOrderRepository.java&lt;br /&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/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/finance-receipt-approval-pending.vm&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/migration_imei_net_margin_modal_api.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36407</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36407</guid></item>
<item><pubDate>Mon, 27 Apr 2026 17:41:14 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36405 – Fix duplicate SchemeInOut on concurrent GRN: SELECT FOR UPDATE on ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix duplicate SchemeInOut on concurrent GRN: SELECT FOR UPDATE on inventory_item before createSchemeInOut to serialise concurrent GRN calls per IMEI&lt;/div&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/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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36405</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36405</guid></item>
<item><pubDate>Mon, 27 Apr 2026 14:38:57 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36397 – Scheme item windowing: add startDate/endDate per scheme_item.  Each fofo.scheme_item ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 7 file(s) modified&lt;/strong&gt;&lt;br/&gt;Scheme item windowing: add startDate/endDate per scheme_item.&lt;br /&gt;
&lt;br /&gt;
Each fofo.scheme_item row now carries an optional [start_date, end_date]&lt;br /&gt;
window so the same (scheme_id, catalog_id) pair can be applicable for&lt;br /&gt;
different date ranges. Backward compatible: NULL window = always active.&lt;br /&gt;
&lt;br /&gt;
- SchemeItem entity: composite (schemeId, catalogId) PK -&gt; surrogate&lt;br /&gt;
  long id (IDENTITY), unique (catalog_id, scheme_id, start_date, end_date),&lt;br /&gt;
  audit cols (updatedBy, updatedOn).&lt;br /&gt;
- Scheme + TagListing named queries: gated by&lt;br /&gt;
  &apos;(si.start_date is null or :onDate between si.start_date and si.end_date)&apos;.&lt;br /&gt;
- SchemeItemRepository: + selectById, selectBySchemeId,&lt;br /&gt;
  existsOverlapping (half-open, with self-exclude), selectItemsOutsideWindow.&lt;br /&gt;
- SchemeService: + updateSchemeItemWindow / addSchemeItemWithDates /&lt;br /&gt;
  clampSchemeItems with containment + overlap validation; drop dead&lt;br /&gt;
  getTotalMargin.&lt;br /&gt;
- SchemeServiceImpl.processSchemeOut: pin scheme resolution to each&lt;br /&gt;
  IMEI&apos;s GRN billing date (Purchase -&gt; Order.billingTimestamp via&lt;br /&gt;
  PurchaseService.getBillingDateOfPurchase) instead of fofoOrder&lt;br /&gt;
  createTimestamp, aligning OUT with the existing IN behaviour.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/catalog/Scheme.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/entity/fofo/SchemeItem.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/SchemeItemRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/SchemeItemRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/scheme/SchemeService.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36397</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36397</guid></item>
<item><pubDate>Wed, 22 Apr 2026 17:16:50 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 36356 – rbm rating dashboard view commited</title><description>&lt;div&gt;&lt;strong&gt;ranu – 4 file(s) modified&lt;/strong&gt;&lt;br/&gt;rbm rating dashboard view commited&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/RbmRating.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/RbmRatingRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/RbmRatingRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/monitors/MonitorController.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36356</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36356</guid></item>
<item><pubDate>Wed, 22 Apr 2026 11:46:23 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 36336 – sales dispostion updated</title><description>&lt;div&gt;&lt;strong&gt;ranu – 7 file(s) modified&lt;/strong&gt;&lt;br/&gt;sales dispostion updated&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/RbmRating.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/SalesRating.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/RbmRatingRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/RbmRatingRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/SalesRatingRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/SalesRatingRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/LeadController.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36336</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36336</guid></item>
<item><pubDate>Mon, 20 Apr 2026 19:00:06 +0530</pubDate><dc:creator>aman</dc:creator><title>Rev 36316 – Fix:Migrate legacy Purchase Return flow (Report + Bulk Create + ...</title><description>&lt;div&gt;&lt;strong&gt;aman – 9 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix:Migrate legacy Purchase Return flow (Report + Bulk Create + Debit Notes) into FOFO&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/warehouse/DebitNoteType.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/PurchaseReturnOrderRepository.java&lt;br /&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/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/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/webapp/resources/js/business/return.js&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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36316</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36316</guid></item>
<item><pubDate>Fri, 17 Apr 2026 13:16:51 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36291 – Optimize slow DB queries: split fan-out join, FORCE INDEX on ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;Optimize slow DB queries: split fan-out join, FORCE INDEX on wallet history&lt;br /&gt;
&lt;br /&gt;
- CurrentInventorySnapshotRepositoryImpl.getSpilitStockBatch: split&lt;br /&gt;
  LEFT-JOIN fan-out into two independent aggregates (~8x faster);&lt;br /&gt;
  fixes SUM(DISTINCT) undercounting bug where same availability/qty&lt;br /&gt;
  values across items collapsed into one.&lt;br /&gt;
- UserWalletRepositoryImpl.getWarehousewiseCollection: HQL -&gt; native&lt;br /&gt;
  SQL with FORCE INDEX(idx_uwh_wallet_timestamp) so timestamp range&lt;br /&gt;
  filters at index level instead of row filter (~4x faster, 3.1s -&gt; 722ms).&lt;br /&gt;
- PartnerCollectionPlanRepositoryImpl.getCommitmentCollectionSummary:&lt;br /&gt;
  Criteria 3-Root CROSS JOIN -&gt; explicit INNER JOIN + FORCE INDEX&lt;br /&gt;
  (idx_uwh_wallet_timestamp) (~3.5x faster).&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/auth/PartnerCollectionPlanRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/fofo/CurrentInventorySnapshotRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/UserWalletRepositoryImpl.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%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36291</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fdao%2Frepository%2Ffofo%2F&amp;isdir=1&amp;rev=36291</guid></item>
</channel></rss>