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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 26 Nov 2018 06:41:40 +0000 (07:41 +0100)
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>
(cherry picked from commit 5c62543310c94b179dd3c8c93f4f79a414be5980)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

C4/Circulation.pm

index 7b7ecb7..ea1b500 100644 (file)
@@ -3192,7 +3192,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;