| Rev |
Age |
Author |
Path |
Log message |
Diff |
| 37290 |
15 m |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ |
Credit Note IRN: credit only the returned units, not the whole invoice
refundOrder persisted the CreditNote and its lines from the returned
inventory items, but then called generateCreditNoteIrn(invoiceNumber, ...),
which rebuilt the NIC payload by re-reading the original invoice - every
line at billed quantity. A 1-pc DOA return against NSDL37092 therefore
tried to register a CN covering the full invoice (2 phones + 27 carry
bags, Rs 26,664.27) against a Rs 13,332 wallet refund, and the legacy
4-digit HSN on the carry-bag line failed NIC validation with error 2311.
The wallet credit, the CreditNote row and its lines were always correct;
only the e-invoice payload was wrong.
- InvoiceService.getInvoicePdfModelForIrn: optional returnedQtyByOrderId
restricts the item list to the returned orders and prices each line at
the returned quantity. The existing single-arg method delegates with
null, so invoice PDF generation is unchanged. Margin-scheme, delivery
challan, IMEI-suffix and HSN handling apply to the reduced line as-is.
- GstProService.generateCreditNoteIrn: 4-arg overload taking the map; the
3-arg version delegates with null for whole-invoice returns.
- PurchaseReturnServiceImpl.refundOrder: passes orderReturnQtyMap, which
was already built for the ReturnOrderInfo rows.
Verified against the NIC sandbox using the real NSDL37092 rows: the old
payload is rejected with error 2311, the new payload is accepted
(DocTyp CRN, ItemCnt 1, MainHsnCode 85171300, TotInvVal 13331.99).
Not covered here: applyInvoiceReturnViaCreditNote still sends the whole
invoice, so an invoice partially returned earlier re-credits those units. |
|
| 37289 |
6 h 46 m |
amit |
/trunk/profitmandi-dao/src/ |
external api v2: space-separated ram/storage pair in catalog titles (refurb naming) |
|
| 37288 |
8 h 22 m |
ranu |
/trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ |
all active brand in hot deals |
|
| 37287 |
8 h 44 m |
ranu |
/trunk/ |
warehouse access |
|
| 37286 |
8 h 58 m |
ranu |
/trunk/ |
warehouse access |
|
| 37285 |
9 h 25 m |
ranu |
/trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ |
warehouse access |
|
| 37284 |
9 h 51 m |
amit |
/trunk/profitmandi-dao/src/ |
external api v2: derive specs from catalog brand/model title (pair + lone-storage forms) as last resort; migration file marks applied state, legacy update() note |
|
| 37283 |
9 h 54 m |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
hot deals: cart/pricing availability reads date-windowed model_hot_deal instead of tag_listing.hot_deals |
|
| 37282 |
9 h 54 m |
amit |
/trunk/profitmandi-fofo/src/main/ |
hot deals: remove legacy tag_listing hot-deals endpoints and catalog-item UI (replaced by model_hot_deal admin flow) |
|
| 37281 |
10 h 22 m |
amit |
/trunk/profitmandi-dao/src/ |
external api v2: storeMaster visibility by fofo_type=FRANCHISE (drop internal flag check); spec derivation supports MB sizes (feature phones) |
|
| 37280 |
11 h 38 m |
amit |
/trunk/profitmandi-web/src/main/resources/ |
external api v2: document addedOn field for new-SKU partial sync |
|
| 37279 |
11 h 38 m |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ |
external api v2: addedOn (item first-added epoch) in catalogSkuMaster/catalogSkus rows |
|
| 37278 |
11 h 43 m |
ranu |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ |
warehouse access |
|
| 37277 |
14 h 18 m |
vikas |
/trunk/profitmandi-fofo/src/main/ |
Updated Escalation Level |
|
| 37276 |
15 h 0 m |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
Hot deals Solr: derive hot_deal_b from model_hot_deal active windows at index time (full push, single-catalog update, parent + child docs) - catalog.model_hot_deal is the only source, tag_listing.hot_deals no longer read; drop unused tag_listing write-through methods; syncHotDealFlags javadoc reflects reindex-based daily sync |
|
| 37275 |
15 h 9 m |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/ |
Add ModelHotDeal window-boundary and active catalog-id lookups
r37268 committed the ModelHotDealServiceImpl call to
selectWindowBoundaryCatalogIds but not the repository declaration or
implementation, breaking the trunk build with 'cannot find symbol'.
Adds both methods:
- selectWindowBoundaryCatalogIds(today): catalog ids whose deal window opens
today or closed yesterday, i.e. the models whose hot_deal_b flips at
midnight and need a Solr re-index.
- selectActiveCatalogIds(today): catalog ids with a deal live on the given
date, the Solr hot_deal_b source (caller in FofoSolr still pending). |
|
| 37274 |
15 h 24 m |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
Freeze margin-scheme purchase price on the invoice line
Refurbished (GST Rule 32(5)) lines re-derived their purchase price by serial on
every read, resolving to the LATEST warehouse.inventoryItem row. A returned
device gets re-GRNed, sometimes at a different price, so a credit note or a
regenerated PDF could reverse a margin the invoice never charged. 11 already-
billed lines resolved to a price they were not sold at; IMEI 353917853695268
has been sold on six invoices at two different purchase prices.
InvoiceService.freezeMarginPurchasePrices now stamps the value onto
transaction.lineitem.margin_purchase_price at billing time (saveInvoice step 0,
inside the billing transaction), and resolveMarginPurchasePrice reads the frozen
value thereafter, falling back to the live lookup only when null so pre-existing
lines behave exactly as before.
Requires the column from db-scripts/add_margin_purchase_price_column.sql, which
must be applied before this is deployed. |
|
| 37273 |
15 h 32 m |
amit |
/trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/ |
Apply same idempotent super-catalog mapping save to V2 controller
Keeps V2FofoSuperCatalogController in step with the fofo SuperCatalogController
fix (r37272) so the dormant endpoint cannot violate the new
UNIQUE(catalog_id, super_catalog_id) constraint if it is ever enabled. |
|
| 37272 |
15 h 32 m |
amit |
/trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ |
Fix duplicate super-catalog mapping rows on save
The add-row flow in super_catalog.js always posts mapping id 0, so saving a
catalog that was already mapped inserted a second row. That duplicated the
catalog inside superCatalogVariants_s, which surfaced as repeated storage
variant chips on the partner catalog card.
processCatalogMapping now falls back to a (catalogId, superCatalogId) lookup
when no mapping id is supplied and updates the existing row instead of
inserting. Also removes a latent NPE when a stale mapping id was posted.
Backed by a new UNIQUE(catalog_id, super_catalog_id) on
catalog.super_catalog_mapping; 5 pre-existing surplus rows were removed. |
|
| 37271 |
15 h 32 m |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/catalog/ |
Add selectMappingByCatalogIdAndSuperCatalogId to SuperCatalogMappingRepository
Lookup by the (catalogId, superCatalogId) pair so the super-catalog save
flow can detect an existing mapping instead of always inserting. |
|