Bugzilla – Attachment 85561 Details for
Bug 20912
Rental fees based on time period
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20912: (follow-up) Prevent double charging on renewal
Bug-20912-follow-up-Prevent-double-charging-on-ren.patch (text/plain), 3.03 KB, created by
Martin Renvoize (ashimema)
on 2019-02-22 14:55:40 UTC
(
hide
)
Description:
Bug 20912: (follow-up) Prevent double charging on renewal
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-02-22 14:55:40 UTC
Size:
3.03 KB
patch
obsolete
>From eb5b04d5251fa3df6ccbfacd7c7a5ef2edc65edc Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 20 Feb 2019 08:49:44 +0000 >Subject: [PATCH] Bug 20912: (follow-up) Prevent double charging on renewal > >This patch updates the tests the ensure we do not double charge for >renewals that take place before the original due date and fixes the >corresponding loging in C4::Circulation::AddRenewal. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Circulation.pm | 3 ++- > t/db_dependent/Circulation.t | 6 +++--- > 2 files changed, 5 insertions(+), 4 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index cec20c820a..b4f35679a2 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2910,7 +2910,8 @@ sub AddRenewal { > patron => $patron, > library => $circ_library, > item => $item_object, >- to_date => dt_from_string( $datedue ), >+ from_date => dt_from_string( $issue->date_due, 'sql' ), >+ to_date => dt_from_string($datedue), > } > ); > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 839e3fd818..91f636ca98 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -3052,7 +3052,7 @@ subtest 'Incremented fee tests' => sub { > $accountline->delete(); > AddRenewal( $patron->id, $item->id, $library->id, $dt_to_renew, $dt_to ); > $accountline = Koha::Account::Lines->find({ itemnumber => $item->id }); >- is( $accountline->amount, '13.000000', "Daily rental charge calculated correctly with finesCalendar = ignoreCalendar, for renewal" ); >+ is( $accountline->amount, '6.000000', "Daily rental charge calculated correctly with finesCalendar = ignoreCalendar, for renewal" ); > $accountline->delete(); > $issue->delete(); > >@@ -3063,7 +3063,7 @@ subtest 'Incremented fee tests' => sub { > $accountline->delete(); > AddRenewal( $patron->id, $item->id, $library->id, $dt_to_renew, $dt_to ); > $accountline = Koha::Account::Lines->find({ itemnumber => $item->id }); >- is( $accountline->amount, '13.000000', "Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed, for renewal" ); >+ is( $accountline->amount, '6.000000', "Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed, for renewal" ); > $accountline->delete(); > $issue->delete(); > >@@ -3079,7 +3079,7 @@ subtest 'Incremented fee tests' => sub { > $accountline->delete(); > AddRenewal( $patron->id, $item->id, $library->id, $dt_to_renew, $dt_to ); > $accountline = Koha::Account::Lines->find({ itemnumber => $item->id }); >- is( $accountline->amount, '11.000000', "Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays, for renewal" ); >+ is( $accountline->amount, '5.000000', "Daily rental charge calculated correctly with finesCalendar = noFinesWhenClosed and closed Wednesdays, for renewal" ); > $accountline->delete(); > $issue->delete(); > >-- >2.20.1
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 20912
:
76065
|
76066
|
76067
|
76068
|
76069
|
77302
|
77303
|
77304
|
81141
|
81142
|
81143
|
81450
|
81771
|
81772
|
81773
|
81774
|
81775
|
81778
|
82195
|
82196
|
84412
|
84413
|
84414
|
84415
|
84416
|
84417
|
84418
|
84419
|
84420
|
84570
|
84571
|
84572
|
84573
|
84574
|
84575
|
84576
|
84577
|
84578
|
84579
|
84580
|
84581
|
84582
|
84583
|
84584
|
84585
|
84610
|
84611
|
84612
|
84613
|
84614
|
84615
|
84616
|
84617
|
84618
|
84619
|
84620
|
84621
|
84622
|
84623
|
84624
|
84625
|
84707
|
84708
|
84709
|
84710
|
84711
|
84712
|
84713
|
84714
|
84715
|
84716
|
84717
|
84718
|
84719
|
84720
|
84721
|
84722
|
84723
|
84724
|
85291
|
85292
|
85293
|
85294
|
85295
|
85296
|
85297
|
85298
|
85299
|
85300
|
85301
|
85302
|
85303
|
85304
|
85305
|
85306
|
85307
|
85308
|
85316
|
85543
|
85544
|
85545
|
85546
|
85547
|
85548
|
85549
|
85550
|
85551
|
85552
|
85553
|
85554
|
85555
|
85556
|
85557
|
85558
|
85559
|
85560
|
85561
|
85628
|
85631
|
86140
|
86141
|
86142
|
86143
|
86144
|
86145
|
86146
|
86147
|
86148
|
86149
|
86151
|
86152
|
86153
|
86154
|
86155
|
86156
|
86157
|
86158
|
86159
|
86160
|
86244
|
86245
|
86246
|
86247
|
86248
|
86249
|
86250
|
86251
|
86252
|
86253
|
86254
|
86255
|
86256
|
86257
|
86258
|
86259
|
86260
|
86261
|
86262
|
86263
|
86264
|
86282
|
86283
|
86284
|
86285
|
86286
|
86287
|
86288
|
86289
|
86290
|
86291
|
86292
|
86293
|
86294
|
86295
|
86296
|
86297
|
86298
|
86299
|
86300
|
86301
|
86302
|
86306
|
86307
|
86308
|
86309
|
86310
|
86311
|
86312
|
86313
|
86314
|
86315
|
86316
|
86317
|
86318
|
86319
|
86320
|
86321
|
86322
|
86323
|
86324
|
86325
|
86326
|
86327
|
87363
|
87413
|
87703