Bug 18786 - Add ability to create custom payment types
Summary: Add ability to create custom payment types
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement with 10 votes (vote)
Assignee: Kyle M Hall
QA Contact: Tomás Cohen Arazi
URL:
Whiteboard:
Keywords:
Depends on: 14826
Blocks: 18790
  Show dependency treegraph
 
Reported: 2017-06-12 12:30 UTC by Kyle M Hall
Modified: 2017-12-08 09:31 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18786 - Update database (1.69 KB, patch)
2017-06-12 14:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18786 - Update schema (1.49 KB, patch)
2017-06-12 14:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18786 - Add ability to create custom payment types (10.20 KB, patch)
2017-06-12 14:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18786 - Add ability to create custom payment types (11.53 KB, patch)
2017-06-14 15:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18786 - Update database (1.82 KB, patch)
2017-06-14 20:27 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18786 - Update schema (1.62 KB, patch)
2017-06-14 20:28 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18786 - Add ability to create custom payment types (11.66 KB, patch)
2017-06-14 20:29 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18786 - Update database (1.82 KB, patch)
2017-09-29 15:25 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18786 - Add ability to create custom payment types (11.50 KB, patch)
2017-09-29 15:26 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18786 - Add ability to create custom payment types (11.68 KB, patch)
2017-11-15 14:12 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18786 - Update database (1.82 KB, patch)
2017-11-15 14:12 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 18786 - Add ability to create custom payment types (11.68 KB, patch)
2017-11-15 14:13 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2017-06-12 12:30:46 UTC
Some libraries would like to be able to specify more specific payment types such as cash, check, credit card, or even canned food ( for food drives ). This feature will allow a library to specify payment types as authorised values of the type PAYMENT_TYPE.
Comment 1 Kyle M Hall 2017-06-12 14:30:41 UTC
Created attachment 64202 [details] [review]
Bug 18786 - Update database
Comment 2 Kyle M Hall 2017-06-12 14:30:49 UTC
Created attachment 64203 [details] [review]
Bug 18786 - Update schema
Comment 3 Kyle M Hall 2017-06-12 14:30:52 UTC
Created attachment 64204 [details] [review]
Bug 18786 - Add ability to create custom payment types
Comment 4 Marc Véron 2017-06-14 12:44:30 UTC
Test plan was missing.

I tested with following steps:
Following test is OK:

- Apply patches
- Update database
- Add authorised value PAYMENT_TYPE with values 'Cash', 'Check', 'Credit card'
- Go to the fines section of a patron who has several fines
- Tab 'Fines'
- Click on 'Pay' for an individual fine
- Verified that in form  'Pay an individual fine' a dropdown appears with
  paxment types
- Selected a payment type, confirm payment
- Verify that payment type appears in "Description of charges" in tab 'Account'


Following is missing:
- Go to 'Fines' tab
- Use 'Pay amount' or 'Pay selected' for payment
Fail: There is no dropdown list with payment types
Comment 5 Kyle M Hall 2017-06-14 15:02:12 UTC
Ack! Thanks for the test plan! I'll get the patch set fixed up asap!

(In reply to Marc Véron from comment #4)
> Test plan was missing.
> 
> I tested with following steps:
> Following test is OK:
> 
> - Apply patches
> - Update database
> - Add authorised value PAYMENT_TYPE with values 'Cash', 'Check', 'Credit
> card'
> - Go to the fines section of a patron who has several fines
> - Tab 'Fines'
> - Click on 'Pay' for an individual fine
> - Verified that in form  'Pay an individual fine' a dropdown appears with
>   paxment types
> - Selected a payment type, confirm payment
> - Verify that payment type appears in "Description of charges" in tab
> 'Account'
> 
> 
> Following is missing:
> - Go to 'Fines' tab
> - Use 'Pay amount' or 'Pay selected' for payment
> Fail: There is no dropdown list with payment types
Comment 6 Kyle M Hall 2017-06-14 15:05:26 UTC
Created attachment 64288 [details] [review]
Bug 18786 - Add ability to create custom payment types

Some libraries would like to be able to specify more specific payment types such as cash, check, credit card, or even canned food ( for food drives ). This feature will allow a library to specify payment types as authorised values of the type PAYMENT_TYPE.

Test Plan:
1) Apply patches
2) Update database
3) Add authorised value PAYMENT_TYPE with values 'Cash', 'Check', 'Credit card'
4) Go to the fines section of a patron who has several fines
5) Tab 'Fines'
6) Click on 'Pay' for an individual fine
7) Verify that in the form a 'Pay an individual fine' dropdown appears with payment types
8) Select a payment type, confirm payment
9) Verify that payment type appears in "Description of charges" in tab 'Account'
Comment 7 Marc Véron 2017-06-14 20:27:34 UTC
Created attachment 64300 [details] [review]
Bug 18786 - Update database

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 8 Marc Véron 2017-06-14 20:28:20 UTC
Created attachment 64301 [details] [review]
Bug 18786 - Update schema

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 9 Marc Véron 2017-06-14 20:29:37 UTC
Created attachment 64302 [details] [review]
Bug 18786 - Add ability to create custom payment types

Some libraries would like to be able to specify more specific payment types such as cash, check, credit card, or even canned food ( for food drives ). This feature will allow a library to specify payment types as authorised values of the type PAYMENT_TYPE.

Test Plan:
1) Apply patches
2) Update database
3) Add authorised value PAYMENT_TYPE with values 'Cash', 'Check', 'Credit card'
4) Go to the fines section of a patron who has several fines
5) Tab 'Fines'
6) Click on 'Pay' for an individual fine
7) Verify that in the form a 'Pay an individual fine' dropdown appears with payment types
8) Select a payment type, confirm payment
9) Verify that payment type appears in "Description of charges" in tab 'Account'

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 10 Martha Fuerst 2017-08-22 16:33:18 UTC
Got the following error when trying to pay a lost item charge, but fine is gone from the account. No indication of payment on Account page or in account_offsets table.

Software error:

{UNKNOWN}: Can't call method "unblessed" on an undefined value at /var/lib/koha/hcpl/kohaclone/C4/Circulation.pm line 2178. at /var/lib/koha/hcpl/kohaclone/C4/Circulation.pm line 2198
For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error.

Everything else works fine.

Test Plan:
1) Apply patches
2) Update database
3) Add authorised value PAYMENT_TYPE with values 'Cash', 'Check', 'Credit card'
4) Go to the fines section of a patron who has several fines
5) Tab 'Fines'
6) Click on 'Pay' for an individual fine
7) Verify that in the form a 'Pay an individual fine' dropdown appears with payment types - YES (also appears with all "Pay")
8) Select a payment type, confirm payment
9) Verify that payment type appears in "Description of charges" in tab 'Account'
Comment 11 Tomás Cohen Arazi 2017-09-29 14:12:05 UTC
Please rebase.
Comment 12 Kyle M Hall 2017-09-29 15:25:58 UTC
Created attachment 67476 [details] [review]
Bug 18786 - Update database

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 13 Kyle M Hall 2017-09-29 15:26:05 UTC
Created attachment 67477 [details] [review]
Bug 18786 - Add ability to create custom payment types

Some libraries would like to be able to specify more specific payment types such as cash, check, credit card, or even canned food ( for food drives ). This feature will allow a library to specify payment types as authorised values of the type PAYMENT_TYPE.

Test Plan:
1) Apply patches
2) Update database
3) Add authorised value PAYMENT_TYPE with values 'Cash', 'Check', 'Credit card'
4) Go to the fines section of a patron who has several fines
5) Tab 'Fines'
6) Click on 'Pay' for an individual fine
7) Verify that in the form a 'Pay an individual fine' dropdown appears with payment types
8) Select a payment type, confirm payment
9) Verify that payment type appears in "Description of charges" in tab 'Account'

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 14 Kyle M Hall 2017-11-15 14:12:30 UTC
Created attachment 69155 [details] [review]
Bug 18786 - Add ability to create custom payment types

Some libraries would like to be able to specify more specific payment types such as cash, check, credit card, or even canned food ( for food drives ). This feature will allow a library to specify payment types as authorised values of the type PAYMENT_TYPE.

Test Plan:
1) Apply patches
2) Update database
3) Add authorised value PAYMENT_TYPE with values 'Cash', 'Check', 'Credit card'
4) Go to the fines section of a patron who has several fines
5) Tab 'Fines'
6) Click on 'Pay' for an individual fine
7) Verify that in the form a 'Pay an individual fine' dropdown appears with payment types
8) Select a payment type, confirm payment
9) Verify that payment type appears in "Description of charges" in tab 'Account'

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 15 Kyle M Hall 2017-11-15 14:12:55 UTC
Created attachment 69156 [details] [review]
Bug 18786 - Update database

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 16 Kyle M Hall 2017-11-15 14:13:06 UTC
Created attachment 69157 [details] [review]
Bug 18786 - Add ability to create custom payment types

Some libraries would like to be able to specify more specific payment types such as cash, check, credit card, or even canned food ( for food drives ). This feature will allow a library to specify payment types as authorised values of the type PAYMENT_TYPE.

Test Plan:
1) Apply patches
2) Update database
3) Add authorised value PAYMENT_TYPE with values 'Cash', 'Check', 'Credit card'
4) Go to the fines section of a patron who has several fines
5) Tab 'Fines'
6) Click on 'Pay' for an individual fine
7) Verify that in the form a 'Pay an individual fine' dropdown appears with payment types
8) Select a payment type, confirm payment
9) Verify that payment type appears in "Description of charges" in tab 'Account'

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 17 Katrin Fischer 2017-11-15 20:00:06 UTC
I think this is a duplicate of the older bug 5630 which is also signed off at the moment.

There was some discussion about using an authorised value there and because we already have a list of payment types used by SIP and translatability some hardcoded values were added. Maybe we could make it so that the list can be extended by an authorised value? (... and make authorised values translatable for display one day...)

Can we pick one implementation?
Comment 18 Josef Moravec 2017-12-08 07:32:29 UTC
(In reply to Katrin Fischer from comment #17)
> I think this is a duplicate of the older bug 5630 which is also signed off
> at the moment.

Katrin, which bug did you have in mind? This bug number is not related to account either.


> There was some discussion about using an authorised value there and because
> we already have a list of payment types used by SIP and translatability some
> hardcoded values were added. Maybe we could make it so that the list can be
> extended by an authorised value? (... and make authorised values
> translatable for display one day...)
> 
> Can we pick one implementation?

+1 ;)
Comment 19 Katrin Fischer 2017-12-08 09:31:39 UTC
Found it - it was bug 5620!