Hi everyone. I am a new SW Developer at mi-squared and I recently received a question from a user that may be a common issue. Our user found that in the billing invoice, the format of the statement client address is about three characters too far to the left. Here I will walk the reader through viewing the invoice, reproducing the alignment error and demonstrate how to fix it.
Displaying the Invoice in a PDF Format
Make sure that you have the Patient selected. There should be charges and a history.
Under the Fees menu, select billing
Click on EOB's
This should open a new screen which allows you to search. Enter your criteria, press search
This will let you select PDF Download Statements Clicking on this will open
the invoice. It is here where the "Client Address" is misaligned.
Fixing the Alignment
At the time of this entry, lines 169 - 172 of the statement.inc.php contain the 'sprintf' statements that control the alignment. The location of the file is in the openemr->sites->default folder.
Welcome to the project! Funny after processing thousands of these, the misalignment never caught my eye. Looks to me that the clinic billing address is the text that is out of place. If that text was brought to the left a few spaces, it would line up with the patient info above the date below. What do you think?
welcome and I am looking forward to you explanations. This time I don’t get what you explained. To me the upper part and the correction part are the same as they are in the file…
There are two solutions to this and it depends on your preferences. The first bit of code will display the total amount due at the top of the page, filling the empty space with the total value. Note that at the bottom of the invoice, the total bill is redisplayed to the user.
The other option is to remove the line containg the variable $label_totaldue, resulting in the total bill being displayed once, instead of twice.
```
$out = sprintf("%-30s %-23s %-s\n",$clinic_name,$stmt['patient'],$stmt['today']);
$out .= sprintf("%-30s %s: %-s\n",$clinic_addr,$label_chartnum,$stmt['pid']);
$out .= sprintf("%-30s %-s\n",$clinic_csz,$label_insinfo);
$out .= "\n\n";
```