Bug 21791

Summary: Add payment type on Cash register report (cash_register_stats.pl)
Product: Koha Reporter: Marjorie Barry-Vila <marjorie.barry-vila>
Component: ReportsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: ephetteplace, martin.renvoize, patrick.robitaille
Version: 18.05   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13985
Change sponsored?: --- Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 18786    
Bug Blocks:    
Attachments: UNTESTED patch

Description Marjorie Barry-Vila 2018-11-08 16:39:14 UTC

Tested on 18.05.03, payment type (see bz 18786) are not display on cash register statistics (cash_register_stats.pl).

Comment 1 Marjorie Barry-Vila 2019-12-20 16:19:01 UTC
Comment 2 Eric Phetteplace 2020-01-29 23:46:58 UTC
Created attachment 98104 [details] [review]
Comment 3 Eric Phetteplace 2020-01-29 23:53:29 UTC
I took a pass at adding this field but I'm not sure if it will work; I didn't test on a sandbox instance. One question I had: the values of accountlines.payment_type come from the PAYMENT_TYPE authorized values. Should the report show the field's literal value (the code) or its (more readable) associated Description? I lean towards showing literal values as they tend to be more consistent over time but I'm not sure if there's a standardized approach for Koha.
Comment 4 Martin Renvoize 2020-01-30 07:49:52 UTC
I would say for an inbuilt report like this one then translating codes to descriptions is the preferred approach.. however this is a great start.

Just to note, however, I am currently considering a patch to merge payment_type into credit_types as I'm not sure that having two levels of 'type' makes sense now that we have a clearer distinction between 'credit' and 'debit' lines.

I'd be interested in feedback for that approach.. are there really times when one would want `pay` + `cash` or `credit` + `beans` vs just having `cash`, `card` and `beans` as a top-level credit type?
Comment 5 Eric Phetteplace 2020-01-30 20:24:06 UTC
Ah OK I will hold off working on this then. For what it's worth, I agree that the payment type/credit type setup seems redundant, but I'll ask our staff what they think about it, too.