<?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>Tue, 21 Jul 2026 02:45:14 +0530</lastBuildDate><generator>WebSVN 2.8.6-DEV</generator><language>en</language><link>https://svn.smartdukaan.com/log.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;max=40&amp;</link><atom:link href="https://svn.smartdukaan.com/rss.php?isdir=1&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;repname=SmartDukaan" rel="self" type="application/rss+xml" />
<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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%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=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36429</guid></item>
<item><pubDate>Wed, 29 Apr 2026 14:38:13 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36427 – rejectReturn: simplify to cancel-the-request semantics  After the receive/refund refactor, ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;rejectReturn: simplify to cancel-the-request semantics&lt;br /&gt;
&lt;br /&gt;
After the receive/refund refactor, applyReceipt — and therefore every&lt;br /&gt;
warehouse-side effect (SALE_RET scans, WarehouseInventoryItem.addQuantity,&lt;br /&gt;
InventoryItem.returnTimestamp, ReturnOrderInfo, Order.status flip,&lt;br /&gt;
lineItem.returnQty) — only runs from refundOrder (or its inline&lt;br /&gt;
auto-approve sibling in submitReceiptForApproval). Both paths set&lt;br /&gt;
pro.refundTimestamp in the same transaction, all-or-nothing under&lt;br /&gt;
@Transactional(rollbackFor=Exception.class).&lt;br /&gt;
&lt;br /&gt;
The refund_timestamp guard at the top of rejectReturn blocks rejection&lt;br /&gt;
once any of that has fired, which means rejectReturn is now ONLY&lt;br /&gt;
callable on a pending PRO — a state where applyReceipt has never run&lt;br /&gt;
and there is nothing on the warehouse side to undo.&lt;br /&gt;
&lt;br /&gt;
The pre-existing reversal pipeline (warehouse-scan -1 reversal scans,&lt;br /&gt;
ReturnOrderInfo update/create-with-REJECTED, Order.status flip back to&lt;br /&gt;
DELIVERY_SUCCESS, lineItem.returnQty decrement) was therefore operating&lt;br /&gt;
against state that doesn&apos;t exist:&lt;br /&gt;
  - lastScanType is SALE (from original sale), not SALE_RET, so&lt;br /&gt;
    addQuantity(-1) gate correctly skipped — but the unconditional&lt;br /&gt;
    persist of WarehouseScan(qty=-1, type=SALE_RET) was creating&lt;br /&gt;
    fake reversal rows for receipts that never happened.&lt;br /&gt;
  - selectByOrderId for ReturnOrderInfo always returned empty&lt;br /&gt;
    (refundOrder is the only writer), and the no-rows branch was&lt;br /&gt;
    fabricating REJECTED ROI rows for returns that were never received.&lt;br /&gt;
  - Order.status was never flipped to COMPLETE_RETURN, so the&lt;br /&gt;
    DELIVERY_SUCCESS reversal block correctly skipped — pure dead&lt;br /&gt;
    branch.&lt;br /&gt;
&lt;br /&gt;
Strip all of it. rejectReturn is now: guards (refund/reject timestamps),&lt;br /&gt;
stamp PRO with reject_timestamp/remark/updatedBy, restoreReturnedItems&lt;br /&gt;
to undo the partner-side effects from generateDebitNote(), mark items&lt;br /&gt;
REJECTED so a fresh re-request is possible.&lt;br /&gt;
&lt;br /&gt;
This also undoes the previous fix #5 (extending the warehouse-scan&lt;br /&gt;
reversal to non-serialized) — that fix was making things worse by&lt;br /&gt;
creating fake reversal rows for both serialized and non-serialized&lt;br /&gt;
items instead of just serialized. The right answer was to delete the&lt;br /&gt;
whole block, not extend it.&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=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36427</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36427</guid></item>
<item><pubDate>Wed, 29 Apr 2026 13:52:16 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36425 – Sale-return reversal: idempotency guards + CN failure rolls back + ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Sale-return reversal: idempotency guards + CN failure rolls back + non-serialized reject reversal&lt;br /&gt;
&lt;br /&gt;
rejectReturn (#1): add refundTimestamp / rejectTimestamp guards. Without&lt;br /&gt;
them a stale-tab click or retry could re-run the full reversal pipeline&lt;br /&gt;
on an already-refunded DN — reversing scans twice, re-running&lt;br /&gt;
restoreReturnedItems (re-credits scheme amounts to wallet on top of the&lt;br /&gt;
refund that already paid out), and stamping rejectTimestamp on top of&lt;br /&gt;
refundTimestamp. Mirrors refundOrder&apos;s existing guard pair.&lt;br /&gt;
&lt;br /&gt;
refundOrder CN block (#2): replace the swallow-and-log with a re-throw&lt;br /&gt;
on IRN failure. With class-level @Transactional(rollbackFor=Exception),&lt;br /&gt;
the prior catch caused commits of an advanced sellerWarehouse sequence&lt;br /&gt;
+ orphan CreditNote / CreditNoteLine rows whenever the NIC IRN call&lt;br /&gt;
failed. Restructured as straight-through; IRN failure now rolls the&lt;br /&gt;
whole refundOrder transaction back so finance retries cleanly. Matches&lt;br /&gt;
the symmetric path in applyInvoiceReturnViaCreditNote.&lt;br /&gt;
&lt;br /&gt;
applyInvoiceReturnViaCreditNote (#3): stamp pro.refundTimestamp /&lt;br /&gt;
refundedBy / refundAmount unconditionally rather than gated on&lt;br /&gt;
totalRefundAmount &gt; 0. Defensive idempotency on the state machine: a&lt;br /&gt;
0-amount approve (corner case where the invoice&apos;s line items are already&lt;br /&gt;
fully returned via a sibling DN flow) used to leave the PRO in pending&lt;br /&gt;
state, allowing a second Approve click to issue a duplicate CN at NIC.&lt;br /&gt;
&lt;br /&gt;
rejectReturn non-serialized reversal (#5): the reversal loop was gated&lt;br /&gt;
on inventoryItem.serialNumber being non-blank, leaving non-serialized&lt;br /&gt;
GOOD items&apos; SALE_RET +1 increments un-reversed on rejection — phantom&lt;br /&gt;
warehouse stock. Now mirrors applyReceipt&apos;s nonSerialWhItemMap pattern&lt;br /&gt;
(orderId|itemId) and reverses both serialized and non-serialized.&lt;br /&gt;
Conservative addQuantity(-1) gate retained: only fires when lastScanType&lt;br /&gt;
== SALE_RET, matching the prior serialized behaviour.&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=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36425</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36425</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=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36407</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36407</guid></item>
<item><pubDate>Fri, 24 Apr 2026 18:31:25 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 36387 – code commit for reports section v2</title><description>&lt;div&gt;&lt;strong&gt;ranu – 4 file(s) modified&lt;/strong&gt;&lt;br/&gt;code commit for reports section v2&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/InventoryServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/V2FofoInventoryController.java&lt;br /&gt;~ /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/V2FofoReportsController.java&lt;br /&gt;~ /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/enumeration/PartnerReportType.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36387</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36387</guid></item>
<item><pubDate>Tue, 21 Apr 2026 16:34:45 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36331 – Fix @Cacheable name collision between getSaholicStockList variants  SaholicInventoryServiceImpl:271 and ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix @Cacheable name collision between getSaholicStockList variants&lt;br /&gt;
&lt;br /&gt;
SaholicInventoryServiceImpl:271 and :282 both used @Cacheable(value =&lt;br /&gt;
&apos;saholicCISList&apos;) on no-arg methods. Spring&apos;s default SimpleKey.EMPTY means&lt;br /&gt;
both methods shared ONE cache entry — whichever was called first poisoned the&lt;br /&gt;
cache for the other, even though they return different filtered sets:&lt;br /&gt;
&lt;br /&gt;
- getSaholicStockList (:272) runs selectWarehouseCisNew — tl.active=1 only&lt;br /&gt;
- getSaholicStockListWithoutCatalogMovingStatus (:283) runs&lt;br /&gt;
  selectWarehouseCisNewWithoutCatalogMovingStatus — includes catalog moving&lt;br /&gt;
  status join and filters out non-stocked OTHER/SLOWMOVING items&lt;br /&gt;
&lt;br /&gt;
Renamed the second cache to &apos;saholicCISListWithStatus&apos; so each method uses&lt;br /&gt;
its own namespace. Consumers of either method now get their method&apos;s actual&lt;br /&gt;
result, not a random earlier caller&apos;s.&lt;br /&gt;
&lt;br /&gt;
This is a correctness fix (wrong cached data) more than a perf fix, though&lt;br /&gt;
it does mean both caches fill independently now (tiny cold-path DB uptick,&lt;br /&gt;
already mitigated by 5-min TTL via timeoutCacheManager).&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/SaholicInventoryServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36331</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36331</guid></item>
<item><pubDate>Tue, 21 Apr 2026 13:35:46 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36327 – Fix currentinventorysnapshot/currentreservationsnapshot deadlock and optimize getFirstBillingDate  - SaholicInventoryServiceImpl: enforce ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 4 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix currentinventorysnapshot/currentreservationsnapshot deadlock and optimize getFirstBillingDate&lt;br /&gt;
&lt;br /&gt;
- SaholicInventoryServiceImpl: enforce reservation-snapshot → inventory-snapshot&lt;br /&gt;
  lock order in addReservationCount and reduceReservationCount via explicit&lt;br /&gt;
  session.flush(); eliminates the hadb1 deadlock recorded 2026-04-20 19:43:24&lt;br /&gt;
  between these two methods&apos; opposite-order writes.&lt;br /&gt;
- SaholicInventorySnapshot: add @DynamicUpdate so UPDATEs only rewrite the&lt;br /&gt;
  changed column instead of all three — cuts redo/binlog write amplification&lt;br /&gt;
  and makes deadlock dumps pinpoint the actual business path.&lt;br /&gt;
- TransactionRepositoryImpl.getFirstBillingDate: replace filesort-over-all-billed-&lt;br /&gt;
  orders with MIN(billingTimestamp) via new Order.selectFirstBillingByRetailer&lt;br /&gt;
  named query (Select tables optimized away). Preserves 2017-01-01 cutoff and&lt;br /&gt;
  null-for-unbilled-partner semantics.&lt;br /&gt;
- Add @Cacheable on redisOneDayCacheManager keyed by fofoId (unless null) so the&lt;br /&gt;
  8 call sites stop piling up identical SELECTs on the order table — this was&lt;br /&gt;
  the query pinning Hikari slots at 150-460s each in recent processlist dumps.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/inventory/SaholicInventorySnapshot.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/transaction/TransactionRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/SaholicInventoryServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36327</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36327</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=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36316</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36316</guid></item>
<item><pubDate>Tue, 14 Apr 2026 17:36:23 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36271 – Fix processInvoiceReturn skipping SALE_RET for non-serialized items  processInvoiceReturn was ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix processInvoiceReturn skipping SALE_RET for non-serialized items&lt;br /&gt;
&lt;br /&gt;
processInvoiceReturn was only creating warehouse.scanNew SALE_RET entries&lt;br /&gt;
for serialized items (looked up by serial number). Non-serialized items&lt;br /&gt;
like accessories were silently skipped, leaving warehouse inventory&lt;br /&gt;
unreturned.&lt;br /&gt;
&lt;br /&gt;
Fixed by working directly off SALE scans from warehouse.scanNew instead&lt;br /&gt;
of serial number lookup. This handles both serialized and non-serialized&lt;br /&gt;
items uniformly. Also uses actual sale quantity instead of hardcoded 1.&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=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36271</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36271</guid></item>
<item><pubDate>Thu, 02 Apr 2026 11:38:31 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36147 – Add original_invoice_number to credit_note for RETURNS type, increase PrecDocDtls cap ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 4 file(s) modified&lt;/strong&gt;&lt;br/&gt;Add original_invoice_number to credit_note for RETURNS type, increase PrecDocDtls cap to 10&lt;br /&gt;
&lt;br /&gt;
CreditNote entity: added originalInvoiceNumber field&lt;br /&gt;
PurchaseReturnServiceImpl: set originalInvoiceNumber on RETURNS CN&lt;br /&gt;
CreditNoteServiceImpl: increased invoice ref collection from 4 to 10&lt;br /&gt;
GstProService: increased PrecDocDtls limit from 4 to 10&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/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/CreditNoteServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36147</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36147</guid></item>
<item><pubDate>Wed, 01 Apr 2026 20:44:51 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36144 – Wire Credit Note on debit note refund — proper CN ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Wire Credit Note on debit note refund — proper CN numbering and persistence&lt;br /&gt;
&lt;br /&gt;
refundOrder(debitNoteId):&lt;br /&gt;
- Generate CN number via SellerWarehouse.creditNoteSequence (CN-{prefix}{seq})&lt;br /&gt;
- Persist CreditNote record (type=RETURNS) in transaction.credit_note&lt;br /&gt;
- Persist CreditNoteLine per returned item with tax rates from original order&lt;br /&gt;
- Generate CRN e-invoice IRN on NIC referencing original invoice&lt;br /&gt;
- Non-fatal: CN/IRN failure doesn&apos;t block the refund&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=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36144</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36144</guid></item>
<item><pubDate>Wed, 01 Apr 2026 20:36:30 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36143 – Wire Credit Note e-invoice generation on debit note refund  ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Wire Credit Note e-invoice generation on debit note refund&lt;br /&gt;
&lt;br /&gt;
refundOrder(debitNoteId):&lt;br /&gt;
- After wallet refund and status updates, generate CRN e-invoice on NIC&lt;br /&gt;
- Credit Note number: CN-{debitNoteNumber}&lt;br /&gt;
- References original transaction invoice via PrecDocDtls&lt;br /&gt;
- Non-fatal: CRN failure doesn&apos;t block the refund&lt;br /&gt;
- Supports multiple CRNs per invoice (partial returns over time)&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=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36143</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36143</guid></item>
<item><pubDate>Wed, 01 Apr 2026 20:04:17 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36142 – Prevent duplicate SALE_RET scans — fix double wallet refund bug ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Prevent duplicate SALE_RET scans — fix double wallet refund bug&lt;br /&gt;
&lt;br /&gt;
receiveDebitNoteItems():&lt;br /&gt;
- Build alreadyReturnedSet from existing SALE_RET/DOA_IN/SALE_RET_UNUSABLE scans&lt;br /&gt;
- Serialized: throw exception if IMEI already returned against same order&lt;br /&gt;
- Non-serialized: include existing return count in over-return check&lt;br /&gt;
&lt;br /&gt;
processInvoiceReturn():&lt;br /&gt;
- Same alreadyReturnedSet check — skip with warning if already returned&lt;br /&gt;
&lt;br /&gt;
Prevents the bug where same IMEI is returned, re-sold, then returned again&lt;br /&gt;
against the original order causing duplicate wallet refund.&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=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36142</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36142</guid></item>
<item><pubDate>Mon, 30 Mar 2026 19:34:45 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36103 – Add DN rejection with full reversal: restore inventory, schemes, price ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 28 file(s) modified&lt;/strong&gt;&lt;br/&gt;Add DN rejection with full reversal: restore inventory, schemes, price drops, offers; add deny reason to purchase return items; add purchase return notification service&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/PurchaseReturnItem.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/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/offers/OfferService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/OfferServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/pricing/PriceDropService.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/scheme/SchemeService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/scheme/SchemeServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/pt_osc_large_tables.sh&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V001__create_pinelabs_tables.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V002__cleanup_old_pinelabs_implementation.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V003__optimize_mobile_brand_queries.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V004__optimize_today_po_queries.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V005__optimize_lead_description_query.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V006__optimize_aging_stock_queries.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V007__add_source_to_partner_type_change.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V008__optimize_mobile_lmp_graph_query.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V009__add_margin_only_to_category.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V010__add_loan_fofo_id_index.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V011__add_prebooking_payment_mode.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V012__create_purchase_return_order.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V013__add_invoice_return_menu.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/db/migration/V014__add_deny_reason_to_purchase_return_item.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36103</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36103</guid></item>
<item><pubDate>Mon, 30 Mar 2026 18:34:22 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36102 – Fix IRN error 2189 for margin scheme invoices + handle ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix IRN error 2189 for margin scheme invoices + handle non-serialized debit note returns&lt;br /&gt;
&lt;br /&gt;
GstProService: Fix float precision drift in TotItemVal calculation for margin scheme items.&lt;br /&gt;
Use BigDecimal for OthChrg subtraction and set TotItemVal directly to sellingPrice&lt;br /&gt;
instead of re-adding float components. Fixes all RF- invoice IRN failures including&lt;br /&gt;
zero-margin internal orders.&lt;br /&gt;
&lt;br /&gt;
PurchaseReturnServiceImpl: Add non-serialized item handling in receiveDebitNoteItems&lt;br /&gt;
and refundOrder. Previously non-serialized items skipped warehouse scan creation,&lt;br /&gt;
quantity adjustment, order status update, and ReturnOrderInfo creation. Also pre-loads&lt;br /&gt;
items to avoid N+1 queries and unifies scan type determination for both paths.&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=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36102</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36102</guid></item>
<item><pubDate>Thu, 19 Mar 2026 19:52:46 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36026 – Sale Returns: approveInvoiceReturn for finance, auto-approve flow fixes (conditional refund ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;Sale Returns: approveInvoiceReturn for finance, auto-approve flow fixes (conditional refund fields)&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;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36026</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36026</guid></item>
<item><pubDate>Wed, 18 Mar 2026 19:24:08 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36021 – Sale Returns: processInvoiceReturn service for non-GRN&apos;d invoices with auto-approve logic</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;Sale Returns: processInvoiceReturn service for non-GRN&apos;d invoices with auto-approve logic&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;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36021</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36021</guid></item>
<item><pubDate>Tue, 17 Mar 2026 19:56:51 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 36009 – Fix duplicate IMEI handling in GRN and debit note return ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix duplicate IMEI handling in GRN and debit note return flows&lt;br /&gt;
&lt;br /&gt;
- Add duplicate serial number check in V2 GRN path (WarehouseServiceImpl.addInventoryItem)&lt;br /&gt;
  Rejects GRN if IMEI already exists with currentQuantity &gt; 0&lt;br /&gt;
- Harden serial→whItem lookup in receiveDebitNoteItems and rejectReturn&lt;br /&gt;
  Use composite key (serialNumber|itemId) instead of serialNumber alone&lt;br /&gt;
  Prevents wrong inventory item selection when same IMEI has multiple records&lt;br /&gt;
- Add orderId cross-validation in receiveDebitNoteItems for SALE scan mismatch detection&lt;br /&gt;
- Fix missing supplierWarehouseId on SALE_RET and reversal scans in debit note flows&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/WarehouseServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36009</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=36009</guid></item>
<item><pubDate>Sat, 14 Mar 2026 19:31:04 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 35997 – Invoice Return: PurchaseReturnOrder entity, ReturnAction DAO enum, receive/refund/reject service, ReturnOrderInfo ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 10 file(s) modified&lt;/strong&gt;&lt;br/&gt;Invoice Return: PurchaseReturnOrder entity, ReturnAction DAO enum, receive/refund/reject service, ReturnOrderInfo selectByOrderId&lt;/div&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/entity/transaction/ReturnOrderInfo.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/enumuration/fofo/ReturnAction.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/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/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/transaction/ReturnServiceImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=35997</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Finventory%2F&amp;isdir=1&amp;rev=35997</guid></item>
</channel></rss>