Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37863 1 d 12 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/monitors/ remove tarun sir email from some storetimline tat email  
37861 1 d 13 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/monitors/ ranking of september  
37860 1 d 13 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/monitors/ remove tarun sir email from some storetimline tat email  
37858 1 d 15 h ranu /trunk/ remove tarun sir email from some storetimline tat email  
37850 2 d 13 h amit /trunk/profitmandi-dao/src/main/ refactor(warehouse): retire hardcoded Delhi ids - allocation fallback vendor warehouse 7573 -> 13368 (central HR-NSSPL/GGN); Vivo Noida/Ghaziabad partner-sale rule 7573 -> 13370; drop unused InventoryWarehouse WH_DL/WH_HR_DL/WAREHOUSE_IDS; migration 20261005_hr_ggn_central_brand_mapping.sql (13368 central for every ACTIVE warehouse, all brands except Oppo/Vivo, 532 rows, applied on hadb1)  
37845 2 d 13 h amit /trunk/profitmandi-dao/src/ feat(warehouse): ACTIVE/SUSPENDED/INACTIVE status + label on sellerwarehouse replace WAREHOUSE_MAP - BillingWarehouseService (active for dashboards, active+suspended for warehouse screens, names in every state, 5 min cache); setup service: guarded status change (no suspend while franchise stores or brand mapping route there, no close while stock/unshipped orders), rename, all-warehouse overview with usage; partner store assignable only to an active warehouse; daily stock alert for suspended/inactive warehouses to logistics/accounts top 2 staffed levels + leadership; dashboard warehouse list = active (replaces r37834 stock-holding loop); migration sellerwarehouse_status_display_name_20261005.sql (applied on hadb1)  
37842 2 d 16 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/ Fixed mail sender everywhere  
37841 2 d 16 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/ Fixed mail sender everywhere  
37840 2 d 19 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ fix(offers): select month offers by date overlap so multi-month offers show in price circular

selectAll(YearMonth) kept an offer only if its start or end date fell in the month,
so an offer running Sep 24 -> Nov 15 (e.g. 10378) was missing from October's price
circular, partner offer view and getMonthOfferIds. Now start <= month end AND
end >= month start. Offer cache eviction (edit + bulk create) clears every month
the offer covers instead of only the start month.
 
37834 3 d 18 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ fix(dashboard): warehouse-wise stock lists every warehouse holding stock in tbl_cis, not only franchise-store warehouses plus hardcoded 7573 - HR hubs (internal stores only) now show  
37830 6 d 6 h amit /trunk/profitmandi-dao/src/ feat(movement): one PO per source vendor warehouse and cost - layers carry their GOOD/OURS vendor warehouse, orders are raised pinned to it, holds of pinned orders come off their own warehouse, billing takes units at the order's price first  
37829 6 d 7 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/ fix(order): split order's line item carries its item, so the split can be billed or split again in the same transaction (NPE at addBillingDetailsForGrouppedOrders)  
37826 6 d 8 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/warehouse/ feat(warehouse): previewMovementPurchaseOrders - read-only view of the POs an internal movement would be raised as (margin-scheme apart, one per cost)  
37822 6 d 11 h amit /trunk/profitmandi-dao/src/ feat(warehouse): physical warehouse setup service, supplier mapping PO guard, address active flag

- WarehouseSetupService + WarehouseSetupValidator: create seller (state from GSTIN,
unique label/GSTIN), address master (city stored last, 6-digit pin, contact),
physical warehouse (OURS/BAD vendor 40 + Dummy/G + sellerwarehouse + mapping in
one transaction), activate/deactivate (sellerwarehouse.is_active), remap address
with internal store sync. Limits follow column sizes (sql_mode is empty).
- WarehouseAddressMaster.active: only active addresses are offered for assignment.
Migration sql/20261001_warehouseaddressmaster_active.sql (applied on hadb1).
- PO guard: createPurchaseOrder refuses a supplier with no OURS/GOOD vendor
warehouse at the destination (GRN could never receive it).
InventoryWarehouseRepository.hasGoodSupplierWarehouse / selectSupplierIdsWithGoodWarehouse
use existence checks; 67 pairs carry duplicate OURS/GOOD rows.
- SellerService.syncInternalStoreAddress(store); RetailerServiceImpl syncs an
INTERNAL store's address when it moves warehouse or becomes internal.
- Record of 2026-10-01 HR Gurugram setup SQL (seller 21, warehouses 13368/13370/13372).
- Tests: WarehouseSetupValidatorTest (10), WarehouseSetupServiceImplTest (7).
 
37817 7 d 16 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ fix(movement): shelf stock before arriving, one PO per cost, close PO on invoice cancel

- Internal movement fills from shelf stock before stock still arriving (a pending PO dated at
midnight ranked ahead of same-day receipts, pricing movements from units that never shipped).
- A quantity spanning stock at different costs is raised as one PO per cost at once instead of
being refused (first PO takes every item's oldest cost, the next the following cost).
- Refuse a movement from a warehouse to itself.
- Cancelling a movement's invoice/DC takes the order's qty off its PO and pre-closes it when
nothing is left open, as refunds already did.
 
37816 7 d 16 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ fix(einvoice): save the e-way bill whenever NIC returns EwbNo, not only with the EWBPPD note

GstProService saved EWB details only when InfoDtls held EWBPPD. NIC sends that
note (its pin-to-pin distance) only when we pass Distance=0, and the DUPIRN
get-by-IRN response carries no InfoDtls at all. So every partner with a
warehouse_partner_distance_mapping row, and every IRN recovered after a
timeout, lost its EWB although NIC had filed it (13 + 2 invoices in 30 days,
backfilled 2026-09-30), and a false "EWB Not Generated" mail was sent.

- Key on EwbNo; distance from EWBPPD, else the distance we sent, else none.
- Invoice PDF prints the "[distance]" suffix only when a distance is known
(was "[null]").
 
37809 8 d 17 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/gstpro/ fix(einvoice): keep waiting for a fresh NIC auth token instead of giving up after one wait

getUsableAuthToken waited out an expiring token once and failed if NIC still
handed back one with under 60s of life. NSNOI14473 (2026-09-10) waited out a
token expiring 17:12:53, got one expiring 17:13:00 (6s left) and was parked at
irn_generated=0; the next invoice 5s later filed fine. Now waits up to 3 times,
each bounded by the remaining life of the token in hand.
 
37805 9 d 4 h amit /trunk/profitmandi-dao/src/main/ fix(catalog): trim f_ colour prefix space; age delisted listings from last activation

- Item.normalizeColor drops the space after f_ on every write (upload sheets typed
'f_ Black', which read ' Black' everywhere); ItemLoaderService uses it so the
duplicate-colour check compares the clean value
- tag_listing.last_activated, stamped by TagListing.setActive on off->on;
updateActiveById now goes through the entity (+flush) so the toggle stamps it
- delist cron + SQL script age a listing from GREATEST(start_date, last_activated),
so a re-activated listing is not delisted again the next morning
- migrations: add_tag_listing_last_activated_20260929.sql, fix_item_color_prefix_space_20260929.sql
(both applied on hadb1 2026-09-29; 174 items trimmed, 36830 excluded - clashes with 37089)
 
37802 9 d 10 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/user/ remove tarun sir email from some storetimline tat email  
37801 9 d 12 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/integrations/pinelabs/ Disable Pine Labs offer discovery behind a config switch (default off)

Turns off the live Pine Labs per-item offer discovery on the user's
instruction. New pinelabs.offer.discovery.enabled, default FALSE, so the
integration is off in every environment unless a properties file opts in.

Gated at the single point all discovery funnels through
(PinelabsAffordabilityServiceImpl.discoverOffers), so one switch stops the
nightly cache loop, a single-item refresh and the /pinelabs/offers endpoint
without editing the six call sites. discoverOffersRawJson gated too.
cacheAllItemOffers returns before its listing query, since the loop costs
4,507 items and ~12 minutes of a cron thread even when every call is a no-op.

Degrades gracefully rather than breaking the product surface: an empty
OfferDiscoveryResponse is exactly what the existing catch block returns, and
getGroupedCachedOffersForItems already drops an entry with an empty issuer
map. The Redis cache is a 24h TTL, so live badges drain within a day rather
than vanishing mid-request.

The @Value carries a default deliberately — pinelabs.api.base.url and the
credentials carry none, so a missing key stops the whole context (the r37495
class of outage). A kill switch must never be able to do that.

SCOPE: offer discovery ONLY. Payment-gateway traffic (orders, refunds,
callbacks, webhooks) and offer create/validate/downpayment are untouched,
so no live money path changes behaviour.

@Scheduled on ScheduledSkeleton.fetchOffersByItem is intentionally left in
place — with the flag off it is one log line, and re-enabling stays a config
change rather than a code change.

Build: dao + web + cron + fofo compile, BUILD SUCCESSFUL.
 

Show All