Bug 21804: Remove C4::Accounts::getcharges again
authorJosef Moravec <josef.moravec@gmail.com>
Fri, 9 Nov 2018 16:54:34 +0000 (16:54 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 12 Nov 2018 19:28:22 +0000 (16:28 -0300)
Test plan:
1) git grep getcharges
  -> should return no occurences
2) prove t/db_dependent/Accounts.t
  -> should pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Accounts.pm
t/db_dependent/Accounts.t

index 60b10a2..e41ce79 100644 (file)
@@ -278,23 +278,6 @@ sub manualinvoice {
     return 0;
 }
 
-sub getcharges {
-    my ( $borrowerno, $timestamp, $accountno ) = @_;
-    my $dbh        = C4::Context->dbh;
-    my $timestamp2 = $timestamp - 1;
-    my $query      = "";
-    my $sth = $dbh->prepare(
-            "SELECT * FROM accountlines WHERE borrowernumber=? AND accountno = ?"
-          );
-    $sth->execute( $borrowerno, $accountno );
-
-    my @results;
-    while ( my $data = $sth->fetchrow_hashref ) {
-        push @results,$data;
-    }
-    return (@results);
-}
-
 =head2 purge_zero_balance_fees
 
   purge_zero_balance_fees( $days );
index 1cbd17d..4773d63 100644 (file)
@@ -44,7 +44,6 @@ can_ok( 'C4::Accounts',
         getnextacctno
         chargelostitem
         manualinvoice
-        getcharges
         purge_zero_balance_fees )
 );