Bug 9811: Remove useless orderby management
[koha_fer] / members / printinvoice.pl
index 10ae114..c8cf66d 100755 (executable)
@@ -38,7 +38,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { borrowers => 1, updatecharges => 1 },
+        flagsrequired => { borrowers => 1, updatecharges => 'remaining_permissions' },
         debug           => 1,
     }
 );
@@ -99,7 +99,7 @@ for ( my $i = 0 ; $i < $numaccts ; $i++ ) {
         'amount'                  => sprintf( "%.2f", $accts->[$i]{'amount'} ),
         'amountoutstanding'       => sprintf( "%.2f", $accts->[$i]{'amountoutstanding'} ),
         'accountno'               => $accts->[$i]{'accountno'},
-        'payment'                 => ( $accts->[$i]{'accounttype'} eq 'Pay' ),
+        'payment'                 => ( $accts->[$i]{'accounttype'} =~ /^Pay/ ),
     );
 
     if ( $accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU' ) {