On cgi-bin/koha/admin/debit_types.pl, we have the option to filter down to only user-defined debit types, hiding those defined by the system. It would be helpful to also be able to filter to only those flagged for manual invoice and only those flagged for purchase. If we had a filter for purchasable items, we could then make the link off of the point of sale page point to debit types with that filter enabled.
Created attachment 117526 [details] [review] Bug 24491: Add optional filtering to debit types This patch adds a pair of additional checkbox filtering options to the debit types page so that you can filter down to just those type that are available for sale or available for invoicing, or available for both.
Looking for feedback on the UX here.. the implementation certainly isn't perfect. In the medium turn I'd like to convert the table to being api driven and use Jonathans patches for static links for table states.
This doesn't seem to be working consistently for me. I added a combination of debit types: - Invoicing - Sale - Invoicing and Sale On loading the table, Show Items for Sale / Show Items for Invoicing are both checked: - All debit types show Untick Show items for sale (Sale unticked, Invoicing ticked): - Nothing changes - this is incorrect as it is showing Sale only items Untick Show items for invoicing (Sale unticked, Invoicing unticked): - Sale only items show - feels incorrect, with both unticked nothing should show? Tick Show items for sale (Sale ticked, Invoicing unticked): - All Sale items show (Sale and Invoicing+Sale) - this is correct Tick Show items for invoicing (Sale ticked, Invoicing ticked): - All Invoicing items show (Invoicing and Invoicing+Sale) - Sale only doesn't show - this is incorrect, it should be like the initial load with all debit types showing Untick Sale items (Sale unticked, Invoicing ticked) - All debit types show - this is incorrect, Sale only items should be hidden Tick Sale items (Sale ticked, Invoicing ticked) - All Sale items show (Sale and Invoicing+Sale) - Invoicing only doesn't show - this is incorrect, Invoicing should show Untick Invoicing items (Sale ticked, Invoicing unticked) - Sale only items show - Invoicing+Sale and Invoicing don't show - this is incorrect, as Invoicing+Sale should show From a UX perspective, I think it's not clear whether 'Show items for sale' and 'Show items for invoicing' being ticked together is saying 'Show all items', or whether it's saying 'Show items which are Sale+Invoicing, excluding Sale only / Invoicing only'. Is there a use case for seeing Sale only (excluding Sale+Invoicing) and Invoicing only (excluding Invoicing+Sale)? Maybe a drop down menu would be easier to explain what should happen on selection e.g: Show all debit types - default on page load Show all Sale (Sale and Sale+Invoicing) Show Sale only (Sale) Show all Invoicing (Invoicing and Sale+Invoicing) Show Invoicing only (Invoicing) Show Sale and Invoicing (Sale+Invoicing, excluding Sale only and Invoicing only)
Jake is working on consistency around these sorts of filters.. I'll work with him to get this fixed up and working in the new style once he's got a little further down that path.