Bug #820
openTurning off "Payment details" and "Amount in words" in Document settings doesn't actually remove them from the real printed bill
0%
Description
Where: Admin -> Documents -> Laboratory bill / tax invoice -> Settings (and the real print it controls: Billing -> Bills -> row menu -> Print receipt)
How bad: High -- the Settings page for a document is supposed to control what's on it. Right now it doesn't, for at least two sections, so a hospital that deliberately switches something off is not getting what it asked for on every real bill handed to a patient.
Where tested: nssh.test.clinq.health, San Jose St. Bonaventure Hospital
What I did:
- Opened Admin -> Documents -> Laboratory bill / tax invoice -> Settings.
- Confirmed "Payment details" and "Amount in words" are both switched OFF (checked this twice, including after a fresh page reload, so this is the actual saved setting, not just an unsaved toggle on screen).
- Went to Billing -> Bills, found a real, already-paid lab bill for this same hospital (BILL-1-00247, patient "alminta"), and used the row's "Print receipt" action -- the same action the Settings page itself says this document is "Printed from" (it literally says "Printed from Billing > Bills > Print" right under the template name).
- Pulled the actual PDF file the system generated for that bill and read its real content (not just a screenshot).
What should happen: Since both "Payment details" and "Amount in words" are switched off, the printed bill should not show the amount written out in words, and should not show the payment information section (payment mode, amount paid, balance, signatory line).
What actually happens: The real PDF for BILL-1-00247 clearly includes both, word for word:
- "Amount in words: Five Hundred rupees only."
- A full payment section: "Mode: Cash", "Paid: Rs 500 - Balance: Rs 0", and "Authorized Signatory"
So the Settings toggles have no effect on what the patient actually receives.
One thing worth checking on the dev side: the Preview tab's sample data shows the document under a different heading ("TAX INVOICE - Laboratory services") than the real bill does ("Billing - payment receipt"). That difference might just be normal -- the heading may change depending on whether GST applies to the bill (this particular bill is tax-exempt) -- but it's worth confirming that the Settings page is actually talking to the same print path it claims to control ("Printed from Billing > Bills > Print"), and not a different one.
How often it happens: Every time -- checked once carefully with a real, already-paid bill, and both missing sections showed up anyway.
Real example: Bill BILL-1-00247, hospital San Jose St. Bonaventure Hospital.
What devs should check: Why the saved Settings values for this document ("Payment details": off, "Amount in words": off) aren't being read by whatever generates the real PDF for Billing > Bills > Print receipt -- and whether that's the same template as the one shown in the Preview tab.
RH Updated by Roshni Harish. 1 day ago
Follow-up: checked the remaining toggles too -- same bug, confirmed on a second, completely different bill (to rule out a cached PDF being the reason).
Current saved Settings for this document (fresh page reload, not just an on-screen toggle): Payment details = OFF, GST breakdown = ON, Amount in words = OFF, Signature = OFF (all three "off" ones were re-confirmed off on reload).
Printed BILL-1-00216 (alminta, same hospital, a bill that had never been printed before in this check -- so this wasn't a cached file from an earlier print) and read the real PDF content:
- "Amount in words: Two Thousand rupees only." -- still there, should be off.
- A full "PAYMENT" section (Mode: Cash, Paid: Rs 2,000, Balance: Rs 0) -- still there, should be off.
- "Authorized Signatory" line -- still there, should be off (Signature toggle is now off too, and it still shows).
So it isn't just "Payment details" and "Amount in words" -- Signature is also not being honoured. None of these three toggles currently have any effect on the real bill. (GST breakdown is still switched on, so I couldn't test whether turning that off would also be ignored -- would need a bill where GST actually applies, since this hospital's lab bills here are tax-exempt.)
This confirms the problem is not specific to one toggle or one bill -- it looks like the real print path for this document isn't reading the saved Settings at all right now.
RH Updated by Roshni Harish. about 18 hours ago
- Priority changed from High to Low
Sravan's read is correct -- re-tested everything directly and confirmed each point.
-
CONFIRMED (our original report was wrong here): a PAID bill's "Print receipt" action does NOT use the "Laboratory bill / tax invoice" document I was adjusting Settings on. It uses a separate document, "Payment receipt (A5)" (code billing-payment-receipt). That document's own Settings page has only two toggles -- "Amount in words" and "Signature" -- and NO "Payment details" toggle at all. Both of its toggles were switched ON, which is exactly why the amount-in-words line and the payment/signature info kept showing on every paid bill I printed. Not a bug -- I was checking the wrong document's settings.
-
CONFIRMED: on an UNPAID bill, the "Print bill" action correctly uses the "Laboratory bill / tax invoice" document, and its Amount in words and Signature switches DO work there. Checked this directly on BILL-1-00261 (Finalized, unpaid, same hospital): with both switched off, the real PDF has no "Amount in words" line, and the footer reads "This is a computer-generated document and does not require a physical signature" instead of a signature block. Both correct.
-
REMAINING REAL BUG (narrower than first reported): on that same unpaid-bill invoice, with "Payment details" switched OFF, the PDF still prints the "PAYMENT" heading and the "Paid: Rs 0.00 - Balance: Rs 1,700.00" line. Only the "Mode: ..." line is actually removed. So this one toggle is genuinely partial -- it should be hiding the whole Payment block but isn't.
-
CONFIRMED: the "Printed from" text on both document Settings pages is misleading. Both say "Printed from Billing > Bills > Print" without making clear that a paid bill and an unpaid bill route to two different documents with two different (and non-overlapping) sets of toggles. That's what caused this mix-up in the first place, and would likely trip up the next person who touches these settings too.
Thanks for catching this, Sravan -- scaling back the scope of this ticket to just point 3 and 4 above. Items 1 and 2 are working as intended and not bugs.