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)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 29 Oct 2018 00:22:16 +0000 (00:22 +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>

C4/Circulation.pm

index 9c8d5ba..50be185 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;