Bugzilla – Attachment 106607 Details for
Bug 20815
Add ability to choose if lost fee is refunded based on length of time item has been lost
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20815: Do not use compare float with precision
Bug-20815-Do-not-use-compare-float-with-precision.patch (text/plain), 3.32 KB, created by
Katrin Fischer
on 2020-07-06 21:04:39 UTC
(
hide
)
Description:
Bug 20815: Do not use compare float with precision
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-07-06 21:04:39 UTC
Size:
3.32 KB
patch
obsolete
>From 6547f09e7cb399ddba2fcdf7767220ef4b90a68d Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 6 Jul 2020 07:03:21 -0400 >Subject: [PATCH] Bug 20815: Do not use compare float with precision > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Circulation.t | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 667a97f10f..33cc2d0788 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -3995,10 +3995,10 @@ subtest 'Tests for NoRefundOnLostReturnedItemsAge = undef' => sub { > } > ); > ok( $a, "Found accountline for lost fee" ); >- is( $a->amountoutstanding, '42.000000', "Lost fee charged correctly" ); >+ is( $a->amountoutstanding + 0, 42, "Lost fee charged correctly" ); > my ( $doreturn, $messages ) = AddReturn( $item->barcode, $library->{branchcode}, undef, dt_from_string ); > $a = Koha::Account::Lines->find( $a->id ); >- is( $a->amountoutstanding, '0.000000', "Lost fee was refunded" ); >+ is( $a->amountoutstanding + 0, 0, "Lost fee was refunded" ); > }; > > subtest 'Tests for NoRefundOnLostReturnedItemsAge > length of days item has been lost' => sub { >@@ -4070,10 +4070,10 @@ subtest 'Tests for NoRefundOnLostReturnedItemsAge > length of days item has been > } > ); > ok( $a, "Found accountline for lost fee" ); >- is( $a->amountoutstanding, '42.000000', "Lost fee charged correctly" ); >+ is( $a->amountoutstanding + 0, 42, "Lost fee charged correctly" ); > my ( $doreturn, $messages ) = AddReturn( $item->barcode, $library->{branchcode}, undef, dt_from_string ); > $a = Koha::Account::Lines->find( $a->id ); >- is( $a->amountoutstanding, '0.000000', "Lost fee was refunded" ); >+ is( $a->amountoutstanding + 0, 0, "Lost fee was refunded" ); > }; > > subtest 'Tests for NoRefundOnLostReturnedItemsAge = length of days item has been lost' => sub { >@@ -4145,10 +4145,10 @@ subtest 'Tests for NoRefundOnLostReturnedItemsAge = length of days item has been > } > ); > ok( $a, "Found accountline for lost fee" ); >- is( $a->amountoutstanding, '42.000000', "Lost fee charged correctly" ); >+ is( $a->amountoutstanding + 0, 42, "Lost fee charged correctly" ); > my ( $doreturn, $messages ) = AddReturn( $item->barcode, $library->{branchcode}, undef, dt_from_string ); > $a = Koha::Account::Lines->find( $a->id ); >- is( $a->amountoutstanding, '42.000000', "Lost fee was not refunded" ); >+ is( $a->amountoutstanding + 0, 42, "Lost fee was not refunded" ); > }; > > subtest 'Tests for NoRefundOnLostReturnedItemsAge < length of days item has been lost' => sub { >@@ -4220,10 +4220,10 @@ subtest 'Tests for NoRefundOnLostReturnedItemsAge < length of days item has been > } > ); > ok( $a, "Found accountline for lost fee" ); >- is( $a->amountoutstanding, '42.000000', "Lost fee charged correctly" ); >+ is( $a->amountoutstanding + 0, 42, "Lost fee charged correctly" ); > my ( $doreturn, $messages ) = AddReturn( $item->barcode, $library->{branchcode}, undef, dt_from_string ); > $a = Koha::Account::Lines->find( $a->id ); >- is( $a->amountoutstanding, '42.000000', "Lost fee was not refunded" ); >+ is( $a->amountoutstanding + 0, 42, "Lost fee was not refunded" ); > }; > > $schema->storage->txn_rollback; >-- >2.11.0
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 20815
:
98772
|
98929
|
99038
|
105141
|
106575
|
106606
| 106607 |
106608
|
107165
|
107177