Bug 23805: Update 'Pay' to 'PAYMENT' for consistency
[koha.git] / installer / data / mysql / atomicupdate / bug_23805_credit.perl
index d3ca751..abd55ad 100644 (file)
@@ -36,8 +36,7 @@ if ( CheckVersion($DBversion) ) {
               is_system
             )
             VALUES
-              ('Pay', 'Payment', 0, 1),
-              ('PAY', 'Payment', 0, 1),
+              ('PAYMENT', 'Payment', 0, 1),
               ('W', 'Writeoff', 0, 1),
               ('WO', 'Writeoff', 0, 1),
               ('FORGIVEN', 'Forgiven', 1, 1),
@@ -89,6 +88,13 @@ if ( CheckVersion($DBversion) ) {
         }
     );
 
+    # Update accountype 'Pay' to 'PAYMENT'
+    $dbh->do(
+        qq{
+          UPDATE accountlines SET accounttype = 'PAYMENT' WHERE accounttype = 'Pay' OR accounttype = 'PAY'
+        }
+    );
+
     # Populating credit_type_code
     $dbh->do(
         qq{