Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37840 3 d 13 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.
 
37839 3 d 14 h ranu /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/monitors/ drr view dashboard commit  
37838 3 d 15 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ fix(dashboard): warehouse brand stock 'All' includes every warehouse holding stock in tbl_cis, not only franchise-store warehouses plus hardcoded 7573/10516/7678 - HR hubs (internal stores only) now counted (same rule as r37834)  
37837 3 d 16 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/warehouse/ fix(availability): tablets (10010) count as devices in the stock half of BrandRegionMapping.availability and .availabilityVendorWarehouse, matching their reservation half and every other routing query - stock and reservations now go through the same mapping rows  
37836 3 d 16 h aman /trunk/ Lead Management: the calendar date range now applies to follow-up leads too, in both the lead list and the CSV download. Previously follow-ups were appended undated, and the download (non-field-sales path) appended them even when the list did not, so a date-filtered download contained all follow-up leads from all time. 'All' status now consistently includes follow-ups in every branch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JjVXnkrysiXEa2YYRn4BqL
 
37835 4 d 13 h amit /trunk/profitmandi-dao/src/main/resources/sql/ chore(sql): record applied migrations - HR movement HSN/GST-rate/category fixes (2026-10-02) and HR warehouse self brand mapping (2026-10-04); both re-runnable, already applied on hadb1  
37834 4 d 13 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  
37833 7 d 0 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ feat(cron): --retryIrn re-files rejected e-invoices after their data is corrected - reset and filing in one transaction so the scheduled IRN job cannot race it  
37832 7 d 1 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ feat(cron): --closeMovementPO closes movement POs the way the PO screen's Close does (refund live orders, preclose); dry run by default  
37831 7 d 1 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/migrations/ feat(cron): movement billing takes only units at the order's price; PO dry run names each PO's vendor warehouse  
37830 7 d 1 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 7 d 2 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)  
37828 7 d 2 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ fix(cron): movement billing looks POs up inside a transaction (driver has none - 'Could not obtain transaction-synchronized Session'); failure message no longer claims nothing was raised  
37827 7 d 3 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ feat(cron): --autoCreateMovementPO raises an internal movement PO from an upload file as the operator; dry run previews every PO, line, price and origin; --bill dry-runs billing of the raised POs  
37826 7 d 3 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)  
37825 7 d 3 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ feat(cron): --autoBillMovement bills internal movement POs (dry run by default)

Bills the orders a movement PO raised the way the order management screen does:
orders parked on the Dummy (brand without a source mapping) are re-pointed to the
source vendor warehouse holding the stock (split when it spans several), serialized
units take IMEIs oldest first at qty 1 with a good last scan, then acceptOrders ->
addBillingDetailsForGrouppedOrders -> checkOrderDispatchEligibility, one invoice per
transaction, all-or-nothing. IRN / e-way bill follow from the existing cron job.

Usage: --autoBillMovement --pos=PO1,PO2 --email=<operator> --provider=<id> [--live]
Dry run (default) plans and validates only - billing opens its own REQUIRES_NEW
transaction (createLoanForBilling) that a rollback would not undo. Refuses a
transaction over 900 invoice lines (NIC caps an IRN at 1000). Prints the invoice
list for --autoGrnInternal.
 
37824 7 d 6 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ feat(warehouse): add HR Gurugram warehouses 13368/13370/13372 to WAREHOUSE_MAP

HR-NSSPL/GGN, HR-NSSPL/DL and HR-NSSPL/UPW (seller 21 NSSPL-HR-GGN, 06AACCN9802G2ZI)
in WAREHOUSE_MAP and WAREHOUSE_NAME_MAP, so the PO / GRN destination lists, vendor
warehouse lookup, Solr availability fields and warehouse reports include them.
Labels are the warehouse display names; 'HR' stays 7720.
 
37823 7 d 6 h amit /trunk/profitmandi-fofo/src/main/ feat(seller): rebuild Sellers & Warehouses screen; PO supplier filter by warehouse; internal warehouse from active sellerwarehouse

Needs dao r37822 and the warehouseaddressmaster.active migration (applied on hadb1).

- Sellers & Warehouses (menu 113): SellerController is now a thin layer over
WarehouseSetupService. Seller list; per-seller physical warehouses with internal
store / supplier / Dummy / sequences, Active toggle and Change address (internal
stores follow); address list with Active toggle; New Address with city, pin,
contact and invoice preview; New Seller with GSTIN checks; New Warehouse creates
the OURS/BAD vendor 40 + Dummy shape. JSON posts; refusals come back as 400 text.
- PO create screen: vendor search takes the selected warehouse and lists only
suppliers mapped to it (/vendors?warehouseId); changing warehouse clears the vendor.
- Supplier create/edit: internal warehouse defaults to 0 and is picked from active
physical warehouses (transaction.sellerwarehouse.is_active), not WAREHOUSE_MAP;
validated on save. Fixes the edit form ticking "Internal Warehouse" for a stored 0
and saving the first option (7720), and the create form never sending it.
- jsVersion 441.
 
37822 7 d 6 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).
 
37821 7 d 8 h aman /trunk/ Lead Management: CSV download now also honours the lead table's search text (searchTerm), so the exported rows match the filtered rows on screen. Applies to both the fofo download and the V2 API download.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JjVXnkrysiXEa2YYRn4BqL
 

Show All