Bugzilla – Attachment 42508 Details for
Bug 14801
Fix Reserves.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14801: Fix Reserves.t -- Follow-up for ChargeReserveFee
Bug-14801-Fix-Reservest----Follow-up-for-ChargeRes.patch (text/plain), 1.45 KB, created by
Marcel de Rooy
on 2015-09-14 09:34:36 UTC
(
hide
)
Description:
Bug 14801: Fix Reserves.t -- Follow-up for ChargeReserveFee
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-09-14 09:34:36 UTC
Size:
1.45 KB
patch
obsolete
>From 04764e61be250944ff940460c0b99863bbfa605e Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 14 Sep 2015 11:11:11 +0200 >Subject: [PATCH] Bug 14801: Fix Reserves.t -- Follow-up for ChargeReserveFee >Content-Type: text/plain; charset=utf-8 > >The problem making some tests fail, actually was the unneeded addition >of zero accountline records by ChargeReserveFee, called by AddReserve. >The balance is still zero, but a test like !$var responds differently >when var is 0.00 instead of 0 or undef. > >This patch adjusts the test in ChargeReserveFee in order to prevent >adding these records with 0.00. >The first patch that adjusts the tests in Reserves.t is not strictly >needed anymore, but can stay. > >Test plan: >[1] Run t/db_dependent/Reserves.t >[2] Run t/db_dependent/Reserves/GetReserveFee.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Reserves.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index dab2b48..ed24d32 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -650,7 +650,7 @@ sub GetOtherReserves { > > sub ChargeReserveFee { > my ( $borrowernumber, $fee, $title ) = @_; >- return if !$fee; >+ return if !$fee || $fee==0; # the last test is needed to include 0.00 > my $accquery = qq{ > INSERT INTO accountlines ( borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding ) VALUES (?, ?, NOW(), ?, ?, 'Res', ?) > }; >-- >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 14801
:
42475
|
42476
|
42500
|
42506
|
42507
| 42508