Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37452 38 d 15 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/ Fix e-invoice IRN failure when the NIC auth token is about to expire

NIC reissues the same auth token until it genuinely expires, so evicting the cache
inside the 5 minute leeway hands back the identical near-dead token. getAuthenticatedHeaders
checked the leeway once, before that re-fetch, and never inspected what came back.
NSUPHR1770 filed with a token that had 12 seconds of life left and the gateway answered
412/GSP752 'eInvoice AuthToken not found or expired'; the invoice filed a minute later,
past the expiry and so on a genuinely new token, succeeded.

getUsableAuthToken re-checks the refetched token and, when it is still inside a 60s
floor, waits out the remainder before minting again. The wait is bounded by that floor
and every caller on this path is a cron/async thread already running against a 60s NIC
timeout with no transaction held open.

Also make the gateway's own failures legible. NIC rejections arrive as
{Status, ErrorDetails}, but failures the ASP raises in front of NIC use
{status_cd, error{error_cd, message}}, which shares no field name with RespPl: Gson
produced an all-null object and the stored reason degraded to the literal
'RespPl{Status=0, Data=null, ErrorDetails=null, InfoDtls=null}', indistinguishable from
NIC rejecting the document. RespGSPErr already modelled that envelope but was a
non-static inner class and so could not be instantiated by Gson; made it static and
copy the code and message into ErrorDetails, which every caller already reads.
 
36477 154 d 2 h amit /trunk/ Invoice return: IRN/EWB cancellation on approve, Logistics L2+ permission, DL GST disabled

- approveInvoiceReturn now cancels IRN+EWB when cancellable (path B) before falling back to Credit Note (path A)
- DC/challan EWB cancelled best-effort before Credit Note path
- Added enabled flag to GstEInvoiceUser; DL GSTIN disabled in E_INVOICE_USERS and EWB_USERS
- isGstEnabled guard added to all public GST API methods in GstProService
- Logistics L2+ can now approve/reject invoice returns (not just Finance)
- invoice-return.vm uses canApproveInvoiceReturn for INV-prefix button visibility
 
36141 188 d 2 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/ Fix Credit Note: PrecDocDtls must be a list for NIC API. Sandbox verified all 3 flows: IRN generate, IRN cancel (within 24h), Credit Note CRN (past 24h)  
33755 755 d 12 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/api/model/ Removed unncessary models  
33741 759 d 8 h amit.gupta /trunk/ Now allo EWB as well Invoice files related  
31016 1459 d 8 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/ Fixed credit  
30310 1636 d 2 h amit.gupta /trunk/ Fixed Standalone bean  
30287 1639 d 3 h amit.gupta /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/ Added Einvoice Files