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


(MedC) #1

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!!


(Stephen Waite) #2

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


(MedC) #3

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

Thank you sincerely @stephenwaite


(Stephen Waite) #4

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


(MedC) #5

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 ?


(Stephen Waite) #6

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


(MedC) #7

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)


(MedC) #8

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?


(Stephen Waite) #9

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";


(MedC) #10

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


(MedC) #11

Added a small fix: