Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37964 1 h 1 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/order/ Bad return: cancel invoice and reverse schemes only for returned units; reject address not belonging to customer

- badReturn reverses OUT schemes only for the returned inventory items and cancels the order only when every unit is returned (was: whole invoice cancelled + all margin reversed on a 1-of-N return)
- guard each returned unit is billed on the line and not already returned
- createOrder throws a business error instead of NoSuchElementException when the selected address is not the customer's
 
37963 1 h 8 m amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ perf(returns): batch partner, debit note and invoice lookups on Sale Returns screen

/return/invoice looked up partner name, debit note and invoice number per row
(~400 queries for the default 30-day view). Collect ids across the pending and
settled rows and fetch each once: getFofoRetailers for partner names,
selectAllByDebitNoteIds for debit notes, and return items -> inventory items ->
purchases for invoice numbers. Same invoice resolution (highest inventory item
of the debit note) and same fallbacks as before.
 
37962 1 h 53 m amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Sale returns screen: show IRN failure / B2C option only for credit-note-stage GSTIN refusals; a no-IRN invoice return shows plain Approve.  
37961 1 h 53 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ B2C refund option, Finance-only gate and 'IRN failed' status now driven only by credit-note-stage GSTIN refusals. A return on an invoice that never got an IRN shows a plain Approve (full local credit note, r37960); its old INVOICE_IRN refusal rows stay for history.  
37960 2 h 34 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ Return on an invoice that never got an IRN (incl. NIC refusing a dead buyer GSTIN at billing) now issues a local credit note at full value instead of failing into the B2C flow. B2C net-of-GST stays only for a credit note NIC refuses against a filed invoice. Invoice return and DN return.  
37959 2 h 40 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ Invoice with no IRN (NIC rejected, irn_generated=0), not shipped and billed under 24h ago is cancelled without finance approval, same as an IRN inside its 24h window. Past 24h it still goes to finance as a return. Queued IRNs (irn_generated NULL) excluded.  
37958 3 h 37 m amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/ Scratch card awarded after the sale commits. Store login with an unknown or inactive store code returns 'Store not found' instead of a null pointer.  
37957 3 h 37 m amit /trunk/profitmandi-fofo/src/main/ Scratch card awarded after the sale commits. Clear messages for: billing with nothing scanned, debit note generation with no approved returns, bad delivered date in mark-delivered CSV. Reset selected customer address when the mobile number changes. jsVersion 450.  
37956 3 h 37 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ Award scratch card after the sale commits, in its own transaction, so a gift-stock lock timeout can no longer roll back the sale. EMI product and partner pincode lookups return the first row when a model or partner has several.  
37955 6 h 28 m aman /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/fofo/ Fin Service mapping: show partners without onboarding panel row

- selectFinanceServices (full Fin Service mapping page) inner-joined
PartnerOnBoardingPanel, so partners with no onboarding row (e.g. UPAMH1699,
UPGBN1359) were dropped and every brand showed '--' after refresh, although
activation saved fine (row refresh uses the left-joined ByFofoId query).
- Same inner join in selectFinanceServiceByFollowUpDate skipped those partners'
follow-up reminders. Both now left join, matching selectFinanceServicesByFofoId.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SaCSsjqnDidVZprquD1pUV
 
37954 2 d 23 h 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 2 d 23 h 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 3 d 0 h ranu /trunk/profitmandi-fofo/src/main/ offer radar gateway time out fixed  
37951 3 d 1 h 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 3 d 1 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ fix(catalog): mark Brand Identifier column optional in catalog upload template  
37949 3 d 1 h 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 3 d 1 h 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 3 d 2 h amit /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/service/cs/ DemoPartnerAccessTest: read store_status instead of active  
37946 3 d 2 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ FofoStore: drop the legacy active field; store_status is the only source  
37945 3 d 6 h 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).
 

Show All