BE - Declared Lost/Aged to Lost: Bill patron for ACTUAL COST of lost item
Description
Environment
None
Potential Workaround
None
blocks
has to be done after
has to be done before
has to be finished together with
is blocked by
is cloned by
Checklist
hideTestRail: Results
Activity
Show:
Done
Details
Details
Assignee
Oleksandr Vidinieiev
Oleksandr VidinieievReporter
Holly Mistlebauer
Holly MistlebauerTester Assignee
Holly Mistlebauer
Holly MistlebauerLabels
Priority
Story Points
5
Sprint
None
Development Team
Vega
Parent
Fix versions
Release
Orchid (R1 2023)
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created May 20, 2022 at 10:34 PM
Updated February 15, 2023 at 6:37 PM
Resolved December 12, 2022 at 4:57 PM
TestRail: Cases
TestRail: Runs
Purpose: Bill the patron for the actual cost of a lost item.
Story: As a staff member who charges patrons for lost items, I need to bill the patron the actual cost of an item he/she lost.
Scenarios:
Scenario
Given Confirm actual cost to bill patron modal open
When Confirm & save button pressed (and another user has not edited the record)
Then...
Create the 'Fee/fine record' and 'Fee/fine action record' for the ACTUAL COST lost item fee in the same manner as with SET COST, with the following exceptions:
The Fee/fine type will be 'Lost item fee (actual cost)' (which is a hidden value in the Manual charges table at Settings>Users>Fee/fine), is available as a field on the report and can be picked up there.
For SET COST we do not have Additional information for staff and Additional information for patron, like we do for ACTUAL COST. This data, collected on the Actual cost to bill <insert patron-last-name, patron-first-name patron-middle-name> modal, will need to be saved with the 'Fee/fine action record'.
The logged in person's name and service point will be saved as 'Created at' and 'Source.'
The Fee/fine owner is available as a field on the report and can be picked up there.
Close Confirm actual cost to bill patron modal, leaving user back at Lost items requiring actual cost
Display 'Success toast': A fee/fine of <insert amount> has been charged to <insert patron-last-name, patron-first-name patron-middle-name> (as shown in attached mock-up 5-charge-fee-success.png)
Replace Process button on Lost items requiring actual cost with Billed: <billed amount> (as shown in attached mock-up 5-charge-fee-success.png)
On the BE side:
Add new endpoint:
POST /bill-actual-cost-lost-item-fee
Body format:
This endpoint should:
Charge lost item fee with actual cost (create account, charge action)
Change actual cost record status to "deleted"