@@ -, +, @@ optional. now required. required, even if RequirePaymentType is disabled --- .../add-system-preference-RequirePaymentType.perl | 9 +++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../intranet-tmpl/prog/en/includes/transaction_types.inc | 2 +- .../prog/en/modules/admin/preferences/accounting.pref | 7 +++++++ 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/add-system-preference-RequirePaymentType.perl --- a/installer/data/mysql/atomicupdate/add-system-preference-RequirePaymentType.perl +++ a/installer/data/mysql/atomicupdate/add-system-preference-RequirePaymentType.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) + VALUES ('RequirePaymentType','0','','Require staff to select a payment type when a payment is made','YesNo') + }); + + NewVersion( $DBversion, '28138', 'Add system preference RequirePaymentType'); +} --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -563,6 +563,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'), ('ReplyToDefault','',NULL,'Use this email address as the replyto in emails','Free'), ('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'), +('RequirePaymentType','0','','Require staff to select a payment type when a payment is made','YesNo'), ('RequireStrongPassword','1','','Require a strong login password for staff and patrons','YesNo'), ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'), ('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/transaction_types.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/transaction_types.inc @@ -6,7 +6,7 @@ [% END %] [% IF payment_types.size > 0 %]
  • - [% IF Koha.Preference('UseCashRegisters') %] + [% IF Koha.Preference('UseCashRegisters') || Koha.Preference('RequirePaymentType') %]