Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
36513 3 d 15 h amit /trunk/ Add running_balance to userwallethistory: persist wallet balance after each transaction for instant ledger display. Populate at all write paths (WalletService, adjustTransaction). Read directly in wallet statement template and CSV download. Includes backfill migration SQL. Renamed walletSummart to walletSummary.  
36498 5 d 16 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Add CN_CANCELLATION type for cancellation-reversal debit notes, distinguish from regular MARGINS  
36489 6 d 15 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/ Fix NULL handling in CN query NOT clause — reject/rollback IS NOT NULL guard prevents SQL three-valued logic from excluding valid rows  
36485 6 d 18 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/ Fix credit note queries: exclude same-period create+reject rows, replace BETWEEN with >= <= for performance, fix AND/OR precedence bug in SchemeInOut  
36471 9 d 13 h vikas /trunk/ V2 Profile Update APIs  
36470 9 d 13 h ranu /trunk/ code commit for reports section v2  
36327 22 d 19 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Fix currentinventorysnapshot/currentreservationsnapshot deadlock and optimize getFirstBillingDate

- SaholicInventoryServiceImpl: enforce reservation-snapshot → inventory-snapshot
lock order in addReservationCount and reduceReservationCount via explicit
session.flush(); eliminates the hadb1 deadlock recorded 2026-04-20 19:43:24
between these two methods' opposite-order writes.
- SaholicInventorySnapshot: add @DynamicUpdate so UPDATEs only rewrite the
changed column instead of all three — cuts redo/binlog write amplification
and makes deadlock dumps pinpoint the actual business path.
- TransactionRepositoryImpl.getFirstBillingDate: replace filesort-over-all-billed-
orders with MIN(billingTimestamp) via new Order.selectFirstBillingByRetailer
named query (Select tables optimized away). Preserves 2017-01-01 cutoff and
null-for-unbilled-partner semantics.
- Add @Cacheable on redisOneDayCacheManager keyed by fofoId (unless null) so the
8 call sites stop piling up identical SELECTs on the order table — this was
the query pinning Hikari slots at 150-460s each in recent processlist dumps.
 
36305 25 d 1 h amit /trunk/profitmandi-dao/src/main/ Batch processing infrastructure + per-partner offer processing + partner limit optimization + investment cache eviction on billing/payment/cancellation with 3hr TTL  
36218 35 d 21 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Credit/Debit note enhancements: add margin_month + cancelled columns, fofo_dn_sequence on sellerwarehouse, generateDebitNoteIrn for margin reversals, selectCancelledByMonth repo, generateDebitNotesForCancelled service, cn_date = ack_date, dedup by margin_month, source-based descriptions (Schemes/Offers vs Price Drop), skip negative margin line items for CRNs  
36185 39 d 19 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Persist and restore hsnCode on CreditNoteLine for CN re-rendering

- Add hsn_code column to CreditNoteLine entity
- Save hsnCode when persisting CN lines in issueMonthlyMarginsCN
- Read hsnCode back in getCreditNotePdfModel for downloadCN/sendCnMails
- Earlier CNs without hsn_code will render with blank HSN (nullable column)
 
36184 39 d 19 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Fix Credit Note IRN generation for monthly margins

- Add hsnCode to InventoryMarginModel, update 3 named queries to select ii.hsnCode
- Group CN items by taxRate+HSN, set hsnCode on CustomOrderItem
- Add getGenIrnRequest/getItemList overloads in GstProService for credit notes
- Fix IndexOutOfBoundsException from orders-items mismatch in generateCreditNoteIrn
- Wrap fofo and vendor loops in try-catch so one CN failure does not abort the process
- Send summary email with failure details to amit.gupta and ranu.rajput
 
36147 41 d 21 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Add original_invoice_number to credit_note for RETURNS type, increase PrecDocDtls cap to 10

CreditNote entity: added originalInvoiceNumber field
PurchaseReturnServiceImpl: set originalInvoiceNumber on RETURNS CN
CreditNoteServiceImpl: increased invoice ref collection from 4 to 10
GstProService: increased PrecDocDtls limit from 4 to 10
 
35997 60 d 14 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Invoice Return: PurchaseReturnOrder entity, ReturnAction DAO enum, receive/refund/reject service, ReturnOrderInfo selectByOrderId  
35995 61 d 13 h aman /trunk/ Fix:Redesign the Po Approval page, and po creation logic for first po, trail mails formatting fix  
35971 65 d 14 h aman /trunk/ Feat : Loi 2.0 Enhancement and redesigning  
35912 72 d 20 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Store loan-level overdue/penalty rates, dynamic credit terms and TnC via APIs

- Add overdue_rate and penalty_rate columns to Loan entity (frozen at creation)
- addInterest()/checkLoans() read from loan instead of global constants
- SDCreditResponseOut: add overdueRate, penaltyRate, creditTerms fields
- sdDirectService(): resolve effective credit days by partner type (20 for Diamond/Platinum)
- InvoiceService: build credit terms from loan rates instead of hardcoded strings
- Add reusable buildCreditTerms() helper in SDCreditServiceImpl
 
35880 75 d 14 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/ Remove dead blocked loan methods: selectBlockedLoans(retailerId) and getAllBlockedLoans() - zero callers. Keep selectAllBlockedLoans() as canonical. Remove unused Loan.findBlockedLoans named query (was buggy - missing settledOn filter).  
35876 75 d 14 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ 3-tier interest calculation, partner-aware dueDate, selectAllActiveLoan excludes limit blocks.

- Loan.java: add getPenaltyDate(), update isOverdue()/isDefault() to use it
- LoanRepositoryImpl: add limitBlock=false to selectAllActiveLoan queries
- SDCreditServiceImpl: add getTier1Days(), partner-aware dueDate in createLoan, rewrite addInterest/checkLoans with 3-tier rates, remove redundant isLimit filters
 
35864 75 d 20 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ Add limit_block column to Loan, replace freeDays >= 365 hack, fix free days resolution with sanction override  
35693 93 d 21 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/ Fixed SchemeService  

Show All