@@ -, +, @@ --- C4/Circulation.pm | 5 +++++ installer/data/mysql/en/mandatory/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 2 +- .../en/modules/admin/preferences/circulation.pref | 1 + .../prog/en/modules/circ/circulation.tmpl | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -137,6 +137,7 @@ System Pref options. # sub barcodedecode { my ($barcode, $filter) = @_; + my $branch = C4::Branch::mybranch(); $filter = C4::Context->preference('itemBarcodeInputFilter') unless $filter; $filter or return $barcode; # ensure filter is defined, else return untouched barcode if ($filter eq 'whitespace') { @@ -155,6 +156,10 @@ sub barcodedecode { # FIXME: $barcode could be "T1", causing warning: substr outside of string # Why drop the nonzero digit after the T? # Why pass non-digits (or empty string) to "T%07d"? + } elsif ($filter eq 'libsuite8') { + unless($barcode =~ m/^($branch)-/i){ + $barcode =~ s/^(\D+)[0]*(\d+)$/$branch-$1-$2/i; + } } return $barcode; # return barcode, modified or not } --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ a/installer/data/mysql/en/mandatory/sysprefs.sql @@ -145,7 +145,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts','10','free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','If set, date due will not be past this date. Enter date according to the dateformat System Preference',NULL,'free'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat|libsuite8','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACViewOthersSuggestions',0,'If ON, allows all suggestions to be displayed in the OPAC',NULL,'YesNo'); --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -731,7 +731,7 @@ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,ty $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('libraryAddress','','The address to use for printing receipts, overdues, etc. if different than physical address',NULL,'free')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, test or production','test|production','Choice')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts',NULL,'free')"); -$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','cuecat','Choice')"); +$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','libsuite8','Choice')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free')"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACSubscriptionDisplay','economical','Specify how to display subscription information in the OPAC','economical|off|full','Choice')"); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -14,6 +14,7 @@ Circulation: whitespace: Remove spaces from cuecat: Convert from CueCat form T-prefix: Remove the first number from T-prefix style + libsuite8: Convert from Libsuite8 form - scanned patron barcodes. - - Sort previous checkouts on the circulation page from --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -301,7 +301,7 @@ function refocus(calendar) { -
  • The barcode was not found
  • +
  • The barcode was not found
  • --