Bug 21678

Summary: Adding debit "Renewal of Rental Item" and "Reserve Charge" does not create account offset
Product: Koha Reporter: Josef Moravec <josef.moravec>
Component: Fines and feesAssignee: Josef Moravec <josef.moravec>
Status: RESOLVED MOVED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: martin.renvoize, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11573
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21720
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21721
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21683
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21002
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 19066    
Bug Blocks:    
Attachments: Bug 21678: Create account offsets for debits of reserve fee and rental renewal
Bug 21678: Use Koha::Account->add_debit

Description Josef Moravec 2018-10-26 08:18:48 UTC

    
Comment 1 Josef Moravec 2018-10-26 09:09:04 UTC
Created attachment 81258 [details] [review]
Bug 21678: Create account offsets for debits of reserve fee and rental renewal

Test plan:
1) Make a reservation to create a reserve fee
2) Have an item type with rental fee and renew it to create rental
renewal fe

-- without patch there are no entries in table account_offsets for
creating a fee
-- with patch the appropriate account_offsets are created
Comment 2 Tomás Cohen Arazi (tcohen) 2018-10-26 16:44:13 UTC
I agree with the patch. But wouldn't you want to work on Koha::Account::add_debit instead? :-D
Comment 3 Martin Renvoize (ashimema) 2018-10-26 17:14:59 UTC
I think there are plans afoot to add an add_debit method to Koha::Account and this if probably a prime candidate for using that method once it's there..

I'll check in with Tomas on the progress there.. but this patchset could be a good half way house if add_debit is further off than I think.
Comment 4 Josef Moravec 2018-10-26 17:46:35 UTC
(In reply to Tomás Cohen Arazi from comment #2)
> I agree with the patch. But wouldn't you want to work on
> Koha::Account::add_debit instead? :-D

It would be definitely best solution, but "a bit" more work ;)
Comment 5 Katrin Fischer 2018-10-27 10:22:18 UTC
Can we keep an eye on translation and switch from Reserve to Hold?
Comment 6 Andrew Isherwood 2018-10-29 11:33:18 UTC
This bug does not apply, please rebase
Comment 7 Martin Renvoize (ashimema) 2018-10-30 10:29:32 UTC
Initial work on Koha::Account->add_debit now exists if you fancied taking a look and seeing if you could utilise it.. (that work still needs tests and the final coded enums narrowing down)
Comment 8 Josef Moravec 2018-10-30 13:03:49 UTC
(In reply to Martin Renvoize from comment #7)
> Initial work on Koha::Account->add_debit now exists if you fancied taking a
> look and seeing if you could utilise it.. (that work still needs tests and
> the final coded enums narrowing down)

I will try it to use add_debit and we'll see if it suits the needs here
Comment 9 Josef Moravec 2018-10-31 07:49:01 UTC
Created attachment 81685 [details] [review]
Bug 21678: Use Koha::Account->add_debit
Comment 10 Martin Renvoize (ashimema) 2018-11-02 11:02:53 UTC
bug 21720 and 21721 achieve this using add_debit now.
Comment 11 Martin Renvoize (ashimema) 2018-11-06 09:25:58 UTC
bug 21728 too
Comment 12 Martin Renvoize (ashimema) 2018-11-06 09:27:41 UTC
As I'm working through the tree of bugs related to updating all functions to use add_debit from Koha::Accounts (and as part of that trying to fill in the missing tests), I'm going to mark this bug as a duplicate.