Bugzilla – Attachment 54779 Details for
Bug 14390
Fine not updated from 'FU' to 'F' on renewal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14390: [Follow-up] Only update FU record in UpdateFine
Bug-14390-Follow-up-Only-update-FU-record-in-Updat.patch (text/plain), 1.90 KB, created by
Jacek Ablewicz
on 2016-08-23 15:23:24 UTC
(
hide
)
Description:
Bug 14390: [Follow-up] Only update FU record in UpdateFine
Filename:
MIME Type:
Creator:
Jacek Ablewicz
Created:
2016-08-23 15:23:24 UTC
Size:
1.90 KB
patch
obsolete
>From 79ee001251252dd88967de2e462b3cf3eb9b6bef Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 23 Aug 2016 16:33:10 +0200 >Subject: [PATCH] Bug 14390: [Follow-up] Only update FU record in UpdateFine > >Exclude O, F and M when outstanding == 0. >Check if the issue_id points to a FU record. > >Note: We only warn now when we see a second FU record with this issue id. >That should be a rare exception. As before, we are just counting it in >our total. Added a FIXME. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Tested fine on overdue. Renewed and backdated for a second fine. The F >and FU can be seen on the Fines tab and are totaled on Check out. > >Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> >--- > C4/Overdues.pm | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index 3f0c32d..71c8606 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -537,8 +537,9 @@ sub UpdateFine { > # "REF" is Cash Refund > my $sth = $dbh->prepare( > "SELECT * FROM accountlines >- WHERE borrowernumber=? >- AND accounttype IN ('FU','O','F','M')" >+ WHERE borrowernumber=? AND >+ (( accounttype IN ('O','F','M') AND amountoutstanding<>0 ) OR >+ accounttype = 'FU' )" > ); > $sth->execute( $borrowernumber ); > my $data; >@@ -549,9 +550,10 @@ sub UpdateFine { > # - accumulate fines for other items > # so we can update $itemnum fine taking in account fine caps > while (my $rec = $sth->fetchrow_hashref) { >- if ( $rec->{issue_id} == $issue_id ) { >+ if ( $rec->{issue_id} == $issue_id && $rec->{accounttype} eq 'FU' ) { > if ($data) { > warn "Not a unique accountlines record for issue_id $issue_id"; >+ #FIXME Should we still count this one in total_amount ?? > } > else { > $data = $rec; >-- >1.7.10.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 14390
:
41428
|
44600
|
44603
|
45280
|
45281
|
45285
|
47465
|
51627
|
51628
|
51629
|
54593
|
54594
|
54595
|
54596
|
54704
|
54778
|
54779
|
54821
|
54822
|
54823
|
54824
|
54825