From 66dcf703d49573191d5b34a36671940db57ff81b Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 6 Jun 2016 10:11:36 -0400 Subject: [PATCH] Bug 14752 - (QA followup) Remove annoying modal, use dialog box instead - Uses a dialog box to warn of unique fields not copying, dialog was in place for barcode generation so removed the extar modal completey - Fixes a problem when barcode was undefined and autobarcode on - deleted an extra space in Barcodes/hbymmincr.pm Signed-off-by: sonia BOUIS --- C4/Barcodes/hbyymmincr.pm | 2 +- acqui/addorder.pl | 2 +- .../intranet-tmpl/prog/en/includes/additem.js.inc | 1 + .../prog/en/modules/acqui/neworderempty.tt | 16 ---------------- koha-tmpl/intranet-tmpl/prog/js/additem.js | 8 ++++++-- 5 files changed, 9 insertions(+), 20 deletions(-) diff --git a/C4/Barcodes/hbyymmincr.pm b/C4/Barcodes/hbyymmincr.pm index 64f85c4..6b41e36 100644 --- a/C4/Barcodes/hbyymmincr.pm +++ b/C4/Barcodes/hbyymmincr.pm @@ -41,7 +41,7 @@ BEGIN { sub db_max { my $self = shift; my $width = WIDTH; - my $query = "SELECT SUBSTRING(barcode,-$width) AS chunk, barcode FROM items WHERE barcode REGEXP ? ORDER BY chunk DESC LIMIT 1"; + my $query = "SELECT SUBSTRING(barcode,-$width) AS chunk, barcode FROM items WHERE barcode REGEXP ? ORDER BY chunk DESC LIMIT 1"; $debug and print STDERR "(hbyymmincr) db_max query: $query\n"; my $sth = C4::Context->dbh->prepare($query); my ($iso); diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 80f01c6..5223b7f 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -316,7 +316,7 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { 'ITEM'); my $record=MARC::Record::new_from_xml($xml, 'UTF-8'); my ($barcodefield,$barcodesubfield) = GetMarcFromKohaField('items.barcode'); - my $barcode = $record->subfield($barcodefield,$barcodesubfield); + my $barcode = $record->subfield($barcodefield,$barcodesubfield) || ''; my $aBpref = C4::Context->preference('autoBarcode'); if( $barcode eq '' && $aBpref ne 'OFF'){ my $barcodeobj; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc index 1ecee30..d7cd4d7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/additem.js.inc @@ -3,6 +3,7 @@ var MSG_ADDITEM_JS_ADDITEM = _("Add item"); var MSG_ADDITEM_JS_ADDMULTI = _("Add multiple items"); var MSG_ADDITEM_JS_MULTIVAL = _("Number of items to add"); +var MSG_ADDITEM_JS_MULTI_UNIQUE_NOTE = _("NOTE: Fields listed in the \'UniqueItemsFields\' system preference will not be copied"); var MSG_ADDITEM_JS_SUBMITMULTI = _("Add"); var MSG_ADDITEM_JS_UPDATEITEM = _("Update item"); var MSG_ADDITEM_JS_EDIT = _("Edit"); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index fe659a6..6497721 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -658,22 +658,6 @@ $(document).ready(function() -[% IF UniqueItemFields %] - -[% END %] -