Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37806 8 d 9 h amit /trunk/profitmandi-dao/src/test/java/com/spice/profitmandi/service/integrations/gstpro/ test(gstpro): classify NIC refusals - buyer GSTIN vs own seller vs state code

IrnRefusalClassificationTest covers GstProService.isInvalidBuyerGstin, which
decides whether a NIC refusal opens the Finance B2C settlement: a cancelled or
invalid BUYER GSTIN qualifies; a state-code mismatch or a message naming our
own seller GSTIN does not. 9/9 pass.
 
37456 39 d 15 h amit /trunk/ Block billing when NIC rejects the transporter GSTIN for e-way bills

NIC files the e-way bill alongside the IRN, so a deregistered transporter
GSTIN returns Status=1 with InfoDtls[InfCd=EWBERR] (3029 "GSTIN - ... is
not active"): the IRN is valid while ewb_no stays null. Nothing downstream
reads that as a failure, so invoices kept being issued for goods that
could not legally move.

Cache the rejected transporter GSTIN in Redis and refuse to bill through
it. The block is keyed on the GSTIN, since one GSTIN is shared by several
warehouse_provider rows, and it carries the day it was raised so it lapses
at midnight and each new day re-tests NIC once. Correcting the GSTIN in
the provider panel lifts it immediately.

Only errors that are the transporter's fault block billing - NIC's 3029,
or any message naming the GSTIN we sent as TransId. Every other EWBERR
behaves as before: the IRN is filed and the e-way bill is retried later.

Guard sits in addBillingDetailsForGrouppedOrders before the pessimistic
lock and before any mutation, mirroring LogisticsServiceImpl#getEwbDetails
(order's own warehouse; self-pickup and runner skipped, as they travel on
a vehicle number rather than a transporter id).
 
36168 188 d 4 h amit /trunk/profitmandi-dao/src/ Add EWB GET APIs (GetEwayBillsByDate, GetEwayBill), fix irn_generated for existing EWB, fetch+update script  
36166 188 d 5 h amit /trunk/profitmandi-dao/src/test/java/com/spice/profitmandi/service/integrations/ Add standalone EWB sandbox test — validates Part A only, 604 handling, and response fields