---
type: redmine-readme
project: Endress + Hauser
subject: Delivery Challan print format changes
story_key: dc-print-format-changes
generated_at: 2026-10-16T16:56:59+05:30
story_type: feature
---

# Delivery Challan print format changes

> The Delivery Challan and Inward Return print formats now carry the office address in the footer, an LR number and balanced item columns.

## 1. Summary
Print format feedback: remove the fixed Regd. Office text from the header and move it to the footer; add the LR Number under the Vehicle Number; fix the Rate column going out of its box and narrow the Order Code/Ref No column. The formats `Delivery Challan` and `Delivery Challan - Inward Return` were updated in `fixtures/print_format.json`. Column widths alone did not fix large-value documents because the site's real PDF generator is wkhtmltopdf, which needs more width per character than a browser, so the item table got its own smaller scoped font size. Checked against the real generated PDF. Committed in `9c93020`.

## 2. Requirement
| # | Requirement | Source | Status |
|---|---|---|---|
| R1 | Remove the fixed Regd. Office address from the header and put it in the footer (office: 7B, 7th Floor, Godrej One, Pirojshanagar, Off Eastern Express Highway, Vikhroli (East), Mumbai-400079, Maharashtra, State Code 27) | User, 15 Sep | Done |
| R2 | Add LR Number below the Vehicle Number | User, 15 Sep | Done |
| R3 | Rate column values must stay inside the box; reduce Order Code/Ref No width | User, 15 Sep | Done |

## 3. Decisions
| Decision | Options considered | Why this one | Date |
|---|---|---|---|
| Give the item table its own smaller scoped font size | Keep adjusting column percentages | wkhtmltopdf needs more width per character than a browser; percentages could not fix large values | 2026-09-15 |
| Verify against the generated PDF, not the browser print preview | Browser preview | The preview had been hiding the overflow | 2026-09-15 |

## 4. Logic & Workflow
Footer carries the office address next to the existing Regd. Off. contact details. Transport Details lists Vehicle No. then LR No. The item table uses fixed column widths with its own font size so Rate percentages fit.

## 5. Files & Components Changed
| File / DocType / Fixture | Type | Change | Purpose |
|---|---|---|---|
| canofy_custom_eh/fixtures/print_format.json | Fixture | Changed | Print formats `Delivery Challan` and `Delivery Challan - Inward Return` |

## 6. Configuration & Deployment
`bench --site <site> migrate` (or `bench --site <site> import-fixtures`) loads the fixture. The print format's own `pdf_generator = chrome` setting is rejected server-side on this site and falls back to wkhtmltopdf.

## 7. Testing
| Test | Data / Site | Expected | Actual | Status |
|---|---|---|---|---|
| Real PDF output for a large-value DC | frappe.local, 15 Sep | No overflow or collision | Confirmed on the generated PDF | PASS |
| Printed document shows LR/Vehicle, footer address and three copies | E2E suite, 5 Oct | TC-074 passes | Pass | PASS |
| Inward print format renders CGST/SGST | E2E suite, 5 Oct | TC-083 passes | Pass | PASS |

## 8. Known Limitations & Open Items
- `pdf_generator = chrome` on the format is ignored on this site; Not confirmed whether the Chrome generator is planned.

## 9. Status
| Item | Value |
|---|---|
| Branch | claude/delivery-challan-wizard-bcb464 |
| Commits | `9c93020` Add Requested By/Contact fields, manual E-Way Bill entry, print format fixes (16 Sep 2026) |
| PR | Not confirmed |
| Version | Not confirmed |
| Deployed to | Local dev site only |

## 10. References
- Related: `dc-wizard-review-approval-ui`
