Bug 31378: Rename Auth Provider to Identity Provider and add Client.t tests
[koha-ffzg.git] / members / accountline-details.pl
index 699993d..b798ef9 100755 (executable)
@@ -45,20 +45,21 @@ my $accountlines_id = $input->param('accountlines_id');
 my $accountline = Koha::Account::Lines->find($accountlines_id);
 
 if ($accountline) {
-    my $type = $accountline->amount < 0 ? 'credit' : 'debit';
-    my $column = $type eq 'credit' ? 'credit_id' : 'debit_id';
-
     my $account_offsets = Koha::Account::Offsets->search(
-        { $column  => $accountlines_id },
-        { order_by => 'created_on' },
+        [
+            {
+                credit_id => $accountline->accountlines_id
+            },
+            {
+                debit_id => $accountline->accountlines_id
+            }
+        ],
+        { order_by => 'created_on' }
     );
 
     $template->param(
-        type            => $type,
         accountline     => $accountline,
         account_offsets => $account_offsets,
-
-        finesview => 1,
     );
 
     my $patron = Koha::Patrons->find( $accountline->borrowernumber );