Bugzilla – Attachment 68274 Details for
Bug 12768
Replacement cost and processing fee management
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12768 - (QA Followup) Fix doubled code
Bug-12768---QA-Followup-Fix-doubled-code.patch (text/plain), 3.04 KB, created by
Nick Clemens (kidclamp)
on 2017-10-18 16:43:59 UTC
(
hide
)
Description:
Bug 12768 - (QA Followup) Fix doubled code
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-10-18 16:43:59 UTC
Size:
3.04 KB
patch
obsolete
>From cacefdc3f4b276fd0fb9682f55770070297c83bd Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 18 Oct 2017 15:47:30 +0000 >Subject: [PATCH] Bug 12768 - (QA Followup) Fix doubled code > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Accounts.pm | 45 ++------------------------------------------- > 1 file changed, 2 insertions(+), 43 deletions(-) > >diff --git a/C4/Accounts.pm b/C4/Accounts.pm >index 256f7b2..7daff23 100644 >--- a/C4/Accounts.pm >+++ b/C4/Accounts.pm >@@ -145,6 +145,8 @@ sub chargelostitem{ > $replacementprice = $defaultreplacecost; > } > # first make sure the borrower hasn't already been charged for this item >+ # FIXME this should be more exact >+ # there is no reason a user can't lose an item, find and return it, and lost it again > my $existing_charges = Koha::Account::Lines->search( > { > borrowernumber => $borrowernumber, >@@ -155,49 +157,6 @@ sub chargelostitem{ > > # OK, they haven't > unless ($existing_charges) { >- my $manager_id = 0; >- $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; >- # This item is on issue ... add replacement cost to the borrower's record and mark it returned >- # Note that we add this to the account even if there's no replacement price, allowing some other >- # process (or person) to update it, since we don't handle any defaults for replacement prices. >- my $accountno = getnextacctno($borrowernumber); >- >- my $accountline = Koha::Account::Line->new( >- { >- borrowernumber => $borrowernumber, >- accountno => $accountno, >- date => \'NOW()', >- amount => $amount, >- description => $description, >- accounttype => 'L', >- amountoutstanding => $amount, >- itemnumber => $itemnumber, >- manager_id => $manager_id, >- } >- )->store(); >- >- my $account_offset = Koha::Account::Offset->new( >- { >- debit_id => $accountline->id, >- type => 'Lost Item', >- amount => $amount, >- } >- )->store(); >- >- if ( C4::Context->preference("FinesLog") ) { >- logaction("FINES", 'CREATE', $borrowernumber, Dumper({ >- action => 'create_fee', >- borrowernumber => $borrowernumber, >- accountno => $accountno, >- amount => $amount, >- amountoutstanding => $amount, >- description => $description, >- accounttype => 'L', >- itemnumber => $itemnumber, >- manager_id => $manager_id, >- })); >- } >- > #add processing fee > if ($processfee && $processfee > 0){ > manualinvoice($borrowernumber, $itemnumber, $description, 'PF', $processfee, $processingfeenote, 1); >-- >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 12768
:
34333
|
34334
|
36350
|
36505
|
36506
|
36552
|
36553
|
36554
|
36555
|
38365
|
38367
|
38368
|
38375
|
39298
|
39299
|
39300
|
39999
|
40000
|
40001
|
40002
|
42157
|
42158
|
43181
|
43546
|
64775
|
64776
|
66760
|
66761
|
67875
|
67876
|
67877
|
67878
|
67891
|
67892
|
67893
|
67894
|
67895
|
67896
|
67897
|
68035
|
68036
|
68037
|
68038
|
68039
|
68040
|
68041
|
68042
|
68076
|
68264
|
68265
|
68266
|
68267
|
68268
|
68269
|
68270
|
68271
|
68272
|
68273
| 68274 |
68332
|
68415
|
68416
|
68417
|
68426
|
68427