Bugzilla – Attachment 42104 Details for
Bug 11273
Barcode generation hbyymmincr (AutoBarcode) in acquisitions is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 11273: FIX barcode generation in acquisition if hbyymmincr
Signed-off-Bug-11273-FIX-barcode-generation-in-acq.patch (text/plain), 2.23 KB, created by
Marc Véron
on 2015-08-31 09:26:57 UTC
(
hide
)
Description:
[Signed-off] Bug 11273: FIX barcode generation in acquisition if hbyymmincr
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-08-31 09:26:57 UTC
Size:
2.23 KB
patch
obsolete
>From c60c6b4d5612943fb17ff6f9cdeb68f58e5f05f9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 14 Jul 2015 13:12:46 +0100 >Subject: [PATCH] [Signed-off] Bug 11273: FIX barcode generation in > acquisition if hbyymmincr >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >When AutoBarcode is activated and you have set AcqCreateItem to 'on >order' there is a Javascript error when you try to generate a barcode >for the item: > >TypeError: document.f is undefined >http://localhost:8080/intranet-tmpl/lib/jquery/jquery.js >Line 11 > >Test plan: >0/ a. Set AutoBarcode to hbyymmincr > b. Set AcqCreateItem to 'on ordering' > c. Set the plugin barcode.pl to the barcode field for the default > and the ACQ frameworks >1/ Go on the add items page (cataloguing/additem.pl) and confirm that >the plugin works as expected. >2/ Go on the New order page (acqui/neworderempty.pl) and confirm that >the plugin works as expected. > >Followed test plan, works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > C4/Barcodes/ValueBuilder.pm | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/C4/Barcodes/ValueBuilder.pm b/C4/Barcodes/ValueBuilder.pm >index 686ad78..c8cfe59 100644 >--- a/C4/Barcodes/ValueBuilder.pm >+++ b/C4/Barcodes/ValueBuilder.pm >@@ -60,13 +60,17 @@ sub get_barcode { > $nextnum = $year . $month . $nextnum; > warn "New hbyymmincr Barcode = $nextnum" if $DEBUG; > my $scr = " >- for (i=0 ; i<document.f.field_value.length ; i++) { >- if (document.f.tag[i].value == '$args->{loctag}' && document.f.subfield[i].value == '$args->{locsubfield}') { >+ var form = document.getElementById('f'); >+ if ( !form ) { >+ form = document.getElementById('Aform'); >+ } >+ for (i=0 ; i<form.field_value.length ; i++) { >+ if (form.tag[i].value == '$args->{loctag}' && form.subfield[i].value == '$args->{locsubfield}') { > fnum = i; > } > } > if (\$('#' + id).val() == '') { >- \$('#' + id).val(document.f.field_value[fnum].value + '$nextnum'); >+ \$('#' + id).val(form.field_value[fnum].value + '$nextnum'); > } > "; > return $nextnum, $scr; >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11273
:
40989
|
42104
|
42372