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.
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?
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:
After:
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";