Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37320 10 h 22 m ranu /trunk/profitmandi-dao/src/main/resources/ one assist ew at 99 up to 20k  
37319 11 h 2 m amit /trunk/ Fix partner-performance tertiary: aggregate order items (qty*mop), not the POS-typed order header

The tertiary panel summed fofo_order.total_amount - a price typed at the partner POS
and never validated against the catalogue - and attributed each whole order to its
first line item's brand via .get(0). One mistyped digit inflated reported sell-out
10x, and mixed-brand orders booked 100% to the first brand, leaving the rest at zero.
Defect dates from r32000/r32034 (May 2023); the panel was the only tertiary consumer
diverging from the qty*mop basis.

- New FofoOrder.selectMonthlyBrandTertiary: sum(quantity*mop) grouped by
(year*100+month) and item brand - the same basis selectPartnerTertiarySales
already uses for the DSR and the partner tier calculation
- PerformanceController: replaces two entity-loading queries (every FofoOrder and
FofoOrderItem for 6 months) with one aggregate; all items now count, each under
its own brand
- Month labels unchanged - toMonthLabel rebuilds the MMM''uu key, template untouched
- Remove V2FofoPerformanceController, the /v2/fofo JSON copy carrying the same defect

Verified against dev DB for fofo_id 175139501: Jul 2026 now 16,94,939 (panel
previously showed 50,92,440); all six months match the qty*mop basis.
 
37318 13 h 15 m ranu /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/checkout/ v2 version some fixes  
37317 13 h 26 m vikas /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/dtr/ Active Scratch Offers  
37316 13 h 32 m vikas /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/dtr/ Active Scratch Offers  
37315 13 h 39 m vikas /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/dtr/ Active Scratch Offers  
37314 15 h 58 m amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Fixed max limit to 15 lac for Credit limit  
37313 17 h 10 m ranu /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/ v2 version some fixes  
37312 17 h 11 m ranu /trunk/ one assist ew at 99 up to 20k  
37311 1 d 4 h vikas /trunk/ Scratch Offers code modify  
37310 1 d 8 h vikas /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/scratch/ Scratch Offers now selects only active partners  
37309 1 d 10 h vikas /trunk/ Scratch Offers now selects only active partners  
37308 1 d 10 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ DN receipt: reject on condition mismatch instead of silently reclassifying

The receive screen defaulted the Condition dropdown to GOOD and receiveDebitNoteItems
overwrote purchase_return_item.type with whatever was submitted. A DOA return received
without touching the dropdown was rewritten BAD->GOOD, so on reject -> acknowledge the
restoreInventory branch put the unit back into good (sellable) stock instead of bad.
UKHD948/57: IMEI 353243710802439 was declared DOA, rejected as 'wrong entry', restored
as good stock and resold at MOP 3h44m later.

- receiveDebitNoteItems now compares each submitted condition against the stored one and
rejects the WHOLE debit note on any mismatch (PRO + rejectReturn are both per-DN and
there is no model for a partial receipt). PRO is still persisted so the receipt attempt
stays on record, then stamped rejected; no scans, no refund, no IRN work.
- Removed the pri.setReturnType(rt) overwrite. Past the gate the submitted condition always
equals the stored one, and applyReceipt already reads it off the entity. Rejected returns
now keep the declared type, so restoreReturnedItems restores to the right bucket.
- New notifyReturnRejectedConditionMismatch: to partner, cc Logistics L2/L3, RBM L1/L2 and
Sales L1 + first populated level in L2..L4. Sales ladder is sparse (L2 262 partners,
L3 64, L4 1582 of 1524 open stores) so a fixed L2/L3 rule resolves to nobody for most.
- getTeamEmails now filters inactive users and dedupes. csService.getAuthUserByCategoryId
(2-arg) does not filter active unlike its 1-arg sibling; fixed here rather than in
CsServiceImpl because that overload has ~25 other call sites where dropping inactive
users would change report scoping.
 
37307 1 d 11 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/scheme/ Block activation of item-less schemes (SELLIN/SELLOUT/SPECIAL_SUPPORT): validateSchemeHasItems guards activeSchemeById and activeSchemeByIds, fixes /todayOfferList NPE caused by scheme 7877  
37306 1 d 11 h amit /trunk/profitmandi-common/src/main/resources/ Block activation of item-less SELLIN/SELLOUT/SPECIAL_SUPPORT schemes: add SCHM_1009 response code  
37305 1 d 11 h ranu /trunk/ carry bag for silver at 1  
37304 1 d 11 h ranu /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/ v2 version some fixes  
37303 1 d 13 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/service/ one assist ew at 99 up to 20k  
37302 1 d 15 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ Split refurbished (margin scheme) items into their own order at placement

Refurbished lines are invoiced on the RF- series, but only the partner checkout path
split them out. Internal POs and bulk orders raised a single mixed transaction, which
billed as one invoice on whichever series its first line happened to resolve to
(NSPJB2757, NSPJB3212, NSUPDL3898/3899/4365/4366).

- PurchaseOrderServiceImpl: split a mixed internal PO into a regular PO and a margin
scheme PO, each with its own PO number, PDF and internal transaction. External vendor
POs raise no transaction, so they are left intact.
- BulkOrderService: raise one transaction per billing group, each with its own loan
sized to the wallet balance left to it. Pricing, combo, credit availability and the
first-PO gates still validate the order as a whole, so a split first PO cannot block
its own second half.
- TransactionServiceImpl: drop the float narrowing of walletUsed in
createTransactionForCartLines - the field is a double and the cart total is validated
within 0.001, so any total carrying paise was rejected.
 
37301 1 d 15 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/service/ one assist ew at 99 up to 20k  

Show All