https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44047 Bug ID: 44047 Summary: add_debit's cash register check reads payment_type, which a debit never has Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: babarjunaid1122@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- Koha::Account->add_debit requires a cash register when UseCashRegisters is on: && ( $params->{transaction_type} eq 'CASH' || $params->{payment_type} eq 'SIP00' ) add_debit takes transaction_type, not payment_type (that is add_credit's parameter), so the SIP00 half compares undef: it never matches, and it warns "Use of uninitialized value in string eq" whenever transaction_type is not CASH. A SIP00 payout is therefore recorded with no cash register, while add_credit refuses the same payment type without one. To see it: UseCashRegisters on, call add_debit with transaction_type => 'SIP00' and no cash_register: no RegisterRequired exception, and an uninitialized-value warning. Same code on main and 26.05. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.