Payment method showing as "unknown" in Reports -> Financial -> Pmt Method

Hi,

I’m trying to use the payment method report at Reports -> Financial -> Pmt Method to see the totals for payment made with cash and payment made with card.

But as you can see below, they are all showing as “unknown” for the payment method, regardless of whether we enter the ‘cash’ or ‘credit card’ option at checkout in the clinic.

Where on openemr do I need to enter the payment method for it to show on this payment method report?

Thank you!!

hi @MedC, it looks like it’s not being captured, here’s the pull request to fix

1 Like

Wow, no kidding! Awesome work, I’ll clone the new receipts_by_method_report.php

Thank you sincerely @stephenwaite

after you do that take out these lines which apply to 5.0.2

1 Like

Thank you, I ended up just going line-by-line since the file has seen significant changes since 4.1.1

Weirdly the output is separating the payment method groupings as such:
image

Here’s what it looks like with the details box checked:
image

Any ideas why it’s grouping that way @stephenwaite ?

it might be the logic in the print method total, just updated the above pull request

I’ve updated your latest edit in the print method total, but no change, still the odd grouping. Mind taking a look at my code, since I’m running 4.1.1?

receipts_by_method_report.php (21.1 KB)

I’ve discovered a clue as to what’s going on, it seems the weird order the invoices display in is maintained before and after implementing the code changes. See here:

Before:

image

After:

image

Notice it is the same people in the same strange order. The breaks for “totals” simply occur when the payment method of one patient is different than the one below him/her. So the issue is not in printing the totals, but in the ordering of the invoices. Also the issue is not in your code changes @stephenwaite, as our patients were oddly ordered in the report before implementation.

Any idea as to what part in the code can order the patients payments displayed by grouping them into payment methods?

hi @MedC, it’s the order by on line 457 of your code; try
$query .= " ORDER BY s.payment_method, s.deposit_date, a.post_time, a.pid, a.encounter, fe.id";

1 Like

@stephenwaite You are a legend!! Thank you for taking the time, it works perfectly now.

1 Like

Added a small fix: