From c740ac875d0f25fcdfdff8d09604c14df2bb49c9 Mon Sep 17 00:00:00 2001
From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Date: Fri, 26 Oct 2018 09:25:42 +0100
Subject: [PATCH] Bug 21679: Fix incorrect call to getnextacctno

The call to getnextacctno was attempting to be made to C4::Reserves
rather than to C4::Accounts. This patch addresses this by explicitly
stating the full path to the function.
---
 C4/Reserves.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/C4/Reserves.pm b/C4/Reserves.pm
index 78e8f6a360..6affc5d13b 100644
--- a/C4/Reserves.pm
+++ b/C4/Reserves.pm
@@ -571,7 +571,7 @@ sub ChargeReserveFee {
 INSERT INTO accountlines ( borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding ) VALUES (?, ?, NOW(), ?, ?, 'Res', ?)
     };
     my $dbh = C4::Context->dbh;
-    my $nextacctno = &getnextacctno( $borrowernumber );
+    my $nextacctno = C4::Accounts::getnextacctno( $borrowernumber );
     $dbh->do( $accquery, undef, ( $borrowernumber, $nextacctno, $fee, "Reserve Charge - $title", $fee ) );
 }
 
-- 
2.11.0