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

--- Comment #17 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 204166
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204166&action=edit
Bug 42425: Populate checkin_id on accountlines

Replaces the fragile timestamp-based matching approach with explicit
checkin_id threading through the call chain. Each accountline receives
its checkin_id at creation time.

The Koha::Item->store() chokepoint for lost-item accounting is
preserved: store() still detects itemlost transitions and calls
_set_found_trigger. It now passes checkin_id context through so the
resulting accountlines are linked deterministically.

Changes:
- Koha::Account->add_credit/add_debit: accept and store checkin_id
- Koha::Item->store/_set_found_trigger: thread checkin_id to
  LOST_FOUND and PROCESSING_FOUND credits
- C4::Items::ModDateLastSeen: pass checkin_id to store()
- C4::Circulation::_FixOverduesOnReturn: accept checkin_id, pass to
  FORGIVEN credit
- C4::Circulation::_CalculateAndUpdateFine: pass checkin_id to
  UpdateFine
- C4::Overdues::UpdateFine: pass checkin_id to add_debit
- C4::Circulation::AddReturn: pass checkin_record->id to all callers;
  remove timestamp-based matching block

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/db_dependent/Circulation.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: David Nind <[email protected]>
Signed-off-by: Tomás Cohen Arazi <[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