Bug 21641: Added C4::Accounts to getnextacctno() call
authorAlex Buckley <alexbuckley@catalyst.net.nz>
Wed, 24 Oct 2018 03:37:57 +0000 (03:37 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 8 Nov 2018 15:30:53 +0000 (15:30 +0000)
Test plan:
1. Fetch and checkout the master branch
2. Checkout an item with a rental charge associated with it to a user
and notice an error is thrown
3. Apply patch
4. Restart memcached and plack
5. Repeat steps 1 and 2 and notice the checkout happens successfully

Sponsored-By: Catalyst IT

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 344dba2fb84a743603c1c51294be4e378e6e5dc7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

C4/Circulation.pm

index c1b378f..f963c52 100644 (file)
@@ -3191,7 +3191,7 @@ sub AddIssuingCharge {
 
     # FIXME What if checkout does not exist?
 
-    my $nextaccntno = getnextacctno($checkout->borrowernumber);
+    my $nextaccntno = C4::Accounts->getnextacctno($checkout->borrowernumber);
 
     my $manager_id  = 0;
     $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv;