Bug 24151: Use fully qualified names for UpdateStats
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 21 Jul 2020 07:57:08 +0000 (09:57 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 21 Jul 2020 08:02:23 +0000 (10:02 +0200)
t/db_dependent/Koha/Account/Line.t .. 8/12     # Looks like you planned 16 tests but ran 3.
 #   Failed test 'void() tests'
 #   at t/db_dependent/Koha/Account/Line.t line 723.
Undefined subroutine &Koha::Account::UpdateStats called at /kohadevbox/koha/Koha/Account.pm line 289.

It's certainly caused by a circ dep from
  commit 5ce968e0e571f555261c02a9e1d27447611cdb89
  Bug 24151: Copy info to the pseudonymized table when a transaction is done

See also bug 17600 for more context.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Koha/Account.pm

index de251c5..2a63856 100644 (file)
@@ -279,7 +279,7 @@ sub pay {
         $o->store();
     }
 
-    UpdateStats(
+    C4::Stats::UpdateStats(
         {
             branch         => $library_id,
             type           => lc($type),
@@ -435,7 +435,7 @@ sub add_credit {
                     }
                 )->store();
 
-                UpdateStats(
+                C4::Stats::UpdateStats(
                     {
                         branch         => $library_id,
                         type           => lc($credit_type),