<?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/warehouse/InvoiceService.java</title><description>WebSVN RSS feed &#x2013; SmartDukaan</description><lastBuildDate>Thu, 14 May 2026 08:45:26 +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%2Fwarehouse%2FInvoiceService.java&amp;max=40&amp;</link><atom:link href="https://svn.smartdukaan.com/rss.php?path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Fwarehouse%2FInvoiceService.java&amp;repname=SmartDukaan" rel="self" type="application/rss+xml" />
<item><pubDate>Mon, 09 Feb 2026 23:56:47 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 35716 – Refactor GrnController and PurchaseOrderController: extract business logic into focused services ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 10 file(s) modified&lt;/strong&gt;&lt;br/&gt;Refactor GrnController and PurchaseOrderController: extract business logic into focused services and fix N+1 query performance issues&lt;br /&gt;
&lt;br /&gt;
- Create InvoiceService: invoice item CRUD, validation, vendor price matching&lt;br /&gt;
- Create GrnRequestService: GRN request lifecycle, mismatch resolution state machine&lt;br /&gt;
- Create DebitNoteService: debit note generation, PDF model building&lt;br /&gt;
- Move PO amendment logic from PurchaseOrderController to PurchaseOrderService&lt;br /&gt;
- Delegate generateDebitNote from PurchaseOrderServiceImpl to DebitNoteService&lt;br /&gt;
- Thin GrnController from ~1215 to ~717 lines, remove 15 unused autowired dependencies&lt;br /&gt;
- Thin PurchaseOrderController editPurchaseOrder from 40+ lines to 3 lines&lt;br /&gt;
&lt;br /&gt;
Performance fixes:&lt;br /&gt;
- InvoiceServiceImpl.validateInvoiceDetail: batch item/vendor pricing/GST loading (4N+3 queries -&gt; ~5)&lt;br /&gt;
- DebitNoteServiceImpl: batch item loading in buildDebitNotePdfModel and generateDebitNote&lt;br /&gt;
- GrnController.generateDebitNote: eliminate 2 redundant DB fetches&lt;br /&gt;
- Replace 3x supplierRepository.selectAll() with targeted selectBySupplierIds()&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/DebitNoteService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/DebitNoteServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/GrnRequestService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/GrnRequestServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/InvoiceService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/InvoiceServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/PurchaseOrderService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/PurchaseOrderServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/warehouse/GrnController.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/warehouse/PurchaseOrderController.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%2Fwarehouse%2FInvoiceService.java&amp;rev=35716</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fjava%2Fcom%2Fspice%2Fprofitmandi%2Fservice%2Fwarehouse%2FInvoiceService.java&amp;rev=35716</guid></item>
</channel></rss>