Invoice pdf format

When printing patient invoices for mailing there is undesirable formatting where it would print over 2 or 3 pages. Some pages are blank or just contain a couple lines. And the patient mailing address is unavailable to trifold for window envelop which would display the address for mailing. I have reviewed the relevent files but dont have the mpdf or ezpdf expertise to modify the coding. Id be willing to donate or pay to have this corrected and contribute the file to the code base. It becomes labor intense to print address labels, match with 2 or 3 pages of a single charge printed invoice and mail out.

Todd

I pointed this out in June of 2021. Can we please get this fixed soon? Our statements looked fine in v6. Now even the plain text versions look awful, it’s embarrassing for us to send out these statements. No combination of the “Use Custom Statement” checkbox and “Modern/Images” drop-down will produce a professional looking invoice.

Hope to get this contributed soon

hi, just submitted the PR, feel free to test it out and provide feedback, thank you.

openemr_statements - 2024-12-06T160735.340.pdf (93.2 KB)

Hi

Ive copied the files affected by the PR and there is still the same output. Again, I am going to fees, posting payments, invoice search and the checking ppt for the item i desire and the clicking download pdf with the without update box checked. Im on 7.0.2 patch 3.

Todd

Thanks @toddmleleux, additionally you have to place the png file in the sites/default/images and then enter the filename and choose PDF custom statement in the statement appearance drop down.

After doing that i get the following error. I tried custom_statement.png and statement.png as the filename but I think that is unrelated.

Fatal error : Uncaught Error: Call to undefined function sidDate() in /var/www/xxx/openemr/sites/default/statement.inc.php:1359 Stack trace: #0 /var/www/xxx/openemr/sites/default/statement.inc.php(58): create_cms_statement(Array) #1 /var/www/xxx/openemr/interface/billing/sl_eob_search.php(707): make_statement(Array) #2 {main} thrown in /var/www/xxx/openemr/sites/default/statement.inc.php on line 1359

Todd

thanks, add this to the bottom of statement.inc.php please

function sidDate($date)
{
    $strtotime = strtotime($date);
    return date('m d y', $strtotime);
}

Excellent

Thanks that did the trick to use the new format. However, in the remit to area of the invoice its missing my office name, address, etc

Todd

hi @toddmleleux, you have to add that to the blank statement png with a tool like gimp.

Hello and thanks for doing this. I was able to get it to work as you detailed by editing the .png file with my header and address information. Excellent work. You saved alot of trees with this fix.

Todd

1 Like

After updating the files, I have having a problem with posting payments section where the EOB/ERA is document is uploades and invoices are searched by name or date.

the logs give me this error

OpenEMR.ERROR: Not all selected assets were included in header {“selectedAssets”:[“popper”],“foundAssets”:[“jquery”,“bootstrap”,“utility”,“main-theme”,“compact-theme”,“textformat”,“dialog”]} , referer: https://xxx/interface/reports/pat_ledger.php?form=1&patient_id=31232

Could this be related to changes in those 3 files?

Todd

Where is this “blank statement png”
located?

Hi @hitechelp, it’s in the PR, link is above in this thread.

Hi Stephen,

I’m at Patch 3 but the statement format is still wonky no matter what options I try in the config. How do I fix this?
Stmt_Andy_1155-14.pdf (230.7 KB)

Hi

You have to goto admin, billing and under the area where you changed it to statement.png you also need to change Statement Appearance to custom pdf statement.

Todd

hi @toddmleleux , thanks for the feedback, unable to reproduce the errors.

hi @hitechelp, goal is to get this into the next release instead of having to manually patch up if you don’t mind waiting a few weeks.

1 Like

nvm my reply in that thread. Looking forward to it.

This is my experience with testing the changes. There needs to be some text wrapping for the description, possibly in other places where text might be too long. The description pushes subsequent columns out of position.

Is it possible to apply this to the payment receipts generated from going through “payment” and “checkout” under the fees menu?

The email option in the posting payments screen sends a less desirable email. This is one reason I am not that comfortable with it since staff might accidentally click it. I would be good to have that send the pdf along with a preset message for the email content.

I was thinking the ideal end state of this would be an interactive page where you can move boxes around a blank screen. The boxes would be filled with data pulled from the database and settings like your business name and whatever other information you choose for your invoices, along with a chosen background. Then I remembered the document template does some of this. The freedom to customize to that degree would be a nice place to leave this. Selecting what template to use for each endpoint.

Does cezpdf not have a built in way to limit character count in a column?

1 Like