Bugzilla – Attachment 81685 Details for
Bug 21678
Adding debit "Renewal of Rental Item" and "Reserve Charge" does not create account offset
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21678: Use Koha::Account->add_debit
Bug-21678-Use-KohaAccount-adddebit.patch (text/plain), 1.61 KB, created by
Josef Moravec
on 2018-10-31 07:49:01 UTC
(
hide
)
Description:
Bug 21678: Use Koha::Account->add_debit
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-10-31 07:49:01 UTC
Size:
1.61 KB
patch
obsolete
>From cd6e655c8e5e644f0e6a9df066553fef4ed0df45 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Wed, 31 Oct 2018 07:47:55 +0000 >Subject: [PATCH] Bug 21678: Use Koha::Account->add_debit > >--- > C4/Circulation.pm | 9 ++++++--- > C4/Reserves.pm | 12 +++++++++--- > 2 files changed, 15 insertions(+), 6 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 6b73829..37275a5 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2878,9 +2878,12 @@ sub AddRenewal { > . $biblio->title > . " $item->{'barcode'}"; > >- C4::Accounts::manualinvoice( >- $borrowernumber, $itemnumber, $description, 'Rent', $charge >- ); >+ $patron->account->add_debit({ >+ amount => $charge, >+ description => $description, >+ type => 'rent', >+ item_id => $itemnumber, >+ }); > } > > # Send a renewal slip according to checkout alert preferencei >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 464a315..447549e 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -570,9 +570,15 @@ sub ChargeReserveFee { > > return if !$fee || $fee == 0; # the last test is needed to include 0.00 > >- C4::Accounts::manualinvoice( >- $borrowernumber, undef, "Reserve Charge - $title", 'Res', $fee >- ); >+ #FIXME - patron should be passed as param, not fetched agian >+ my $patron = Koha::Patrons->find( $borrowernumber ); >+ return unless $patron; >+ >+ $patron->account->add_debit({ >+ amount => $fee, >+ type => 'reserve', >+ description => $title, >+ }); > } > > =head2 GetReserveFee >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21678
:
81258
| 81685