[Bug 44165] New: Use Koha::Item->effective_replacement_price for every default replacement cost fallback
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44165 Bug ID: 44165 Summary: Use Koha::Item->effective_replacement_price for every default replacement cost fallback Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Target Milestone: --- The fallback to the default replacement cost of the item type exists in three places that do not behave identically: Koha::Item->effective_replacement_price (bug 43948), Koha::Account->add_lost_replacement_fee and C4::Overdues::CalcFine. The comment in CalcFine already says "This must be moved to Koha::Item". Differences: - An item type that cannot be resolved is skipped by CalcFine, makes Koha::Account->add_lost_replacement_fee die (reported separately), and gives the item price or 0 in the new method. - An item type default of NULL leaves an undefined replacement price in CalcFine, and gives 0 in the new method. - CalcFine takes the item type from the item hash of its caller, the others use the effective item type of the item. Use Koha::Item->effective_replacement_price in the two others. Changing CalcFine can change the fines it calculates, so it needs tests. Test plan: 1. prove t/db_dependent/Koha/Item.t t/db_dependent/Koha/Account.t t/db_dependent/Overdues.t t/db_dependent/Circulation/CalcFine.t 2. Check that an overdue item whose replacement price is empty and whose item type has a default replacement cost is capped at that default when useDefaultReplacementCost is on, and that a lost item is charged the same amount Expected: both use the same price whichever way the item type is resolved. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44165 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |43948, 44164 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43948 [Bug 43948] Add method to get effective replacement cost for an item https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44164 [Bug 44164] Marking an item lost dies when its item type cannot be resolved -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44165 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44165 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org