Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37940 8 h 11 m amit /trunk/profitmandi-dao/src/ feat(credit): consolidated Loan Default mail to Tarun Verma and Kamini Sharma

- cron (blockDefaultedPartners): when it newly blocks partners, one mail listing them (partner, code, default pending, loans, oldest days, RBM L1, since) plus the total still on Loan Default
- --sendLoanDefaultBlockMails catch-up: one mail with the full current Loan Default list
- a mail failure never fails the cron
- RBM names built from first/last name without 'null' when one is missing
- a loan default only blocks SD Credit and never changes store status
 
37939 8 h 30 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ Scheme and offer payouts skip SUSPENDED and CLOSED stores

- Activation special support (processActivation): payouts of suspended or closed stores stay pending,
paid only if the store is revived
- Offer rollout and payout preview (activation/tertiary and sell-in): suspended and closed stores are
dropped by store status, whatever the partner criteria
 
37938 9 h 27 m amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ Store status lifecycle: temporary activation expiry and weekly closure reminder

- checkPartnerActiveStore returns expired temporary activations to their previous status
(the old job failed with a NullPointerException on permanently active stores)
- Mondays 09:00: stores suspended for more than 7 days mailed to Neeraj with the other closers in CC
 
37937 9 h 27 m amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/ Store status lifecycle: web login, wallet guard and V2 endpoints

- Partner login and token detail refuse a SUSPENDED or CLOSED store (STORE_LOGIN_BLOCKED) with the reason;
token detail returns storeStatus
- PAUSED blocks partner wallet spends at checkout, insurance and clearance bid
- V2 retailer endpoints mirror the fofo ones through StoreStatusService
 
37936 9 h 27 m amit /trunk/profitmandi-fofo/src/main/ Store status lifecycle: fofo store pages and endpoints

- Pause / un-pause / suspend endpoints with a mandatory reason, status history; activate, temporary
activate and close go through StoreStatusService
- Active stores page lists ACTIVE + PAUSED with status badges; inactive page lists SUSPENDED + CLOSED;
buttons shown by the viewer's permissions
- LOI revival: a SUSPENDED store comes back on the same code; a CLOSED store gets a new code at store
creation (no longer reopened)
- JS version 447
 
37935 9 h 27 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Store status lifecycle: ACTIVE / PAUSED / SUSPENDED / CLOSED with a status log

- fofo_store.store_status is the source of truth; active / closed are written in step for old readers
- StoreStatusService is the only writer: transition rules, permissions (pause: Tarun, Kamini, Sales L5+
for their partners; suspend / activate / temp: Tarun, Kamini, Neeraj, Accounts L4+; close: Tarun,
Kamini, Accounts L3+), mandatory reason, fofo.store_status_log row, status-change mail
- Closure only from SUSPENDED with a zero wallet and no open loan (limit blocks included)
- Revival: SUSPENDED comes back on the same store, CLOSED gets a new store; both kept in fofo.store_revival
- PAUSED blocks partner wallet spends (recharge, prebooking, insurance at sale)
- Temporary activation expiry and the weekly closure reminder
- selectInActiveStore renamed selectInactiveStores (SUSPENDED + CLOSED, uncached)
 
37934 12 h 16 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ feat(catalog): brand identifier mandatory on item upload for flagged brands' smartphones

- catalog.brand_category.brand_identifier_required (mobile rows, category_id 3) maps to BrandCategory.brandIdentifierRequired
- ItemLoaderService rejects a category 10006 row with smartphone HSN (Item.SMART_PG) and blank Brand Identifier
when the brand's flag is set; feature phones (85171400), vendors 500/515 and Any Colour rows are exempt
- DDL + flags already applied on hadb1 2026-10-22: Samsung, Vivo, Oppo, Realme, Xiaomi, POCO, Motorola, Tecno
 
37933 12 h 35 m amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ feat(credit): --sendLoanDefaultBlockMails one-shot catch-up mail for current loan-default blocks (needs dao r37930)  
37932 12 h 35 m amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/ feat(credit): gateway status returns partner-safe statusDescription when SD Credit is inactive (needs dao r37930)  
37931 12 h 35 m amit /trunk/profitmandi-fofo/src/main/ feat(credit): show partner-safe SD Credit inactive message on partner Wallet page (needs dao r37930)  
37930 12 h 35 m amit /trunk/profitmandi-dao/src/ feat(credit): mail Sales/RBM on every credit block/unblock; partner-safe inactive message

- every credit_block_log entry (manual, cron 'system', gateway activation) mails the partner's active Sales L1+L2 and RBM L1 via mail_outbox: partner, status, reason, done by, time
- a mail failure never fails the block/unblock
- sendLoanDefaultBlockMails(): one-time catch-up mail for accounts already LOAN_DEFAULT
- getPartnerInactiveMessage(): loan default -> 'on hold due to payments overdue beyond 30 days', others generic; internal typed reason never exposed
- sddirect/summary (SDCreditResponseOut) now carries statusDescription when inactive
 
37929 14 h 52 m amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/config/ chore(fofo): bump jsVersion to 446 for partner-credit-detail.js (r37927)  
37928 14 h 52 m amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ feat(credit): run loan-default credit block in notifyDefaultLoans cron (needs dao r37926)  
37927 14 h 52 m amit /trunk/profitmandi-fofo/src/main/ feat(credit): show active/inactive reason + logs popup; CEO-only reactivation of loan default

- Partners Credit Detail: Active Status column (Active / Inactive - Awaiting Activation | Loan Default | Blocked) with Logs popup (reason + who)
- unblock and gateway Activate now require a reason; switchCreditGateway goes through the loan-default guard
- new sanctioned account starts as AWAITING_ACTIVATION
- needs dao r37926
 
37926 14 h 52 m amit /trunk/profitmandi-dao/src/ feat(credit): deactivate credit on loan default; only the CEO can reactivate

- credit_account.inactive_reason: AWAITING_ACTIVATION / LOAN_DEFAULT / BLOCKED (internal only)
- blockDefaultedPartners(): defaulted loans (unpaid past 30 days) totalling >= Rs.25,000 -> inactive LOAN_DEFAULT, logged as 'system'
- repayment never reactivates; LOAN_DEFAULT can only be reactivated by tarun.verma (guard in activateCredit)
- a CEO reactivation covers existing defaults; a later default blocks again
- reason now mandatory on unblock/activate; updateRisk high-risk deactivation now records BLOCKED + log
- DDL: claude-data/sql-migrations/2026-10-22_credit_account_inactive_reason.sql (applied on hadb1)
 
37925 15 h 47 m amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ fix(cron): stop subtracting a year from Realme activation date

Realme's expiryDate is the activation date (the phonecheck page shows it as
"Activation Date"). Since r37423 the job subtracted a year, storing every
cron-written Realme activation one year early.
 
37924 1 d 10 h vikas /trunk/profitmandi-fofo/src/main/ Login Usertype Tracker  
37923 1 d 14 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ feat: add Catalog_Id and HSN_Code columns to warehouse purchase invoices report  
37922 1 d 14 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ feat: add catalog id and HSN code to PurchaseInvoiceModel  
37921 3 d 8 h ranu /trunk/ loi bugs fixed  

Show All