diff --git a/C4/Circulation.pm b/C4/Circulation.pm index bff0b1e2f5..e578d94620 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1728,6 +1728,10 @@ sub AddIssue { undef, $item_object->id ); } + + my $logger = Koha::Logger->get({ prefix => 0, interface => 'offlinecirc', category => 'issue' }); + $logger->error("\tissue\t" . $patron->cardnumber . "\t" . $item_object->barcode . "\t" . C4::Context->userenv->{branch} . "\n"); + $issue->discard_changes; $patron->update_lastseen('check_out'); if ( $item_object->location && $item_object->location eq 'CART' @@ -2258,6 +2262,9 @@ sub AddReturn { die "The item is not issed and cannot be returned" unless $issue; # Just in case... $patron or warn "AddReturn without current borrower"; + my $logger = Koha::Logger->get({ prefix => 0, interface => 'offlinecirc', category => 'issue' }); + $logger->error("\treturn\t" . $item->barcode . "\t$branch" . "\n"); + if ($patron) { eval { MarkIssueReturned( $borrowernumber, $item->itemnumber, $return_date, $patron->privacy, { skip_record_index => 1, skip_holds_queue => 1} ); diff --git a/Koha/Account.pm b/Koha/Account.pm index 3d0fcee854..542b604f45 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -385,6 +385,12 @@ sub payin_amount { # Add payin credit $credit = $self->add_credit($params); + if ( $params->{type} eq 'PAYMENT' ) { + my $logger = Koha::Logger->get({ prefix => 0, interface => 'offlinecirc', category => 'issue' }); + my $b = C4::Context->userenv ? C4::Context->userenv->{branch} : "NOBRANCH"; + $logger->error("\tpayment\t" . Koha::Patrons->find($self->{patron_id})->cardnumber . "\t" . $amount . "\t" . $b . "\n"); + } + # Offset debts passed first if ( exists( $params->{debits} ) ) { $credit = $credit->apply(