Bugzilla – Attachment 82787 Details for
Bug 21720
Update C4::Circulation::AddIssuingCharge to use Koha::Account->add_debit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21720: Use Koha::Account->add_debit in AddIssuingCharge
Bug-21720-Use-KohaAccount-adddebit-in-AddIssuingCh.patch (text/plain), 2.23 KB, created by
Martin Renvoize
on 2018-11-30 13:36:12 UTC
(
hide
)
Description:
Bug 21720: Use Koha::Account->add_debit in AddIssuingCharge
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2018-11-30 13:36:12 UTC
Size:
2.23 KB
patch
obsolete
>From 406db7dbe687b863cfd6eb2127349394ed9d01e2 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 1 Nov 2018 12:42:31 +0000 >Subject: [PATCH] Bug 21720: Use Koha::Account->add_debit in AddIssuingCharge > >--- > C4/Circulation.pm | 39 +++++++++++---------------------------- > 1 file changed, 11 insertions(+), 28 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 3ccabd5d20..08e9bfd615 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3224,36 +3224,19 @@ sub AddIssuingCharge { > > # FIXME What if checkout does not exist? > >- my $nextaccntno = C4::Accounts::getnextacctno( $checkout->borrowernumber ); >- >- my $manager_id = 0; >- $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; >- >- my $branchcode = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; >- >- my $accountline = Koha::Account::Line->new( >+ my $account = Koha::Account->new({ patron_id => $checkout->borrowernumber }); >+ my $accountline = $account->add_debit( > { >- borrowernumber => $checkout->borrowernumber, >- itemnumber => $checkout->itemnumber, >- issue_id => $checkout->issue_id, >- accountno => $nextaccntno, >- amount => $charge, >- amountoutstanding => $charge, >- manager_id => $manager_id, >- branchcode => $branchcode, >- description => 'Rental', >- accounttype => 'Rent', >- date => \'NOW()', >+ amount => $charge, >+ description => 'Rental', >+ note => undef, >+ user_id => C4::Context->userenv ? C4::Context->userenv->{'number'} : 0, >+ library_id => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef, >+ type => 'rent', >+ item_id => $checkout->itemnumber, >+ issue_id => $checkout->issue_id, > } >- )->store(); >- >- Koha::Account::Offset->new( >- { >- debit_id => $accountline->id, >- type => 'Rental Fee', >- amount => $charge, >- } >- )->store(); >+ ); > } > > =head2 GetTransfers >-- >2.19.2
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 21720
:
81882
|
82787
|
82788
|
83199
|
83200
|
84271
|
84272
|
85175
|
85176