Subversion Repositories SmartDukaan

Rev

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

Filtering Options

Rev Age Author Path Log message Diff Changes
37379 48 d 1 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.
 
/trunk/profitmandi-common/src/test/java/com/spice/profitmandi/common/document/golden/InsuranceInvoiceRenderTest.java
/trunk/profitmandi-common/src/test/resources/golden/v2-insurance-combined-p0.png
/trunk/profitmandi-common/src/test/resources/golden/v2-insurance-only-inter-p0.png
/trunk/profitmandi-common/src/test/resources/golden/v2-insurance-only-p0.png
/trunk/profitmandi-common/build.gradle
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/document/DocumentData.java
/trunk/profitmandi-common/src/test/java/com/spice/profitmandi/common/document/golden/GoldenInvoiceV2Test.java
/trunk/profitmandi-common/src/test/java/com/spice/profitmandi/common/document/golden/PdfFixtures.java
37052 90 d 5 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  
/trunk/profitmandi-common/build.gradle
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/InvoicePdfModel.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/PdfUtils.java
36623 140 d 2 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
 
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/CustomOrder.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/services/HelperServiceUtils.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/services/mandii/OrderObject.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/ExcelUtils.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/WalletHistoryModel.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/thrift
/trunk/profitmandi-common/build.gradle
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/Utils.java
36416 162 d 23 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.  
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/web/client/HttpClientFactory.java
/trunk/profitmandi-common/build.gradle
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/web/client/RestClient.java
36244 179 d 9 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)  
/trunk/profitmandi-common/build.gradle
32729 1029 d 21 h amit.gupta /trunk/profitmandi-common/ updated jackson databind core module  
/trunk/profitmandi-common/build.gradle
30231 1653 d 5 h amit.gupta /trunk/profitmandi-common/ Fixed ahead issue  
/trunk/profitmandi-common/build.gradle
30207 1668 d 0 h amit.gupta /trunk/profitmandi-common/ Fixed ahead issue  
/trunk/profitmandi-common/build.gradle
29699 1758 d 5 h amit.gupta /trunk/profitmandi-common/  
/trunk/profitmandi-common/build.gradle
29697 1758 d 18 h amit.gupta /trunk/profitmandi-common/  
/trunk/profitmandi-common/build.gradle
29494 1806 d 3 h amit.gupta /trunk/profitmandi-common/  
/trunk/profitmandi-common/build.gradle
27008 2229 d 21 h amit.gupta /trunk/profitmandi-common/  
/trunk/profitmandi-common/build.gradle
26217 2454 d 4 h amit.gupta /trunk/  
/trunk/profitmandi-common/build.gradle
/trunk/profitmandi-web/build.gradle
25978 2495 d 5 h amit.gupta /trunk/profitmandi-common/  
/trunk/profitmandi-common/build.gradle
25194 2654 d 3 h amit.gupta /trunk/profitmandi-common/  
/trunk/profitmandi-common/build.gradle
24524 2789 d 0 h amit.gupta /trunk/profitmandi-common/  
/trunk/profitmandi-common/build.gradle
23929 3003 d 4 h amit.gupta /trunk/ Fixed mailSending  
/trunk/profitmandi-common/build.gradle
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/util/Utils.java
/trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/Application.java
/trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ScheduledSkeleton.java
/trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ScheduledTasks.java
23885 3009 d 0 h amit.gupta /trunk/profitmandi-common/  
/trunk/profitmandi-common/build.gradle
23879 3009 d 2 h ashik.ali /trunk/profitmandi-common/ Non billable items to be scan with refectoring  
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/InstructionItemRequest.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ScanInPartnerItemRequest.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ScanOutPartnerItemRequest.java
/trunk/profitmandi-common/build.gradle
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ProfitMandiConstants.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ScanInItemRequest.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/ScanOutItemRequest.java
/trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/model/task/DoRequestCallableTask.java
/trunk/profitmandi-common/src/main/resources/response-codes.properties
23581 3089 d 5 h ashik.ali /trunk/profitmandi-common/ Able to edit order customer details from panel  
/trunk/profitmandi-common/pom.xml
/trunk/profitmandi-common/build.gradle

Show All