| Rev |
Age |
Author |
Path |
Log message |
Diff |
| 37024 |
13 d 21 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ |
FOFO add-to-cart: show held Live Demo IMEIs as disabled 'Sellable from <date>' checkboxes instead of falling back to quantity field |
|
| 36999 |
18 d 17 h |
amit |
/trunk/profitmandi-dao/src/main/ |
Price-hike deduction (self-contained): revert hike logic from price-drop flow + remove deduct_on_hike flag; add GRN hook (PurchaseServiceImpl, before schemes) and on-demand executor endpoint that debit under-charged units billed in the hike's [affected_on, created_on] window. Idempotent per (hike, imei). |
|
| 36958 |
20 d 19 h |
amit |
/trunk/profitmandi-dao/src/main/ |
Flagship credit: fire interest-free limits at billing + per-IMEI conversion
- createLoanForBilling now detects flagship lines inside the billing transaction (fixes the
REQUIRES_NEW visibility bug where flagship detection re-queried uncommitted invoice_number and
never fired). Creates one combined flagship limit (is_flagship=1, limit_block=1, 30-day deadline)
plus one transaction.loan_imei row per device.
- convertFlagshipOnSale / IMEI activation now convert only the sold device's slice (matched by IMEI),
so same-model siblings and other billing tranches keep their interest-free window; full convert at
30-day expiry. Lock order aligned (loan -> loan_imei) to avoid sale/expiry deadlock.
- New transaction.loan_imei table + LoanImei entity/repository (migration_loan_imei_table.sql).
- selectAllLoansByInvoice: PurchaseReturn now settles BOTH the real loan and the flagship limit on a
flagship-invoice return (prevents credit leak from a stranded limit).
- Cap guard (flagship credit never exceeds amount drawn) and robust limit settlement (paisa threshold
instead of exact float equality). |
|
| 36926 |
25 d 20 h |
amit |
/trunk/profitmandi-dao/src/main/ |
Link returnorderinfo to credit_note in DN-refund path (approveDebitNoteRefund)
approveDebitNoteRefund issues a RETURNS credit note but created the
ReturnOrderInfo rows before the CN and never set credit_note_id, so DN
returns showed a null FK (blank CN in reports) despite a valid CN existing.
r36817 only wired this FK into applyInvoiceReturnViaCreditNote. Collect the
created ReturnOrderInfo rows and stamp credit_note_id after the CN is
persisted (parity with the invoice-return path).
Add backfill_dn_return_credit_note_id.sql to link existing null-FK rows by
invoice -> RETURNS CN, excluding ambiguous multi-CN invoices. |
|
| 36925 |
25 d 23 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ |
Vendor catalog pricing: validate single-create path (reject non-positive ids/prices, null effectedOn) and gate vendor_item_pricing propagation behind the effected-date check so back-dated approvals no longer overwrite item-level prices |
|
| 36880 |
31 d 16 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ |
Harden bulk vendor catalog pricing upload: set creator authId, skip null rows, aggregate row errors, validate price sanity (tp/dp/mop>0) and duplicate/pending requests |
|
| 36817 |
40 d 19 h |
amit |
/trunk/profitmandi-dao/src/main/ |
Link returnorderinfo to credit_note via credit_note_id FK
Add a direct credit_note_id column on returnorderinfo so a return row
can be tied to the Credit Note it was refunded via, replacing the
indirect/ambiguous association through original_invoice_number + the CN
number embedded in refundDescription. Stamped in
applyInvoiceReturnViaCreditNote; migration adds the column and backfills
existing rows by parsing the CN number out of refundDescription. |
|
| 36719 |
54 d 14 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
Add total_amount to credit_note: new column + backfill from lines, populate at all 5 CN/DN creation points, fix account statement query (cn.created_at -> cn.create_timestamp) |
|
| 36624 |
60 d 19 h |
amit |
/trunk/profitmandi-dao/src/main/java/ |
Thrift cleanup: migrate types, remove dead code, add moved files
- Added Affiliate.java POJO (replaces Thrift struct)
- Moved from profitmandi-common: WalletHistoryModel, ExcelUtils, CustomOrder
- Removed dead createReturnTransaction method from ReturnService/Impl
- Removed dead getPartnerStockOnDate from InventoryService/Impl
- Replaced CatalogServiceException with Exception in PdfPoSheetGenerator
- Removed Thrift client imports from UserServiceImpl |
|
| 36578 |
64 d 19 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
Flagship credit: fix sale conversion to use invoice reference, add IMEI activation trigger
- Sale flow: removed unnecessary model_flagship table lookup at sale time. The flagship loan's invoice number already links to the purchase orders, making the date-based check redundant and incorrect (would miss conversions if flagship entry removed after billing).
- IMEI activation: added flagship conversion in addActivatedImeis() for newly activated serials. Groups by partner, checks flagship limits, converts via invoice matching. Covers Samsung/Vivo/Oppo/Realme activation crons and manual UI uploads.
- Repository: added date-parameterized selectActiveFlagshipCatalogIds(catalogIds, asOfDate) overload for future use. Existing method delegates with LocalDate.now(). |
|
| 36573 |
65 d 19 h |
amit |
/trunk/ |
refactor: extract RTV methods from PurchaseReturnService into ReturnToVendorService, add ReturnPermissionHelper and PurchaseReturnOrderStatus |
|
| 36568 |
65 d 20 h |
amit |
/trunk/ |
refactor: RTV - add local caching, batch queries, typed DTO, fix documentNumber overwrite and settledAmount validation |
|
| 36559 |
65 d 22 h |
amit |
/trunk/profitmandi-dao/src/main/ |
feat: auto-generate debit notes on RTV with proper DN/{prefix}/{sequence} numbering |
|
| 36558 |
65 d 23 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ |
RTV: always set lastScanType to PURCHASE_RETURN in markItemReturned (informational, not conditional on full drain) |
|
| 36544 |
66 d 18 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ |
Refactor RTV (Return to Vendor) flow: replace native SQL with repository/service methods, extract reusable helpers (resolvePurchase, resolveLineItem, markItemReturned, createPurchaseReturnEntity), fix availability bug by adding saholicInventoryService.reduceAvailability, validate returnability by currentQuantity>0 instead of lastScanType |
|
| 36507 |
72 d 12 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ |
Skip Credit Note IRN generation for Delivery Challan (DC) returns — same GSTIN on both sides causes NIC rejection. Cancel EWB best-effort instead. |
|
| 36477 |
76 d 14 h |
amit |
/trunk/ |
Invoice return: IRN/EWB cancellation on approve, Logistics L2+ permission, DL GST disabled
- approveInvoiceReturn now cancels IRN+EWB when cancellable (path B) before falling back to Credit Note (path A)
- DC/challan EWB cancelled best-effort before Credit Note path
- Added enabled flag to GstEInvoiceUser; DL GSTIN disabled in E_INVOICE_USERS and EWB_USERS
- isGstEnabled guard added to all public GST API methods in GstProService
- Logistics L2+ can now approve/reject invoice returns (not just Finance)
- invoice-return.vm uses canApproveInvoiceReturn for INV-prefix button visibility |
|
| 36455 |
77 d 23 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ |
Fix: populate saleQtyByKey for serialized items too, include DOA_IN in returnQtyByKey |
|
| 36450 |
79 d 17 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ |
Refactor applyReceipt: extract scan creation to WarehouseInventoryService.recordReturnScan with validation for all return types (SALE_RET/DOA_IN/SALE_RET_UNUSABLE), qty>0, sold-qty capacity check, and SALE_RET warehouse capacity check |
|
| 36449 |
79 d 17 h |
amit |
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/inventory/ |
Fix duplicate PurchaseReturnItem creation for serialized items - use list query with CREATED/APPROVED status check instead of single-result query |
|