Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37380 26 d 22 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Fix /saleDetails 500 on insurance-only orders and null billing name/phone

Two defects on the sale-details screen, both from a legitimately-empty source.

1. /saleDetails 500s on an insurance-only order. A policy is not a catalog item,
so an insurance sale carries no fofo_order_item row; itemIds comes out empty and
itemRepository.selectByIds hits GenericRepositoryImpl.selectAllByInOrderByDesc,
which throws "List should not be empty" to guard against an empty IN (). The
same guard already exists two methods below at the sale-search site, so this
carries it across to the detail site. 346 orders across 95 partners are affected
- every insurance-only order ever written. The screen already loads the policies
and the view renders them, so nothing else was needed to display the sale.

2. Billing name and phone rendered as the literal
.getName(). A plain POS sale does not require an
address (only insurance does), so ~140k orders across 1038 partners carry
customerAddressId 0 and the lookup returns null. The existing guard covered the
address *string* but the object was added to the model unconditionally, and
Velocity prints an unresolvable reference verbatim. Fall back to the customer's
own name and mobile, which the invoice PDF already does via
OrderServiceImpl.createCustomAddressWithoutId - so screen and invoice now agree.
The fallback is transient and never persisted; a missing customer row is
swallowed deliberately, since this feeds a display field and throwing would turn
blank text into a 500.

Applied at both model-writing sites in this controller.
 
37312 34 d 5 h ranu /trunk/ one assist ew at 99 up to 20k  
36951 81 d 18 h ranu /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ caching fix fofo icici  
36950 81 d 18 h ranu /trunk/ caching fix fofo icici  
36937 83 d 3 h ranu /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ caching fix fofo icici  
36884 88 d 22 h ranu /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ deena nath gupta has all access to bulk order approve  
36791 104 d 4 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Mark rejected PO order rows on transaction rejection

In OrderController.updateApprovalStatus reject branch, after the wallet
refund and loan settlement, call cancelRejectedTransactionOrders so the
rejected PO's order rows move to PO_REJECTED and drop out of pending
indent. Previously they were left in status=0, permanently inflating the
partner's account-statement pending indent. Requires dao r36790.
 
36519 129 d 2 h aman /trunk/ Fix:First Po  
36394 143 d 3 h amit /trunk/profitmandi-fofo/src/main/ Add IMEI net-margin modal on order-index billing panel.

New /getImeiNetMarginModal endpoint: given an IMEI, derives the
purchase-billed date from the IMEI's purchase order
(InventoryItem.purchaseId -> Purchase.purchaseReference -> Order.billingTimestamp),
fetches schemes applicable on that date via PriceCircular, and shows
per-scheme contribution, NLC, and net margin in a slim modal.

Effective DP = inventory_item.unit_price - max(0, price_drop_amount)
to match SchemeServiceImpl.createSchemeInOut/PriceCircularService.getPayouts.
Offers are intentionally excluded. Per-IMEI price-drop history is
shown for reference.
 
36151 168 d 5 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Switch /credit-note/{id} to use generateInvoiceV2 for new clean PDF format  
36064 175 d 21 h aman /trunk/ Fix:FULL_Stock flow , fin service mark unapplicable ,send invoice to whatsapp by default, update contact list ,Training mail issue  
36024 181 d 21 h aman /trunk/ Fix:Exclude non working days and approval flow based on role and PO type.  
36008 183 d 21 h aman /trunk/ Fix:Redesign the Po Approval page add total count, Add mail in bcc for testing , partnerpending task api response optimisation,  
35971 191 d 22 h aman /trunk/ Feat : Loi 2.0 Enhancement and redesigning  
35965 194 d 3 h amit /trunk/profitmandi-fofo/src/main/ Add bulk order approval report - new endpoint, view template, and JS handlers for date-filtered approval reporting  
35746 217 d 22 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ Fix: Handle empty item list in searchOrderDetails endpoint

Added empty check before calling itemRepository.selectByIds() to prevent
invalid SQL IN clause exception when invoice has no items.
 
35737 218 d 1 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ OrderController: fix N+1 queries, replace e.printStackTrace with LOGGER, fix string concat in logging, make accessoriesDeals static final  
35726 218 d 21 h vikas /trunk/ Pinelabs offer discovery on billing and stock page  
35501 261 d 4 h ranu /trunk/ today offer modal done  
35269 311 d 0 h ranu /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/ insurance remove on same time  

Show All