Subversion Repositories SmartDukaan

Rev

Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37379 46 d 15 h amit /trunk/profitmandi-common/ Restore insurance lines on invoice PDFs dropped by the r37066 renderer refactor

The modular doc-generation extraction moved the item table into ItemsTableSection,
which iterates only DocumentData.items() -> model.getOrderItems(). The legacy
renderer also emitted a row per CustomInsurancePolicy (PdfUtils r36674, lines
241-261); that block was lost in the extraction and nothing consumed
getInsurancePolicies() any more.

Effect: an extended-warranty policy is not a catalog item, so it has no
fofo_order_item row. Insurance sold after the device sale gets its own invoice
whose only line is the policy, so the whole table came out empty and the totals
- which SummarySection derives from the table, not from FofoOrder.totalAmount -
printed as 0.00 / 'Zero Rupees Only' (e.g. HRJND1424/94). On a combined
device+insurance invoice the policy line vanished silently and the invoice total
and GST were understated by the premium. InsuranceController's insurer document
pack, whose model carries policies and no order items at all, hit an NPE.

Fold the policies in at DocumentData.items(), the single accessor every section
reads, so the fix covers all callers at once. Column mapping mirrors the legacy
renderer: quantity 1, no discount, taxable value repeated in the Rate column.
Only the applicable tax side is populated (CGST/SGST or IGST) rather than both
as the policy model carries them, matching how real order items are built, so
ItemsTableSection's taxAmount = cgst+sgst+igst stays correct on margin-scheme
invoices. With no policies the model's own list is returned untouched.

Tests: InsuranceInvoiceRenderTest asserts on extracted PDF text (insurance-only,
intra/inter-state GST split, combined invoice, and a no-insurance control), so it
holds on any machine unlike the pixel goldens; three golden baselines added.
Verified all 14 pre-existing golden fixtures render byte-identical before and
after.

Also set java.awt.headless=true on the test JVM: the golden harness rasterizes
through PDFBox, whose font handling calls
GraphicsEnvironment.getLocalGraphicsEnvironment() and made the forked JVM attach
to the macOS window server as a Foreground app, stealing focus on every run.
Test-only property, no effect on the built war.
 
37052 88 d 18 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  
36623 138 d 16 h amit /trunk/profitmandi-common/ Remove ThriftConfig dependency and Thrift client wrappers

- Removed ThriftConfig from build.gradle dependency
- Deleted entire thrift/clients/ directory (16 RPC client files)
- Removed Thrift-dependent methods from Utils.java (getRechargeDisplayStatus, getOrderStatus, getWarehouseClient, etc.)
- Deleted dead code: HelperServiceUtils.java, OrderObject.java
- Moved to profitmandi-dao: WalletHistoryModel.java, ExcelUtils.java, CustomOrder.java
 
36416 161 d 12 h amit /trunk/profitmandi-common/ Drop OkHttp, standardise on Apache HttpClient via HttpClientFactory. RestClient pool raised to 20/8, all construction routed through factory. Lint guard added to block direct OkHttp/createDefault usage.  
36244 177 d 23 h amit /trunk/profitmandi-common/ Upgrade javax.mail from 1.4 to 1.6.2 for TLS 1.2 support (required by Google Workspace SMTP Relay)  
32729 1028 d 11 h amit.gupta /trunk/profitmandi-common/ updated jackson databind core module  
30231 1651 d 18 h amit.gupta /trunk/profitmandi-common/ Fixed ahead issue  
30207 1666 d 14 h amit.gupta /trunk/profitmandi-common/ Fixed ahead issue  
29699 1756 d 19 h amit.gupta /trunk/profitmandi-common/  
29697 1757 d 7 h amit.gupta /trunk/profitmandi-common/  
29494 1804 d 17 h amit.gupta /trunk/profitmandi-common/  
27008 2228 d 10 h amit.gupta /trunk/profitmandi-common/  
26217 2452 d 18 h amit.gupta /trunk/  
25978 2493 d 19 h amit.gupta /trunk/profitmandi-common/  
25194 2652 d 17 h amit.gupta /trunk/profitmandi-common/  
24524 2787 d 14 h amit.gupta /trunk/profitmandi-common/  
23929 3001 d 17 h amit.gupta /trunk/ Fixed mailSending  
23885 3007 d 14 h amit.gupta /trunk/profitmandi-common/  
23879 3007 d 16 h ashik.ali /trunk/profitmandi-common/ Non billable items to be scan with refectoring  
23581 3087 d 19 h ashik.ali /trunk/profitmandi-common/ Able to edit order customer details from panel  

Show All