<?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; /</title><description>WebSVN RSS feed &#x2013; SmartDukaan</description><lastBuildDate>Tue, 15 Sep 2026 13:52:37 +0530</lastBuildDate><generator>WebSVN 2.8.6-DEV</generator><language>en</language><link>https://svn.smartdukaan.com/log.php?repname=SmartDukaan&amp;path=%2F&amp;max=40&amp;peg=37589</link><atom:link href="https://svn.smartdukaan.com/rss.php?peg=37589&amp;repname=SmartDukaan" rel="self" type="application/rss+xml" />
<item><pubDate>Fri, 11 Sep 2026 17:30:03 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37589 – Drive credit limits off the investment sweep; stop phantom limit ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;Drive credit limits off the investment sweep; stop phantom limit writes&lt;br /&gt;
&lt;br /&gt;
Adds the 2-minute sweep schedule and points the limit recalculation at the&lt;br /&gt;
partners whose base_value actually moved, instead of rescanning all 980 every&lt;br /&gt;
20 minutes. Measured on production: 3 partners change per 2-minute window on&lt;br /&gt;
average, peak 18.&lt;br /&gt;
&lt;br /&gt;
- ScheduledSkeleton: 2-min sweepPartnerInvestment, daily refreshAgedStockDaily&lt;br /&gt;
  at 00:20; the 20-min full pass is kept as a backstop for inputs base does not&lt;br /&gt;
  capture (risk, the SIDBI floor, hard_limit)&lt;br /&gt;
- BatchScheduledTasks.sweepPartnerInvestment: sweep, then limits for changed&lt;br /&gt;
  bases only&lt;br /&gt;
- calculateChangedPartnerLimits(restrictTo) to support that&lt;br /&gt;
- scaleMoney(): round to paise before comparing and storing. The limit comes out&lt;br /&gt;
  of a double multiply, so 65123.7400 round-tripped as 65123.740000000005 and&lt;br /&gt;
  compareTo called it a change. 208 of 230 &apos;changed&apos; partners in one production&lt;br /&gt;
  run differed by under half a paisa, rewriting sd_credit_requirement and&lt;br /&gt;
  dtr.credit_account ~14,000 times a day for identical values and churning the&lt;br /&gt;
  SIDBI mirror. Real changes were never below a rupee, so 2dp cannot suppress one.&lt;br /&gt;
- getFirstBillingDates: one grouped query instead of one per partner&lt;br /&gt;
&lt;br /&gt;
Credit limits for 24 partners will rise on the first sweep after deploy - that is&lt;br /&gt;
the aged-Apple double-deduction correction landing (see r37588), not a defect.&lt;br /&gt;
&lt;br /&gt;
NOTE: cron is a standalone Spring Boot jar; the new schedules only fire once it&lt;br /&gt;
is restarted with --spring.profiles.active=scheduled.&lt;/div&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/BatchScheduledTasks.java&lt;br /&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/PartnerLimitHelper.java&lt;br /&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ScheduledSkeleton.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37589&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37589&amp;peg=37589</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&amp;isdir=1&amp;rev=37588&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37588&amp;peg=37589</guid></item>
<item><pubDate>Fri, 11 Sep 2026 15:51:38 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37587 – ticket download option given and some enhancement on notification panel</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;ticket download option given and some enhancement on notification panel&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/model/WarehouseOpeningByMovementModel.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37587&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37587&amp;peg=37589</guid></item>
<item><pubDate>Fri, 11 Sep 2026 15:48:56 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37586 – drr view modification</title><description>&lt;div&gt;&lt;strong&gt;ranu – 5 file(s) modified&lt;/strong&gt;&lt;br/&gt;drr view modification&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/RbmTargetService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/RbmTargetServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/monitors/RbmDrrDashboardController.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/rbm-drr-dashboard.vm&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/retailer-details.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37586&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37586&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 17:19:06 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37585 – Fix web-offer sync: selectModelOffers join order (Unknown column &apos;o.id&apos; in ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Fix web-offer sync: selectModelOffers join order (Unknown column &apos;o.id&apos; in &apos;on clause&apos;)&lt;br /&gt;
&lt;br /&gt;
selectModelOffers led its FROM with offers.offer_product p and then joined&lt;br /&gt;
offers.offer_raw_row r ON r.offer_id = o.id, referencing alias o one join&lt;br /&gt;
before o was introduced. An ON clause resolves only against tables already&lt;br /&gt;
in the join order, so MySQL rejected it with SQLSyntaxErrorException:&lt;br /&gt;
Unknown column &apos;o.id&apos; in &apos;on clause&apos;. Every per-model sync since r37581 has&lt;br /&gt;
therefore failed - webOfferSync=FAILED on the 15:04 and 17:14 re-ingests of&lt;br /&gt;
document 4 - leaving the 166 legacy NULL-key row-badges active and zero&lt;br /&gt;
consolidated badges published.&lt;br /&gt;
&lt;br /&gt;
Reordered to lead with offers.offer o, matching the proven shape of the&lt;br /&gt;
sibling selectRowOffers query. All three are inner joins so the result set&lt;br /&gt;
is unchanged; BEST_OFFER_WINS and ORDER BY p.catalog_id still resolve.&lt;br /&gt;
&lt;br /&gt;
Verified by executing the corrected statement read-only against prod for&lt;br /&gt;
document 4: 733 rows over 314 distinct catalog ids, the expected model&lt;br /&gt;
count. Not caught by tests because all 53 offercircular tests are&lt;br /&gt;
stub-based (no Spring, no DB) and never execute this SQL.&lt;br /&gt;
&lt;br /&gt;
Failure was visible only because r37568 records webOfferSync= in&lt;br /&gt;
ingest_summary; the runner still swallows the exception by design.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/offers/WebOfferSyncRepositoryImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37585&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37585&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 15:24:07 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37584 – ticket download option given and some enhancement on notification panel</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;ticket download option given and some enhancement on notification panel&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/rbm-drr-dashboard.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37584&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37584&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 15:21:19 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37583 – ticket download option given and some enhancement on notification panel</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;ticket download option given and some enhancement on notification panel&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/rbm-drr-dashboard.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37583&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37583&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 15:13:31 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37582 – ticket download option given and some enhancement on notification panel</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;ticket download option given and some enhancement on notification panel&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/rbm-drr-dashboard.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37582&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37582&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 14:58:44 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37581 – web offer sync: retire the pre-consolidation badges instead of deleting ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer sync: retire the pre-consolidation badges instead of deleting them&lt;br /&gt;
&lt;br /&gt;
The sync now deactivates any CIRCULAR row with a NULL circular_offer_key on its next&lt;br /&gt;
run. A row-keyed badge is a fragment of what a consolidated badge says, so leaving it&lt;br /&gt;
active would show a partner the same offer twice - once whole and once in pieces.&lt;br /&gt;
&lt;br /&gt;
That removes the DELETE from the migration entirely, which is strictly better:&lt;br /&gt;
&lt;br /&gt;
  * nothing is destroyed, so a bad sync is one UPDATE away from being undone&lt;br /&gt;
  * web_offer_product has NO foreign key to web_offer, so the DELETE had to clear its&lt;br /&gt;
    532 rows separately or strand them as orphans&lt;br /&gt;
  * no window where a circular has no badges at all - the old ones stay live until the&lt;br /&gt;
    new ones exist&lt;br /&gt;
&lt;br /&gt;
The migration is now purely additive: one ALTER, safe to run ahead of the deploy, which&lt;br /&gt;
is how it was applied to prod.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/offers/WebOfferSyncRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/resources/sql/add_web_offer_per_model.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37581&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37581&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 14:55:17 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37580 – web offer: state an EMI scheme the circular gave without ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer: state an EMI scheme the circular gave without months&lt;br /&gt;
&lt;br /&gt;
  Rs.2,500 on Credit Card EMI (CIB) with IDFC First Bank, Kotak Mahindra Bank&lt;br /&gt;
&lt;br /&gt;
52 Sep&apos;26 offers have a bare &apos;CIB&apos; tenure cell - the circular names the EMI type and&lt;br /&gt;
gives no months. TenureParser correctly yields no tenure row for a cell with no digits,&lt;br /&gt;
so the type vanished and the badge said only &apos;on Credit Card EMI&apos;. Every one of those&lt;br /&gt;
52 carries a cashback, so it was 52 offers&apos; worth of SKUs silent about the EMI they&lt;br /&gt;
apply to.&lt;br /&gt;
&lt;br /&gt;
The type is stated because the circular stated it. The MONTHS are not invented,&lt;br /&gt;
because it did not give them - the same line the CIB expansion was left on.&lt;br /&gt;
&lt;br /&gt;
Read from offer_raw_row.col_emi_tenure rather than stored: &apos;scheme, no month&apos; is not a&lt;br /&gt;
tenure, and offer_tenure.tenure_months is NOT NULL, so persisting it would mean a fake&lt;br /&gt;
0 row standing for a fact that is not a tenure.&lt;br /&gt;
&lt;br /&gt;
Only ever attached to an EMI mode, and real tenures always win over the bare code.&lt;br /&gt;
&lt;br /&gt;
ModelOfferTest 8 -&gt; 11.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/offers/WebOfferSyncRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/WebOfferSyncService.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/ModelOfferTest.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37580&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37580&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 13:47:02 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37579 – web offer: one badge per model, consolidating everything the circular ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer: one badge per model, consolidating everything the circular grants it&lt;br /&gt;
&lt;br /&gt;
Edge 60 Pro 12+256 carried five badges - a Full Swipe cashback, an EMI cashback and&lt;br /&gt;
three EMI schemes - and the partner&apos;s card listed all five. It now carries one:&lt;br /&gt;
&lt;br /&gt;
  SEPTEMBER 2026 Motorola Cashback Offer-2,500 On Credit Card EMI&lt;br /&gt;
                                         &amp; 2,000 On Credit Card Full Swipe&lt;br /&gt;
&lt;br /&gt;
Models whose consolidated terms are IDENTICAL share a badge, so 314 models collapse to&lt;br /&gt;
~107 rows while every model still appears in exactly one.&lt;br /&gt;
&lt;br /&gt;
Rules, from the taxonomy: any model has cashback on Full Swipe and/or EMI, instant or&lt;br /&gt;
deferred, plus NCE/LCE/CIB with tenures, and any of it may differ per bank.&lt;br /&gt;
- &apos;Upto&apos; only where a mode carries several values - which is what per-bank pricing&lt;br /&gt;
  looks like. One value is stated plainly.&lt;br /&gt;
- Highest value first.&lt;br /&gt;
- Banks ride with each line only when they DIFFER; one shared set is hoisted to a&lt;br /&gt;
  single trailing &apos;Banks:&apos; line. A third of models need the per-line form.&lt;br /&gt;
- An amount whose window is narrower than the badge&apos;s states its own end date. Apple&lt;br /&gt;
  1025780 pays Rs.6,000 to the 16th then Rs.4,000 to the 26th; without this the badge&lt;br /&gt;
  would advertise Rs.6,000 for ten days it is not available.&lt;br /&gt;
&lt;br /&gt;
⚠️ Banks and tenures belong to the OFFER a line came from, never to the model. On Edge&lt;br /&gt;
60 Pro the no-cost EMI is ICICI on 3 and 6 months but SBI on 3 only, and the EMI&lt;br /&gt;
cashback is IDFC/Kotak with no tenure at all. Attaching the model&apos;s tenures to its&lt;br /&gt;
cashback would promise no-cost EMI on a bank that never offered it. This also corrects&lt;br /&gt;
an earlier reading of mine that called the SBI 3-month line a duplicate of ICICI&apos;s -&lt;br /&gt;
it is a different bank, not noise.&lt;br /&gt;
&lt;br /&gt;
New ModelOfferTest, 8 cases, every one taken from a real Sep&apos;26 row.&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/WebOfferSyncService.java&lt;br /&gt;+ /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/ModelOfferTest.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37579&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37579&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 13:46:45 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37578 – web offer sync: read what the circular grants each MODEL, ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer sync: read what the circular grants each MODEL, not each row&lt;br /&gt;
&lt;br /&gt;
selectModelOffers returns one row per (catalog_id, benefit), carrying the context that&lt;br /&gt;
qualifies it - the banks it applies to, its tenures and their scheme, the timing and&lt;br /&gt;
the window. Consolidation happens in the service; this is the read it needs.&lt;br /&gt;
&lt;br /&gt;
LEFT JOIN on the benefit, because a scheme-only offer carries no cashback and dropping&lt;br /&gt;
it here would lose the NCE/LCE badge entirely.&lt;br /&gt;
&lt;br /&gt;
Content-keyed writes alongside: selectSyncedByKey, insertKeyedWebOffer,&lt;br /&gt;
replaceProducts, deactivateMissingKeys. A badge is now identified by a sha256 of its&lt;br /&gt;
terms, so models with identical terms share one and a model appears in exactly one.&lt;br /&gt;
&lt;br /&gt;
Migration add_web_offer_per_model.sql adds circular_offer_key + its unique key, and&lt;br /&gt;
drops the row-keyed CIRCULAR badges - one of those is a fragment of what a&lt;br /&gt;
content-keyed badge says and there is no mapping from five fragments to one whole, so&lt;br /&gt;
they are regenerated by the next ingest.&lt;br /&gt;
&lt;br /&gt;
⚠️ web_offer_product has NO foreign key to web_offer, so its rows do not cascade and&lt;br /&gt;
are deleted explicitly or they are orphaned. web_offer_sync_shadow does cascade.&lt;br /&gt;
source=&apos;CIRCULAR&apos; only - the 3,850 hand-authored rows are never touched.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/offers/WebOfferSyncRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/offers/WebOfferSyncRepositoryImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/add_web_offer_per_model.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37578&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37578&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 13:17:50 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37577 – web offer: an EMI cashback names its tenures WITH their ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer: an EMI cashback names its tenures WITH their scheme&lt;br /&gt;
&lt;br /&gt;
  Rs.2,500 on Credit Card EMI (NCE 3, 6; LCE 9, 12 months)&lt;br /&gt;
&lt;br /&gt;
A bare &apos;3, 6, 9, 12 months&apos; says which tenures earn the cashback but not which of&lt;br /&gt;
them are no-cost - and at the counter the two facts are only useful together.&lt;br /&gt;
&lt;br /&gt;
The trailing scheme sentence is dropped when an EMI benefit already carried it, since&lt;br /&gt;
it would state the same thing twice. It stays when the cashback is on Full Swipe only:&lt;br /&gt;
EMI is still available, it just is not what the cashback is on.&lt;br /&gt;
&lt;br /&gt;
Tenures whose scheme the circular never gave keep their months but carry no label -&lt;br /&gt;
the months are real, the scheme would be invented.&lt;br /&gt;
&lt;br /&gt;
Tests 16 -&gt; 18.&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/WebOfferSyncService.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/WebOfferSyncServiceTest.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37577&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37577&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 13:02:55 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37576 – ticket download option given and some enhancement on notification panel</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;ticket download option given and some enhancement on notification panel&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/rbm-drr-dashboard.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37576&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37576&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 12:51:28 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37575 – ticket download option given and some enhancement on notification panel</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;ticket download option given and some enhancement on notification panel&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/rbm-drr-dashboard.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37575&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37575&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 12:45:42 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37574 – web offer: print the EMI scheme code, not a guessed ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer: print the EMI scheme code, not a guessed expansion&lt;br /&gt;
&lt;br /&gt;
NCE / LCE / CIB are industry standard and now appear verbatim:&lt;br /&gt;
&lt;br /&gt;
  Instant cashback. Rs.3,000 on Credit Card EMI (3, 6 months);&lt;br /&gt;
  Rs.3,000 on Credit Card Full Swipe. LCE on 3, 6 months. Banks: ...&lt;br /&gt;
&lt;br /&gt;
The expansions were not ours to invent. emi_scheme.display_name carries &apos;Cashback&lt;br /&gt;
Instant Benefit&apos; for CIB, and the evidence contradicts it: the Sep&apos;26 cell&lt;br /&gt;
&apos;3 NC 6,9,12 CIB&apos; puts CIB in ONE ladder with NCE, so it describes who bears the&lt;br /&gt;
interest on a tenure rather than how a cashback is delivered - and 53 of 55 CIB rows&lt;br /&gt;
carry a separate cashback amount anyway, which that expansion would make redundant.&lt;br /&gt;
Pine Labs&apos; own docs define ICB as Instant Cashback on UPI; the circular writes CIB 60&lt;br /&gt;
times and ICB never.&lt;br /&gt;
&lt;br /&gt;
A guessed expansion on a partner badge risks stating the opposite of the truth - for&lt;br /&gt;
CIB, advertising a benefit where the customer may in fact be bearing the interest.&lt;br /&gt;
The code cannot be wrong that way.&lt;br /&gt;
&lt;br /&gt;
A scheme is still stated ONLY when the circular gave one; tenures with no scheme are&lt;br /&gt;
described as nothing at all.&lt;br /&gt;
&lt;br /&gt;
Also fixes the singular: &apos;NCE on 3 month&apos;, not &apos;3 months&apos;.&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/WebOfferSyncService.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/WebOfferSyncServiceTest.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37574&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37574&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 12:45:13 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37573 – ui look and feel color changing mode for drr</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;ui look and feel color changing mode for drr&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/rbm-drr-dashboard.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37573&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37573&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 12:34:31 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37572 – web offer: state the whole offer in the title, and ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer: state the whole offer in the title, and the EMI scheme in the detail&lt;br /&gt;
&lt;br /&gt;
Title now states EVERY payment mode, highest first, in the house style of the&lt;br /&gt;
hand-written rows:&lt;br /&gt;
&lt;br /&gt;
  SEPTEMBER 2026 Samsung Cashback Offer-3000 On Credit Card Full Swipe&lt;br /&gt;
                                        &amp; 3000 On Credit Card EMI &amp; 3000 On UPI&lt;br /&gt;
&lt;br /&gt;
A partner scanning the card should see the whole offer, not just its best number.&lt;br /&gt;
Brand keeps its catalog casing (Samsung, not SAMSUNG). A scheme-only offer is still&lt;br /&gt;
titled by its scheme - calling it a cashback offer is what produced the live&lt;br /&gt;
&apos;Cashback Offer- NA&apos; badges.&lt;br /&gt;
&lt;br /&gt;
Detail additions:&lt;br /&gt;
- the EMI scheme, when the circular gave one: &apos;... Low Cost EMI on 3, 6 months.&apos;&lt;br /&gt;
  The circular states it in its own column (&apos;3m,6m LCE&apos; beside &apos;3000 CC Full&lt;br /&gt;
  Swipe/CC EMI/UPI&apos;) and a partner needs both halves.&lt;br /&gt;
- eligible tenures on an EMI benefit: &apos;Rs.3,000 on Credit Card EMI (3, 6 months)&apos;.&lt;br /&gt;
  Cashback &apos;on Credit Card EMI&apos; is not actionable without knowing which tenures&lt;br /&gt;
  qualify. Full Swipe and UPI carry no tenure, so they get none.&lt;br /&gt;
&lt;br /&gt;
⚠️ A scheme is stated ONLY when the circular gave one. Tenures with no scheme are&lt;br /&gt;
described as nothing at all - naming them would read as a no-cost or low-cost claim&lt;br /&gt;
that was never made.&lt;br /&gt;
&lt;br /&gt;
Tests 14 -&gt; 16.&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/WebOfferSyncService.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/WebOfferSyncServiceTest.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37572&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37572&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 12:34:19 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37571 – offer circular: the month unit was swallowing the EMI scheme ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;offer circular: the month unit was swallowing the EMI scheme marker&lt;br /&gt;
&lt;br /&gt;
&apos;M&apos; is the month UNIT, not a separator, but the token loop flushed on it. &apos;3m,6m LCE&apos;&lt;br /&gt;
tokenises to 3, M, 6, M, LCE - each M banked its month as NONE, so the LCE arrived&lt;br /&gt;
with nothing pending and was silently lost.&lt;br /&gt;
&lt;br /&gt;
74 Sep&apos;26 offers carry a scheme in the tenure cell that never reached offer_tenure;&lt;br /&gt;
22 of them through this path (&apos;3m,6m LCE&apos;, &apos;6m,9m LCE&apos;, &apos;3m &amp; 6m LCE&apos;, &apos;3m, 6m, 9m,&lt;br /&gt;
12m, 18m, 24m LCE&apos;). The rest are bare &apos;CIB&apos; cells with no months at all, which is a&lt;br /&gt;
separate case and left alone.&lt;br /&gt;
&lt;br /&gt;
It also fixes &apos;3M (NCE), 6M &amp; Above LCE&apos;, where the M flushed BOTH groups before&lt;br /&gt;
either marker was seen - so an offer that is no-cost on 3 months and low-cost beyond&lt;br /&gt;
recorded neither.&lt;br /&gt;
&lt;br /&gt;
This is money: no-cost EMI costs the customer nothing and low-cost does not, so a lost&lt;br /&gt;
marker is a term a partner could quote wrongly at the counter.&lt;br /&gt;
&lt;br /&gt;
Months with no marker anywhere still bank as NONE via the end-of-cell flush - the same&lt;br /&gt;
answer the M branch used to give for a genuinely unmarked cell.&lt;br /&gt;
&lt;br /&gt;
New TenureParserTest, 6 cases, covering the regression and the shapes that must not&lt;br /&gt;
change.&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/TenureParser.java&lt;br /&gt;+ /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/TenureParserTest.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37571&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37571&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 12:31:14 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37570 – drr view color change</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;drr view color change&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/rbm-drr-dashboard.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37570&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37570&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 12:05:44 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37569 – fcm: stop holding a row lock on the whole batch ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;fcm: stop holding a row lock on the whole batch across every FCM call&lt;br /&gt;
&lt;br /&gt;
sendNotification lived in ScheduledTasks, which carries a class-level @Transactional,&lt;br /&gt;
so one pass was one transaction: it loaded EVERY pending row uncapped, then per row&lt;br /&gt;
made an FCM call over the network and stamped sentTimestamp on the entity. A dirty&lt;br /&gt;
row stays write-locked until commit, so a run held a lock on every notification in&lt;br /&gt;
the batch for the SUM of all the remote waits. Volume is real -- 11,581 sent on&lt;br /&gt;
2026-09-09, 12,036 on 2026-09-05 -- and HttpClientFactory sets a 10s socket timeout,&lt;br /&gt;
so one bad run could hold thousands of locks for minutes.&lt;br /&gt;
&lt;br /&gt;
That is the shape behind a 33 SECOND average InnoDB row-lock wait server-wide&lt;br /&gt;
(Innodb_row_lock_time 63,291s over 15.4 days uptime, max 51,941ms against a 50s&lt;br /&gt;
innodb_lock_wait_timeout -- which is where LockAcquisitionException comes from).&lt;br /&gt;
&lt;br /&gt;
Moved to PushNotificationSendService using the same seam the invoicing pass already&lt;br /&gt;
uses in InvoiceService.updateIrnsToInvoices: one short read transaction to pick up&lt;br /&gt;
the batch and build the payloads, NO transaction across the network call, and one&lt;br /&gt;
REQUIRES_NEW transaction per row to record the outcome. No lock is held while waiting&lt;br /&gt;
on FCM.&lt;br /&gt;
&lt;br /&gt;
It is a separate bean, and reaches its own transactional methods through an injected&lt;br /&gt;
self-reference, because REQUIRES_NEW is applied by a Spring proxy and a plain&lt;br /&gt;
self-invocation would bypass it -- same idiom, for the same reason, as InvoiceService.&lt;br /&gt;
&lt;br /&gt;
Also caps the batch at 500/run (30,000/hour against a 12,000 peak day) using the&lt;br /&gt;
already-present but never-wired selectPendingNotifications(limit); the previous query&lt;br /&gt;
was uncapped, which is what let a campaign burst become one multi-minute transaction.&lt;br /&gt;
Send outcomes are unchanged: 200 stamps now, anything else stamps the 1970 sentinel.&lt;br /&gt;
The HttpClient is now closed, which it previously was not.&lt;/div&gt;+ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/PushNotificationSendService.java&lt;br /&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ScheduledTasks.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37569&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37569&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 12:04:40 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37568 – offer circular: a failed web-offer sync must not be silent ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;offer circular: a failed web-offer sync must not be silent&lt;br /&gt;
&lt;br /&gt;
Swallowing the exception was right - a circular that parsed correctly must stay&lt;br /&gt;
PUBLISHED, and the sync is re-runnable while the parse is the expensive part.&lt;br /&gt;
Swallowing it SILENTLY was not.&lt;br /&gt;
&lt;br /&gt;
A TINYINT(1) cast threw in the sync on every ingest from 2026-09-08 to r37553 and&lt;br /&gt;
nothing looked wrong: processed_at advanced, the circular published, the email said&lt;br /&gt;
success. The only symptom was web_offer.synced_at standing still, which nobody was&lt;br /&gt;
watching. It went unnoticed for two days.&lt;br /&gt;
&lt;br /&gt;
Now:&lt;br /&gt;
- Summary carries webOfferSync, and states it in EVERY case - the counts on success,&lt;br /&gt;
  &apos;FAILED - &amp;lt;cause&gt;&apos; on failure, &apos;NOT RUN&apos; if it never executed. A missing line would&lt;br /&gt;
  be indistinguishable from a sync that never ran, so there is no missing line.&lt;br /&gt;
- That lands in offer_document.ingest_summary, so the review screen shows it.&lt;br /&gt;
- The notification email carries it too, and a failure renders as a red&lt;br /&gt;
  &apos;Web offers NOT updated&apos; block saying partners are still seeing the previous&lt;br /&gt;
  offers and that the parse itself is fine.&lt;br /&gt;
- The sync now runs BEFORE published(), so its outcome is part of what gets recorded&lt;br /&gt;
  rather than an afterthought. It is still REQUIRES_NEW with its exception caught, so&lt;br /&gt;
  it still cannot fail the ingest.&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/CircularIngestRunner.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/CircularIngestService.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37568&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37568&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 11:58:19 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37567 – Schedule the catalogue delist daily at 05:30  Runs 30 ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;Schedule the catalogue delist daily at 05:30&lt;br /&gt;
&lt;br /&gt;
Runs 30 minutes before the existing 06:00 scheduledPushDataToSolr in the same&lt;br /&gt;
class, so the same morning&apos;s reindex publishes it. A bulk UPDATE fires no&lt;br /&gt;
TagListingChangeListener event, so without that ordering the portal would lag&lt;br /&gt;
until 18:00.&lt;br /&gt;
&lt;br /&gt;
Gated on catalog.autoDelist.enabled with an inline default of true - env profiles&lt;br /&gt;
have no fallback between each other, so a key missing from one profile&apos;s&lt;br /&gt;
properties would otherwise stop the context booting.&lt;br /&gt;
&lt;br /&gt;
Also exposes --delistDeadListings for a manual run, honouring the same flag.&lt;/div&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/Application.java&lt;br /&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/b2b/Listing.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37567&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37567&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 11:58:08 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37566 – Delist logic v3: require a month of no movement; add ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 4 file(s) modified&lt;/strong&gt;&lt;br/&gt;Delist logic v3: require a month of no movement; add CatalogDelistService&lt;br /&gt;
&lt;br /&gt;
Zero stock alone was too weak a test. It fired on SKUs partners were still&lt;br /&gt;
transacting, where the recent movement was often the very sale that emptied the&lt;br /&gt;
stock. v3 additionally requires no movement for a month on either side:&lt;br /&gt;
- SmartDukaan via warehouse.scanNew (3.4M rows, live). Note warehouse.scan is a&lt;br /&gt;
  dead Saholic relic - 2,476 rows, last write 2012.&lt;br /&gt;
- any partner via fofo.scan_record, any scan type.&lt;br /&gt;
Phrased as NOT EXISTS so they short-circuit on the first recent row and use the&lt;br /&gt;
(inventoryItemId, scannedAt) / (inventory_item_id, create_timestamp) indexes.&lt;br /&gt;
An item that has never moved still qualifies, which is correct.&lt;br /&gt;
&lt;br /&gt;
Also in v3:&lt;br /&gt;
- the internal pseudo-brands (Dummy, FOC, FOC HANDSET, Live Demo) are no longer&lt;br /&gt;
  excluded and are swept like anything else.&lt;br /&gt;
- vendor-PO guard narrowed to status = 1. PARTIALLY_FULFILLED is UNREACHABLE,&lt;br /&gt;
  not merely rare: none of the 8 PO-status writes in the codebase sets it, no&lt;br /&gt;
  native SQL writes the column, and status = 2 has 0 rows across 51,593+ POs&lt;br /&gt;
  back to 2011. Partial receipt is modelled per line (unfulfilledQuantity), so a&lt;br /&gt;
  part-received PO sits in READY and is already caught. Documented so it is not&lt;br /&gt;
  &apos;restored&apos; later as a supposed gap.&lt;br /&gt;
&lt;br /&gt;
CatalogDelistService/Impl mirrors the migration statement for statement, for the&lt;br /&gt;
daily scheduled run. Bulk SQL rather than per-row updateActiveById +&lt;br /&gt;
publishStatusChange, which would commit to Solr once per catalog (~1,750 times&lt;br /&gt;
on the 2026-09-10 backlog); the job is instead scheduled ahead of the existing&lt;br /&gt;
06:00 full reindex. The dark-model step is deliberately house-wide rather than&lt;br /&gt;
run-scoped so it converges instead of leaving pre-existing dark models on a&lt;br /&gt;
stale RUNNING forever.&lt;br /&gt;
&lt;br /&gt;
rollback_delist_recent_movement_20260910.sql restores the 24 listings / 21&lt;br /&gt;
models that the v2 run delisted before NEW 3 existed; their partners had&lt;br /&gt;
transacted them within the month. Id list frozen, not re-derived.&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/catalog/CatalogDelistService.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/catalog/CatalogDelistServiceImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/resources/sql/delist_inactive_listings_rolling_24m.sql&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/rollback_delist_recent_movement_20260910.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37566&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37566&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 03:00:55 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37565 – IMEI activation: 20s tick lanes for oppo/realme/vivo, idle once the ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 7 file(s) modified&lt;/strong&gt;&lt;br/&gt;IMEI activation: 20s tick lanes for oppo/realme/vivo, idle once the day clears&lt;br /&gt;
&lt;br /&gt;
Replaces the two once-a-day passes with chunk-per-tick lanes. Each tick takes one&lt;br /&gt;
chunk and returns; when a brand&apos;s pool comes back empty its turn is skipped, and&lt;br /&gt;
when everything is clear the ticks do nothing and stay silent until midnight.&lt;br /&gt;
&lt;br /&gt;
- browser lane (StandAlone): one chunk of 25 for one brand every 20s, oppo and&lt;br /&gt;
  realme by turns. Still exactly one ChromeDriver alive at a time.&lt;br /&gt;
- vivo lane: its own tick, chunk of 250. It must not share the browser lane --&lt;br /&gt;
  0.24s an imei against oppo&apos;s 10.2s means it would need ~70 hours behind them&lt;br /&gt;
  for work it does alone in 39 minutes.&lt;br /&gt;
&lt;br /&gt;
The snapshot is gone; the pool query is the cursor. That is what makes a restart&lt;br /&gt;
cost one chunk instead of the day: the 12:03 restart on 09-Sep forfeited ~4,000&lt;br /&gt;
lookups and the whole afternoon, and last_finish had read -1 for three days.&lt;br /&gt;
&lt;br /&gt;
The snapshot existed to stop the re-ask loop (realme, 29-Aug: 4,524 requests&lt;br /&gt;
against 1,004 distinct imeis). That is now closed at the source instead -- oppo,&lt;br /&gt;
realme and motorola stamp every imei they asked about, not just the ones that&lt;br /&gt;
produced a map entry, so a failed lookup rests until tomorrow rather than coming&lt;br /&gt;
back on the next tick. Motorola is fixed pre-emptively; nothing schedules it yet.&lt;br /&gt;
&lt;br /&gt;
Also:&lt;br /&gt;
- secondary and tertiary are merged by turns rather than concatenated. Safe while&lt;br /&gt;
  a pass walked to the end; without that guarantee oppo&apos;s 163 tertiary serials sat&lt;br /&gt;
  behind 3,819 secondary ones and would only be reached on a day that cleared.&lt;br /&gt;
- vivo abandons a tick rather than the chunk when the captcha solver returns no&lt;br /&gt;
  code -- one probe per 20s while it is down instead of 250, and no rows rested&lt;br /&gt;
  over a transient outage.&lt;br /&gt;
- the funnel gauges move from a pass to a day. due is measured on the first tick&lt;br /&gt;
  after midnight, the rest accumulate, and last_finish_epoch becomes a real&lt;br /&gt;
  completion clock. Truncation is detected at the midnight rollover, which is the&lt;br /&gt;
  case that never reaches an end-of-run at all.&lt;br /&gt;
&lt;br /&gt;
This does not create capacity. At the 21s/imei measured on 09-Sep the pool still&lt;br /&gt;
needs ~35 hours and will not clear; it now rolls over visibly instead of silently.&lt;br /&gt;
The lever for that is DAYS=1.&lt;/div&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/monitored/ImeiActivationGauges.java&lt;br /&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/MotorolaImeiActivationService.java&lt;br /&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/OppoImeiActivationService.java&lt;br /&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/RealmeImeiActivationService.java&lt;br /&gt;~ /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ScheduledSkeleton.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;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37565&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37565&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 02:59:56 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37564 – Creation screens request only live listings from the item typeahead ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 5 file(s) modified&lt;/strong&gt;&lt;br/&gt;Creation screens request only live listings from the item typeahead&lt;br /&gt;
&lt;br /&gt;
/item takes an activeOnly flag (default false, preserving current behaviour)&lt;br /&gt;
and passes it to getAllPartnerItemStringDescription. getItemAheadOptions takes&lt;br /&gt;
an optional 4th argument, so existing 3-argument callers are unaffected.&lt;br /&gt;
&lt;br /&gt;
Sent true from the two creation entry points:&lt;br /&gt;
- warehouse purchase (PO) invoice line picker&lt;br /&gt;
- the new-price-drop modal (#typeaheaditem)&lt;br /&gt;
&lt;br /&gt;
Left false where the screen works on records that already exist and may since&lt;br /&gt;
have been delisted: the price-drop pause/manage picker (#typeaheaditem1),&lt;br /&gt;
catalog-item, combo and prebooking.&lt;br /&gt;
&lt;br /&gt;
jsVersion 419 -&gt; 420 to cache-bust common.js / warehouse-purchase.js (419 was&lt;br /&gt;
already taken by another change).&lt;/div&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/PriceDropController.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/resources/js/common.js&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/price-drop.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37564&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37564&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 02:52:18 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37563 – Filter delisted SKUs out of creation pickers; add rolling 24m ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 7 file(s) modified&lt;/strong&gt;&lt;br/&gt;Filter delisted SKUs out of creation pickers; add rolling 24m delist migration&lt;br /&gt;
&lt;br /&gt;
Creation screens could offer items whose catalog.tag_listing.active = 0:&lt;br /&gt;
- Item.selectAllModels (scheme/offer model dropdown) joined tag_listing with&lt;br /&gt;
  no active predicate. Adding tl.active = true also gives the model-level&lt;br /&gt;
  rollup, since callers dedupe to catalogItemId: a model whose colours are&lt;br /&gt;
  all inactive now yields no rows, one keeping a listed colour stays.&lt;br /&gt;
- The shared partner item picker had no active filter at all. Added a second&lt;br /&gt;
  basis via getAllPartnerItemStringDescription(anyColor, activeOnly);&lt;br /&gt;
  activeOnly participates in the fofoItems cache key so the two bases cannot&lt;br /&gt;
  serve each other&apos;s cached results. Default stays false for screens that&lt;br /&gt;
  inspect or edit existing records.&lt;br /&gt;
- New TagListing.selectActiveItemIds named query backs the filter.&lt;br /&gt;
&lt;br /&gt;
Also adds the rolling 24-month delist migration: zero stock both sides, no&lt;br /&gt;
outstanding vendor PO (status IN (1,2), external supplier, unfulfilled &gt; 0 --&lt;br /&gt;
INIT is excluded as it is a drawer of stale drafts), and re-categorises&lt;br /&gt;
fully-dark mobile models to OTHER. Idempotent, audited, rollback documented.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/catalog/Item.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/catalog/TagListing.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/TagListingRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/TagListingRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/InventoryService.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/InventoryServiceImpl.java&lt;br /&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/delist_inactive_listings_rolling_24m.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37563&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37563&amp;peg=37589</guid></item>
<item><pubDate>Thu, 10 Sep 2026 00:50:44 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37562 – Add SQL to delist pre-2025 Samsung listings with no stock ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;Add SQL to delist pre-2025 Samsung listings with no stock&lt;br /&gt;
&lt;br /&gt;
Marks 738 catalog.tag_listing rows (tag_id 4) inactive with eol_date&lt;br /&gt;
2026-09-08. These are Samsung listings published before 2025-01-01 holding&lt;br /&gt;
no stock in any SmartDukaan warehouse and none at any active partner store.&lt;br /&gt;
&lt;br /&gt;
Id list is frozen from the prod evaluation rather than re-derived, so the&lt;br /&gt;
same listings are delisted in every environment; stock tables in a copy&lt;br /&gt;
drift from prod. Script is idempotent and carries guards, verification and&lt;br /&gt;
a rollback block.&lt;br /&gt;
&lt;br /&gt;
Applied to prod hadb1 and the local dev copy.&lt;/div&gt;+ /trunk/profitmandi-dao/src/main/resources/sql/delist_samsung_pre2025_no_stock.sql&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37562&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37562&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 18:10:22 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37561 – ticket download option given and some enhancement on notification panel</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;ticket download option given and some enhancement on notification panel&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/rbm-drr-dashboard.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37561&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37561&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 17:55:00 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37560 – ticket download option given and some enhancement on notification panel</title><description>&lt;div&gt;&lt;strong&gt;ranu – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;ticket download option given and some enhancement on notification panel&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/CsController.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/managerTicket.vm&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/my-partner-tickets.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37560&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37560&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 17:40:59 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37559 – ticket download option given and some enhancement on notification panel</title><description>&lt;div&gt;&lt;strong&gt;ranu – 5 file(s) modified&lt;/strong&gt;&lt;br/&gt;ticket download option given and some enhancement on notification panel&lt;/div&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/CsController.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/resources/js/send-notification.js&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/send-notification.vm&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/ticket.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37559&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37559&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 17:16:43 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37558 – system generated leak bgc l2 can assign to l1 without ...</title><description>&lt;div&gt;&lt;strong&gt;ranu – 4 file(s) modified&lt;/strong&gt;&lt;br/&gt;system generated leak bgc l2 can assign to l1 without any geo location&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/enumuration/dtr/LeadStage.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/enumuration/dtr/LeadStatus.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/LeadController.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/lead.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37558&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37558&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 15:50:50 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37557 – system generated leak bgc l2 can assign to l1 without ...</title><description>&lt;div&gt;&lt;strong&gt;ranu – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;system generated leak bgc l2 can assign to l1 without any geo location&lt;/div&gt;~ /trunk/profitmandi-fofo/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&amp;isdir=1&amp;rev=37557&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37557&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 14:51:37 +0530</pubDate><dc:creator>ranu</dc:creator><title>Rev 37556 – loi process added, revival and code changes process</title><description>&lt;div&gt;&lt;strong&gt;ranu – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;loi process added, revival and code changes process&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/loiData.vm&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/pendingForm.vm&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37556&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37556&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 14:42:05 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37555 – web offer sync: one value per SKU per payment mode ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer sync: one value per SKU per payment mode&lt;br /&gt;
&lt;br /&gt;
The circular says two things about the same phone. Motorola Sep&apos;26 page 9 names&lt;br /&gt;
&apos;G37 Power&apos; generically at Rs.1,000 CC Full Swipe (row 12) and &apos;G37 Power (8+128)&apos;&lt;br /&gt;
at Rs.2,000 (row 13), so G37 Power 8+128 carried both badges and a partner could&lt;br /&gt;
quote either.&lt;br /&gt;
&lt;br /&gt;
Precedence, per (catalog_id, txn_mode):&lt;br /&gt;
  1. a specifically named VARIANT beats a generic MODEL - the named line is the OEM&lt;br /&gt;
     being precise about that SKU&lt;br /&gt;
  2. at the same level, the higher value wins&lt;br /&gt;
  3. tie-break on lowest offer id, so the outcome is deterministic&lt;br /&gt;
&lt;br /&gt;
The generic line still covers every variant nobody named: G37 Power 4+64 keeps its&lt;br /&gt;
Rs.1,000 Full Swipe while 8+128 takes Rs.2,000. Verified on the live data - 1026311&lt;br /&gt;
now resolves to exactly CC_EMI 2500 and CC_FULL_SWIPE 2000, down from four competing&lt;br /&gt;
values.&lt;br /&gt;
&lt;br /&gt;
An offer keeps a SKU if it wins on at least one of its own modes, since one badge&lt;br /&gt;
carries every mode of its offer. Scheme-only offers are never filtered - no value to&lt;br /&gt;
compare.&lt;br /&gt;
&lt;br /&gt;
Deliberately NOT reusing v_offer_applicable, which encodes the same VARIANT-beats-&lt;br /&gt;
MODEL rule but has no document or status filter: once August is re-ingested its rows&lt;br /&gt;
enter that view and an EXPIRED August variant would silently suppress a live&lt;br /&gt;
September model. Scoping to one document avoids that; the view is left alone for&lt;br /&gt;
other consumers.&lt;br /&gt;
&lt;br /&gt;
Measured on Sep&apos;26: 557 product links -&gt; 458, 191 badges -&gt; 166.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/offers/WebOfferSyncRepositoryImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37555&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37555&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 13:34:48 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37554 – web offer: put the brand back in the title  ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer: put the brand back in the title&lt;br /&gt;
&lt;br /&gt;
  SEPTEMBER 2026 MOTOROLA Rs.1,000 cashback on Credit Card Full Swipe&lt;br /&gt;
  SEPTEMBER 2026 MOTOROLA No Cost EMI on 3, 6 months&lt;br /&gt;
&lt;br /&gt;
Month and brand now both match the convention of the 3,850 hand-written rows, which&lt;br /&gt;
is how the admin listing is scanned. What stays gone is the redundant&lt;br /&gt;
&apos;Cashback Offer-&apos; label: the value already states what the offer is, and calling a&lt;br /&gt;
scheme-only row a cashback offer is what produced the live &apos;Cashback Offer- NA&apos;&lt;br /&gt;
badges on 81 SKUs.&lt;br /&gt;
&lt;br /&gt;
Brand comes from the division&apos;s catalog brand, falling back to its display name, so&lt;br /&gt;
a division with no catalog.brand row (Google) still reads sensibly rather than&lt;br /&gt;
emitting an empty gap.&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/WebOfferSyncService.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/WebOfferSyncServiceTest.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37554&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37554&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 13:11:25 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37553 – web offer sync: all_banks is TINYINT(1), so never cast it ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 1 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer sync: all_banks is TINYINT(1), so never cast it to Number&lt;br /&gt;
&lt;br /&gt;
ClassCastException: java.lang.Boolean cannot be cast to java.lang.Number, thrown from&lt;br /&gt;
selectPublishableOffers on every ingest since 2026-09-08. Confirmed against the live&lt;br /&gt;
driver: SELECT all_banks returns java.lang.Boolean.&lt;br /&gt;
&lt;br /&gt;
MySQL Connector/J maps TINYINT(1) to Boolean while Hibernate may hand back a Number,&lt;br /&gt;
so the value must be read through isTrue() - the same shape as ScopeConfig.isTrue and&lt;br /&gt;
OfferScopeRepositoryImpl.isTrue, both of which exist for exactly this reason and both&lt;br /&gt;
of which I had in front of me when writing the cast.&lt;br /&gt;
&lt;br /&gt;
The failure was silent by design: CircularIngestRunner swallows sync exceptions so a&lt;br /&gt;
web-offer problem can never fail a good ingest. The circular kept publishing, the&lt;br /&gt;
document&apos;s processed_at kept moving, and the only symptom was that web_offer.synced_at&lt;br /&gt;
stopped advancing - which is what should have been checked before reporting the sync&lt;br /&gt;
as working on 8 September.&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/offers/WebOfferSyncRepositoryImpl.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37553&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37553&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 12:43:18 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37552 – lead/knowlarity: stop a null lookup key from matching every row ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 4 file(s) modified&lt;/strong&gt;&lt;br/&gt;lead/knowlarity: stop a null lookup key from matching every row&lt;br /&gt;
&lt;br /&gt;
selectByEquals maps a null VALUE to NO PREDICATE AT ALL rather than to &quot;= null&quot;,&lt;br /&gt;
because GenericRepositoryImpl.prepareEqualPredicate skips null entries. So a null&lt;br /&gt;
lookup key does not miss -- it selects the whole table and dies on&lt;br /&gt;
NonUniqueResultException. Two live call paths were doing exactly that.&lt;br /&gt;
&lt;br /&gt;
RecordingService.updateAgentCallLog read caller_id, which knowlarity has never sent&lt;br /&gt;
on push-call-log: a sample of 50 live webhooks contained it zero times. Every call&lt;br /&gt;
therefore ran selectByCallerId(null) -&gt; &quot;select every sip_master row&quot; -&gt; throw, and&lt;br /&gt;
the whole feed was discarded. 17 of those 50 were Connected calls with a real agent.&lt;br /&gt;
Resolve the agent from agent_number instead, which is the field that actually&lt;br /&gt;
identifies them and holds the sip_url; it arrives bare, sip:-prefixed, or as the&lt;br /&gt;
literals &quot;False&quot;/&quot;None&quot; when nobody picked up. caller_id is still honoured first in&lt;br /&gt;
case they ever start sending it. A payload naming no agent is INFO, and an agent&lt;br /&gt;
missing from sip_master is WARN (an ops fix, and per-agent, so an ERROR would&lt;br /&gt;
fingerprint into one GlitchTip issue per agent).&lt;br /&gt;
&lt;br /&gt;
AuthRepositoryImpl.putEmailOrMobile had the same hole via Long.parseLong(null)&lt;br /&gt;
falling into the catch and putting a null email. selectByEmailOrMobile(null)&lt;br /&gt;
degenerated to &quot;select all 405 users&quot;, and authenticate(null, hash) degenerated to&lt;br /&gt;
&quot;does ANY user have this password hash&quot;, which would answer true. Both fail closed&lt;br /&gt;
today only as an accident of how many rows the table holds, so the guard goes on the&lt;br /&gt;
one path they share.&lt;br /&gt;
&lt;br /&gt;
Fixes GlitchTip #58/#1324/#1335 (fofo, 281 events) and #10 (web).&lt;/div&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/auth/AuthRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/auth/SipRepository.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/auth/SipRepositoryImpl.java&lt;br /&gt;~ /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/kommuno/RecordingService.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37552&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37552&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 12:42:06 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37551 – web offer: keep the month in the title   ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 2 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer: keep the month in the title&lt;br /&gt;
&lt;br /&gt;
  SEPTEMBER 2026 Up to Rs.4,000 cashback&lt;br /&gt;
  SEPTEMBER 2026 Rs.1,500 cashback on Credit Card EMI&lt;br /&gt;
  SEPTEMBER 2026 No Cost EMI on 3, 6 months&lt;br /&gt;
&lt;br /&gt;
Matches the convention of the 3,850 hand-written rows and is how the admin listing is&lt;br /&gt;
scanned. The brand stays out - the product card already shows it, so that was the&lt;br /&gt;
redundant half, and dropping it is what makes room for the value to lead.&lt;br /&gt;
&lt;br /&gt;
The month comes from the OFFER&apos;s own start date, not the circular&apos;s period: offers&lt;br /&gt;
run past a month end - four Aug&apos;26 Apple offers ran to 26 September - and labelling&lt;br /&gt;
one of those AUGUST on a badge read in September would be wrong.&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/WebOfferSyncService.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/WebOfferSyncServiceTest.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37551&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37551&amp;peg=37589</guid></item>
<item><pubDate>Wed, 09 Sep 2026 12:37:13 +0530</pubDate><dc:creator>amit</dc:creator><title>Rev 37550 – web offer: partner-facing titles, and stop calling a scheme offer ...</title><description>&lt;div&gt;&lt;strong&gt;amit – 3 file(s) modified&lt;/strong&gt;&lt;br/&gt;web offer: partner-facing titles, and stop calling a scheme offer a cashback offer&lt;br /&gt;
&lt;br /&gt;
web_offer.title is partner-facing - StoreController and DealsController map it into&lt;br /&gt;
the product&apos;s offer list - so it now leads with the value rather than a filing label:&lt;br /&gt;
&lt;br /&gt;
  Up to Rs.4,000 cashback&lt;br /&gt;
  Rs.1,500 cashback on Credit Card EMI&lt;br /&gt;
  10% cashback up to Rs.7,500 on Credit Card EMI&lt;br /&gt;
  No Cost EMI on 3, 6 months&lt;br /&gt;
&lt;br /&gt;
Month and brand are gone: the card already shows the product, and the offer carries&lt;br /&gt;
its own dates. The full breakdown sits in detailedText below it.&lt;br /&gt;
&lt;br /&gt;
This fixes a live defect. 16 published offers have no cashback at all, and the old&lt;br /&gt;
template rendered them &apos;SEPTEMBER 2026 XIAOMI Cashback Offer- NA&apos; with detail &apos;NA&apos;,&lt;br /&gt;
on 81 SKUs. They are EMI-scheme offers and now say so.&lt;br /&gt;
&lt;br /&gt;
Scheme inference at ingest: Motorola states the scheme in the DESCRIPTION rather than&lt;br /&gt;
the tenure cell - &apos;[3&amp;6 M]&apos; plus &apos;Only NCEMI&apos;, where every other OEM writes&lt;br /&gt;
&apos;6(NCE),9,12(LCE)&apos;. TenureParser is right to return NONE for such a cell; the scheme&lt;br /&gt;
is simply not in it. Recovered in CircularIngestService where both columns are in&lt;br /&gt;
hand, and deliberately narrow: only when EVERY tenure came back without a scheme AND&lt;br /&gt;
the description names exactly one. On Sep&apos;26 that is 10 offers, all Motorola; the&lt;br /&gt;
other 23 scheme-less rows are cashback offers whose descriptions are amounts, and&lt;br /&gt;
inventing a scheme for those would misstate the terms.&lt;br /&gt;
&lt;br /&gt;
This distinction is money: four of the Motorola rows are LOW cost EMI, and calling&lt;br /&gt;
them no-cost would promise a partner something the bank will not honour.&lt;br /&gt;
&lt;br /&gt;
&apos;No cashback.&apos; is dropped everywhere - the absence of an amount says it, and beside a&lt;br /&gt;
Cashback Instant Benefit scheme it flatly contradicted the name.&lt;br /&gt;
&lt;br /&gt;
Tests 8 -&gt; 12.&lt;/div&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/CircularIngestService.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/offercircular/WebOfferSyncService.java&lt;br /&gt;~ /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/web/offercircular/WebOfferSyncServiceTest.java&lt;br /&gt;</description><link>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37550&amp;peg=37589</link><guid>https://svn.smartdukaan.com/revision.php?repname=SmartDukaan&amp;path=%2F&amp;isdir=1&amp;rev=37550&amp;peg=37589</guid></item>
</channel></rss>