<?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/resources/sql/add_po_reopened_at_20260918.sql</title><description>WebSVN RSS feed &#x2013; SmartDukaan</description><lastBuildDate>Wed, 07 Oct 2026 16:57:32 +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%2Fresources%2Fsql%2Fadd_po_reopened_at_20260918.sql&amp;max=40&amp;</link><atom:link href="https://svn.smartdukaan.com/rss.php?path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fresources%2Fsql%2Fadd_po_reopened_at_20260918.sql&amp;repname=SmartDukaan" rel="self" type="application/rss+xml" />
<item><pubDate>Fri, 18 Sep 2026 04:26:13 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37708 – Migration: state the algorithm and lock mode, and why it ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Migration: state the algorithm and lock mode, and why it runs before the release&lt;br /&gt;
&lt;br /&gt;
hadb1 is MySQL 5.7, so adding a column rebuilds the table rather than only touching metadata.&lt;br /&gt;
At ~53k rows that is seconds and InnoDB permits concurrent reads and writes throughout, but&lt;br /&gt;
ALGORITHM/LOCK are now stated explicitly so it fails loudly rather than quietly taking a table&lt;br /&gt;
lock if that ever stops holding.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/resources/sql/add_po_reopened_at_20260918.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fresources%2Fsql%2Fadd_po_reopened_at_20260918.sql&amp;rev=37708</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fresources%2Fsql%2Fadd_po_reopened_at_20260918.sql&amp;rev=37708</guid></item>
<item><pubDate>Fri, 18 Sep 2026 04:18:12 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37704 – Reopen a movement PO whose stock arrived late, and stop ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 8 file(s) modified&lt;/strong&gt;&lt;br/&gt;Reopen a movement PO whose stock arrived late, and stop stranding GRN price corrections&lt;br /&gt;
&lt;br /&gt;
Internal movements auto-close after four days, which fits 99.6% of them - 5,491 of 5,515 receipts&lt;br /&gt;
land inside the window. The remainder leave the PO closed with the stock still in transit and&lt;br /&gt;
nowhere to receive it: 998 internal POs closed during 2026 still holding 21,996 unreceived units.&lt;br /&gt;
&lt;br /&gt;
A closed movement PO can now be reopened from the purchase order list. Reopening stamps&lt;br /&gt;
reopenedAt, and auto-close measures from WarehousePurchaseOrder.getOpenSince() - reopenedAt when&lt;br /&gt;
set, the PO date otherwise - so a reopened PO gets the same fresh window a new one gets instead of&lt;br /&gt;
being closed straight back on the next sweep. Only movements between our own warehouses: an&lt;br /&gt;
external vendor PO that has closed is settled with that vendor, not reopened unilaterally.&lt;br /&gt;
&lt;br /&gt;
Separately, a GRN price correction now checks that the PO it just raised is one the invoice can&lt;br /&gt;
actually be received against. Matching reads POs that are open and approved for the same supplier&lt;br /&gt;
and warehouse dated on or before the invoice; it never looks at the PO being corrected, so what&lt;br /&gt;
matters is that the new PO is receivable. 54 were not - backdated into INIT by the old approval&lt;br /&gt;
gate, hence outside the match - and each stranded silently: original line discarded, GRN completed&lt;br /&gt;
without it, the correction left holding a reservation for stock that had already arrived.&lt;br /&gt;
&lt;br /&gt;
isOpen() names the open set - INIT, READY, PARTIALLY_FULFILLED - that the movement and commitment&lt;br /&gt;
queries already read.&lt;br /&gt;
&lt;br /&gt;
Migration sql/add_po_reopened_at_20260918.sql adds reopenedAt, nullable and additive. It must run&lt;br /&gt;
before this ships: the entity maps the column.&lt;/div&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/purchaseorder/POScheduler.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/warehouse/WarehousePurchaseOrder.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/resources/sql/add_po_reopened_at_20260918.sql&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/warehouse/PurchaseOrderController.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/resources/js/warehouse-purchase.js&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/warehouse-purchase-order.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fresources%2Fsql%2Fadd_po_reopened_at_20260918.sql&amp;rev=37704</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F%2Ftrunk%2Fprofitmandi-dao%2Fsrc%2Fmain%2Fresources%2Fsql%2Fadd_po_reopened_at_20260918.sql&amp;rev=37704</guid></item>
</channel></rss>