Bug 23442: (RM follow-up) Fix for missing 'uc' in offset_type call
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 23 Jan 2020 15:45:12 +0000 (15:45 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 23 Jan 2020 16:13:23 +0000 (16:13 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Account/Line.pm

index bd86317..1fac85d 100644 (file)
@@ -382,7 +382,7 @@ sub reduce {
                 $reduction->apply(
                     {
                         debits      => [$self],
-                        offset_type => $params->{reduction_type}
+                        offset_type => uc( $params->{reduction_type} )
                     }
                 );
                 $reduction->status('APPLIED')->store();
@@ -394,7 +394,7 @@ sub reduce {
                     {
                         credit_id => $reduction->accountlines_id,
                         debit_id  => $self->accountlines_id,
-                        type      => $params->{reduction_type},
+                        type      => uc( $params->{reduction_type} ),
                         amount    => 0
                     }
                 )->store();