Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37091 7 h 56 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/order/ Bulk orders: enforce combo requirements for RBM/SALES creators

Bulk PO path skipped combo validation, letting RBM/SALES-created bulk orders bill a
combo main without its required side(s). Now, when the creator holds an RBM(18) or
SALES(4) position, run the existing cart-path comboService.validateCombo on the
per-partner cart (already built via cartService.setCartItems) right before the
transaction is created. Restrict-only: throws 'Missing required Qty for Combo' if a
side is missing; never auto-injects. Gate fail-open; other creators (incl AUTO PO) unaffected.
 
37090 12 h 29 m amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ partnerPerformance: cut per-request query load

- Live-read credit utilization from sd_credit_requirement (match Wallet page, not the 3h-cached blob)
- Remove dead duplicate order query + hot-path debug logging
- Batch monthly targets; use fofoId-scoped billing-avg and month-bucketed earnings queries
(getEarning arithmetic unchanged); drop dead category-upgrade query
 
37089 12 h 29 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ Optimize partnerPerformance data access: fofoId-scoped + month-bucketed query variants

- Order: fofoId-scoped billing-avg named queries (replace all-partner scan+filter)
- MonthlyTarget: selectByDatesAndFofoId batches 7 per-month lookups into one
- SchemeInOut/OfferPayout: month-bucketed ...ByMonth earnings queries collapsing the
per-month loop; new MonthlyBrandIncomeModel / MonthlyOfferPayoutModel
All additive; existing shared queries and their callers unchanged.
 
37088 12 h 35 m amit /trunk/profitmandi-fofo/src/main/ Add Warehouse column to purchase order listing (warehouseId -> name via WAREHOUSE_MAP)  
37087 12 h 36 m amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Partner limit read-phase per-partner isolation + drop dead reject wrapper

- PartnerLimitHelper.calculateChangedPartnerLimits: wrap the per-partner body in
try/catch so one partner's bad data (null limit/util in compareTo, or a
billing-date / risk lookup failure) no longer aborts the whole read phase and
silently updates zero partners every 20 min. Mirrors the write phase's
REQUIRES_NEW isolation.
- Remove dead ScheduledTasks.rejectPriceDropsOfApprovedImeis wrapper; the
@Scheduled trigger now delegates to PriceDropBatchService.
 
37086 12 h 36 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/pricing/ Remove dead rejectPriceDropsOfApprovedImeis (superseded by PriceDropBatchService)

The noon reprocess now runs via PriceDropBatchService (per-drop REQUIRES_NEW);
the old single-transaction PriceDropService.rejectPriceDropsOfApprovedImeis and
its interface declaration have no remaining callers.
 
37085 12 h 36 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/invoicing/ Show PO No and Order Date on transaction invoices/delivery challans

Populate InvoicePdfModel.orderDate (order createTimestamp) on every invoice
and delivery challan. Populate poNumber from the mapped warehouse PO for
internal-PO-derived orders, falling back to the transaction id as the PO
number for non-internal orders. Display-only; no e-invoice/IRN impact.
 
37084 12 h 37 m ranu /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/ v2 version some fixes  
37083 13 h 47 m amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Wire noon price-drop cron to per-drop batch (PriceDropBatchService)

@Scheduled("0 0 12") now delegates to
BatchScheduledTasks.reprocessPriceDropsWithBatch() -> PriceDropBatchService,
so each price drop commits in its own REQUIRES_NEW transaction instead of one
~20-min transaction holding user_wallet locks and timing out live
wallet/order/scan traffic at noon.

Requires profitmandi-dao PriceDropBatchService / PriceDropProcessingHelper.
 
37082 13 h 48 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/pricing/ Fix noon price-drop lock storm + wallet-rollback divergence

Per-drop transaction isolation for the noon price-drop reprocess, mirroring
the offer batch pattern (OfferBatchService / OfferProcessingHelper):
- PriceDropProcessingHelper: readOnly id fetch + REQUIRES_NEW per-drop
reprocess (processPriceDrop) + markItemSuccess
- PriceDropBatchService: no-@Transactional orchestrator - fetch ids,
createBatch, per-drop loop with markItemFailed, finalizeBatch

Previously the whole reprocess ran under ScheduledTasks' class-level
@Transactional as one ~20-min transaction, holding user_wallet
PESSIMISTIC_WRITE locks for the entire run and timing out live
/addAmountToWallet, /create-order and /scanSerialized at noon
(LockAcquisitionException).

Also narrow the rollback catch in PriceDropServiceImpl from Exception to
ProfitMandiBusinessException: lock/DB failures now propagate and roll back
the drop's REQUIRES_NEW unit (stays APPROVED, retried next run) instead of
being swallowed while the IMEI is marked REJECTED with the payout still in
the partner's wallet.
 
37081 14 h 8 m ranu /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/ old version app disabled for rbm  
37080 14 h 9 m amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/service/biuedart/ T16: split ShippingRequest.java into one-class-per-file (Services/Request/Consignee/ReturnAddress/Commodity/Dimension/ItemDetail/Shipper/Profile) to fix intermittent gradle incremental 'cannot find symbol Services/Request' Bluedart build failures; no logic change  
37079 14 h 36 m ranu /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/ old version app disabled for rbm  
37078 14 h 39 m ranu /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/ old version app disabled for rbm  
37077 16 h 8 m ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/ old version app disabled for rbm  
37076 16 h 13 m vikas /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/ Added leave option on UnScheduled/Not Started/Agenda Missing  
37075 16 h 27 m ranu /trunk/profitmandi-fofo/src/main/webapp/WEB-INF/views/ftl/ old version app disabled for rbm  
37074 17 h 25 m amit /trunk/profitmandi-dao/src/main/resources/sql/ Add T3.1 re-tag SQL: manual scheme-reversal legs ADDITIONAL_SCHEME -> OTHERS

One-time reconciliation applied to hadb1: 19 manual scheme/incentive clawback
wallet legs (Rs 2,25,110) whose offer_payout was never rejected (MARGINS CN still
stands) were re-tagged ADDITIONAL_SCHEME -> OTHERS so the account-statement
scheme-adjustment line nets out. Money unchanged (reference_type + description
only). Includes backup + verify + rollback. Backup table
transaction._bak_addl_scheme_others_20260710.
 
37073 1 d 7 h vikas /trunk/ Leave Email Notification to HR  
37072 1 d 9 h amit /trunk/profitmandi-fofo/src/main/ PO creation: alert on missing approved vendor price + JS version bump 378 (T10); POST whitespace sanitizer deserializer + VendorController search fix (T9.5)  
37071 1 d 9 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Normalize whitespace on Catalog/Item setters + ItemLoaderService bulk upload (T9.5 sanitizer)  
37070 1 d 9 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/ Add StringUtils.normalizeWhitespace for input whitespace normalization (T9.5 sanitizer dependency)  
37069 1 d 10 h vikas /trunk/profitmandi-web/src/main/ Added revisit option  
37068 1 d 11 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/scheme/ processSchemeOut: resolve OUT schemes on order create date, not GRN billing date

OUT schemes (sellout, special support, category, hygiene) are earned at the
sale event, so scheme eligibility must be pulled on fofoOrder.createTimestamp,
not each IMEI's GRN billing date. Reverts the r36397 date-basis change (which
pinned OUT to GRN date to 'align with IN behaviour' - but IN and OUT are
different events). The scheme_item date-windowing feature from r36397 is kept
intact; only the lookup date reverts to the order create timestamp.
 
37067 4 d 7 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/order/ Fix null state code on FOFO partner-to-customer sale-return credit note: populate partner/customer address state codes via StateRepository lookup (were unset)  
37066 4 d 7 h amit /trunk/profitmandi-common/ Modular invoice/note PDF generation: extract DocumentRenderer + reusable sections + two-axis tax abstraction out of PdfUtils (now thin shims); folded per-tax invoice columns; note Invoice-Ref + type detection; golden-image test harness  
37065 4 d 9 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Block scheme/CN-backed reference types from the wallet bulk-upload sheet

Manual scheme/incentive clawbacks posted from /wallet/upload as ADDITIONAL_SCHEME
(or any CN_WALLET_REFERENCES type) leave the offer_payout un-rejected, so the
month-end MARGINS credit note is over-issued and the account-statement
scheme-adjustment line breaks. Pre-validate the whole sheet and reject up-front;
manual scheme recoveries must be posted as OTHERS.
 
37064 4 d 10 h ranu /trunk/profitmandi-fofo/src/main/ edit lead on bgc can schedule  
37063 4 d 10 h vikas /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Plan a beat now sequence arranged by distance  
37062 4 d 10 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/ Revert PdfUtils to pre-refactor version (r36674) to unbreak trunk; modular doc-generation refactor still in progress  
37061 4 d 11 h vikas /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Plan a beat now sequence arranged by distance  
37060 4 d 11 h vikas /trunk/ Plan a beat now sequence arranged by distance  
37059 4 d 12 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/invoicing/ Revert order date and PO number wiring from invoice model in InvoiceService  
37058 4 d 13 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ Add regenerateBilledInvoices CLI task (--fromTime/--toTime) to re-generate invoice PDFs over a billing window; qualify InvoicePdfModel reference after the PdfUtils/DocumentRenderer refactor  
37057 4 d 13 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Add admin Order Report (CSV) with month-bounded date range; scope non-admins to their own store and fix NPE on blank admin fofoId (Integer/int ternary unboxing) in downloadOrderReport  
37056 4 d 13 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Publish FLAGSHIP_UPDATED event on flagship add/remove so the model's Solr listing is reindexed  
37055 4 d 13 h ranu /trunk/ allocation of hid and opening stock suggested qty logic updated as per tarun sir  
37054 4 d 14 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/invoicing/ Invoicing: durably record terminal IRN failures via markEInvoiceFailed (REQUIRES_NEW) with einvoice_details.irn_error_message; add regenerateBilledInvoices for in-place PDF regeneration over a billing window; stamp order date and mapped PO number onto transaction invoices; use the real interest-bearing loan (not the flagship limit block) for credit terms  
37053 4 d 15 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/event/ Add FLAGSHIP_UPDATED tag-listing event to trigger Solr reindex when a model's flagship status changes  
37052 4 d 15 h amit /trunk/profitmandi-common/ Delegate invoice/note PDF rendering to DocumentRenderer; add poNumber/orderDate to InvoicePdfModel; add pdfbox test dep + captureGolden flag for golden-image tests