Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37954 8 h 5 m amit /trunk/profitmandi-fofo/src/main/ Invalid GSTINs screen for Accounts to revalidate and re-enable billing

Lists stores flagged gst_invalid (NIC refused their GSTIN) with the NIC reason and date.
Revalidate & enable (Accounts category only) does a live GSTIN lookup and clears the
flag only when the portal returns Active; otherwise shows why it is still invalid.

Menu "Invalid GSTINs" under Partner Reports, action class invalid-gstin-stores, granted
like Credit Note (272) - inserted by claude-data/sql-migrations/store_gst_invalid_flag_20261023.sql.
Needs the matching dao commit. jsVersion 448 -> 449.
 
37953 8 h 5 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Flag a store whose GSTIN NIC refuses and block billing until Accounts revalidates

NIC refuses an IRN when the buyer's GSTIN is cancelled (HRHIS1445 06JHOPS3042G1Z0:
NSHRGGN794 on 19-Oct, NSHRGGN1058 on 23-Oct). Nothing recorded it against the store, so
billing kept printing the dead GSTIN on invoices that can never be filed, and each one
then got stuck at return/cancellation.

FofoStore: gst_invalid / gst_invalid_reason / gst_invalid_timestamp (DDL in
claude-data/sql-migrations/store_gst_invalid_flag_20261023.sql - must be applied BEFORE
this is deployed, the entity maps the columns).

GstProService.getEInvoice: when NIC's refusal is about the buyer's GSTIN
(isInvalidBuyerGstin - not state-code, not our seller, not transporter) the store is
flagged in the same filing transaction. One way only; internal stores skipped.
revalidateStoreGst: the only way the flag clears - a live GSTIN lookup of the store's
current GSTIN must return Active; otherwise the flag stays and the reason is returned.
fetchGstDetails: uncached lookup; getGstDetails keeps its fortnightly cache and delegates.

TransactionServiceImpl.addBillingDetailsForGrouppedOrders: validateBuyerGstinForBilling
refuses billing to a flagged store, before the lock, next to the transporter check.
 
37952 9 h 9 m ranu /trunk/profitmandi-fofo/src/main/ offer radar gateway time out fixed  
37951 10 h 14 m amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ feat(cron): daily missing brand identifier report for flagged-brand smartphones to category team  
37950 10 h 14 m amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ fix(catalog): mark Brand Identifier column optional in catalog upload template  
37949 10 h 14 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/catalog/ fix(catalog): make Brand Identifier optional again in item bulk upload; gaps now reported by cron  
37948 10 h 30 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ FofoStore: drop the legacy closed field; store_status is the only source  
37947 11 h 7 m amit /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/service/cs/ DemoPartnerAccessTest: read store_status instead of active  
37946 11 h 7 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ FofoStore: drop the legacy active field; store_status is the only source  
37945 14 h 59 m amit /trunk/profitmandi-fofo/src/main/ fix(catalog): serve bulk upload template with Brand Identifier column

Download Template linked to /download/catalog-template.xls which 404s.
Add GET /catalog/template.xlsx generating the 21-column loader layout
(column U = Brand Identifier, mandatory for flagged smartphone brands).
 
37944 17 h 2 m amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Store status: identity integrity monitor reads store_status instead of active / closed  
37943 17 h 2 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Store status: readers use store_status instead of the active / closed columns

- HQL named queries and repository lookups: active = ACTIVE + PAUSED, inactive = SUSPENDED + CLOSED,
not closed = store_status <> CLOSED
- Native SQL report / snapshot / ageing / delist queries moved to fofo_store.store_status
- PAUSED stores now count as active everywhere (incl. the internal stores whose active column is still 0)
 
37942 18 h 0 m amit /trunk/profitmandi-fofo/src/main/ Partner GRN / warehouse billing: disable submit while request is in flight

- GRN serialized, non-serialized and partial submit buttons and the Generate Bill button are disabled
until the request returns, so a double click can't GRN or bill twice
- doAjaxRequestWithJsonHandler / doPostAjaxRequestWithJsonHandler take an optional error callback
- JS version 448
 
37941 18 h 0 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Partner GRN: lock purchase before quantity check; block re-billing of billed orders

- scanSerialized/scanNonSerialized lock the purchase row (refresh FOR UPDATE) and sum GRNed qty with
FOR UPDATE before checking against billed qty, so two concurrent GRNs of one invoice can't both pass
- Serialized GRN rejects a line carrying more IMEIs than its billed quantity (double-billed line)
- acceptOrders validates billing state; billing re-checks orders under FOR UPDATE so a second click
can't bill an already billed order
- Scheme IN skips inventory rows with initial quantity 0 (voided duplicate GRN rows)
- Includes an empty-list guard in selectWarehouseIdsByInvoiceNumbers from a parallel change
 
37940 1 d 9 h 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 1 d 9 h 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 1 d 10 h 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 1 d 10 h 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 1 d 10 h 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 1 d 10 h 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)
 

Show All