https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42383

--- Comment #23 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 209556
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209556&action=edit
Bug 42383: Add Koha::Checkin->confirm_transfer

This patch adds a confirm_transfer() domain method to Koha::Checkin
that sets the associated transfer in transit (populates datesent).

The method is idempotent — calling it on an already-sent transfer is
a no-op.

Throws Koha::Exceptions::MissingParameter if the checkin has no
transfer_id. No fuzzy fallbacks to item->get_transfer.

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/db_dependent/Koha/Checkin.t
=> SUCCESS: Tests pass
3. Tests cover:
   - confirm_transfer sets transfer in transit
   - confirm_transfer is idempotent on already-sent transfer
   - confirm_transfer without transfer_id (throws MissingParameter)
   - Returns $self for chaining
4. Sign off :-D

Signed-off-by: Tomás Cohen Arazi <[email protected]>
Signed-off-by: Brendan Lawlor <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to