--- /dev/null
+$DBversion = 'XXX'; # will be replaced by the RM
+if ( CheckVersion($DBversion) ) {
+ $dbh->do(q{
+ UPDATE
+ systempreferences
+ SET
+ options = "batchmod|moredetail|cronjob|additem|pendingreserves|onpayment"
+ WHERE
+ variable = "MarkLostItemsAsReturned"
+ });
+
+ my $lost_item_returned = C4::Context->preference("MarkLostItemsAsReturned");
+ my @set = split( ",", $lost_item_returned );
+ push @set, 'onpayment';
+ $lost_item_returned = join( ",", @set );
+
+ $dbh->do(qq{
+ UPDATE
+ systempreferences
+ SET
+ value = "$lost_item_returned"
+ WHERE
+ variable = "MarkLostItemsAsReturned"
+ });
+
+ SetVersion($DBversion);
+ print "Upgrade to $DBversion done (Bug 24474 - Add `onpayment` option to MarkLostItemsAsReturned)\n";
+}
('MarcFieldForModifierName','',NULL,'Where to store the name of the record''s last modifier','Free'),
('MarcFieldsToOrder','',NULL,'Set the mapping values for a new order line created from a MARC record in a staged file. In a YAML format.','textarea'),
('MarcItemFieldsToOrder','',NULL,'Set the mapping values for new item records created from a MARC record in a staged file. In a YAML format.','textarea'),
-('MarkLostItemsAsReturned','batchmod,moredetail,cronjob,additem,pendingreserves','batchmod|moredetail|cronjob|additem|pendingreserves','Mark items as returned when flagged as lost','multiple'),
+('MarkLostItemsAsReturned','batchmod,moredetail,cronjob,additem,pendingreserves,onpayment','batchmod|moredetail|cronjob|additem|pendingreserves|onpayment','Mark items as returned when flagged as lost','multiple'),
('MARCOrgCode','OSt','','Define MARC Organization Code for MARC21 records - http://www.loc.gov/marc/organizations/orgshome.html','free'),
('MaxFine',NULL,'','Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.','Integer'),
('MaxItemsToDisplayForBatchDel','1000',NULL,'Display up to a given number of items in a single item deletionbatch.','Integer'),