Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
if (not ref $borrower) {
$borrower = Koha::Patrons->find( $borrower );
- if ( $borrower ) {
- $borrower = $borrower->unblessed;
- } else {
- return 0;
- }
+ return 0 unless $borrower;
+ $borrower = $borrower->unblessed;
}
if (not ref $budget) {
$budget = GetBudget($budget);
if (not ref $borrower) {
$borrower = Koha::Patrons->find( $borrower );
- if ( $borrower ) {
- $borrower = $borrower->unblessed;
- } else {
- return 0;
- }
+ return 0 unless $borrower;
+ $borrower = $borrower->unblessed;
}
if (not ref $budget) {
$budget = GetBudget($budget);