Bugzilla – Attachment 3752 Details for
Bug 6093
Barcode incrementation does not work with hbyymmincr mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Correct the query to find the greater barcode in database
0001-Bug-6093-Correct-the-query-to-find-the-greater-barco.patch (text/plain), 1.15 KB, created by
Alex Arnaud
on 2011-04-06 14:50:50 UTC
(
hide
)
Description:
Correct the query to find the greater barcode in database
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2011-04-06 14:50:50 UTC
Size:
1.15 KB
patch
obsolete
>From 0811d668ee33aece1c86bebd171d04e012ae8b58 Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Wed, 6 Apr 2011 16:49:53 +0200 >Subject: [PATCH] Bug #6093 - Correct the query to find the greater barcode in database > >--- > cataloguing/value_builder/barcode.pl | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/cataloguing/value_builder/barcode.pl b/cataloguing/value_builder/barcode.pl >index 3c6ef74..9987a27 100755 >--- a/cataloguing/value_builder/barcode.pl >+++ b/cataloguing/value_builder/barcode.pl >@@ -99,7 +99,7 @@ sub plugin_javascript { > } > elsif ($autoBarcodeType eq 'hbyymmincr') { # Generates a barcode where hb = home branch Code, yymm = year/month catalogued, incr = incremental number, reset yearly -fbcit > $year = substr($year, -2); >- $query = "SELECT MAX(CAST(SUBSTRING(barcode,7,4) AS signed)) FROM items WHERE barcode REGEXP ?"; >+ $query = "SELECT MAX(CAST(SUBSTRING(barcode,-4) AS signed)) FROM items WHERE barcode REGEXP ?"; > my $sth = $dbh->prepare($query); > $sth->execute("^[a-zA-Z]{1,}$year"); > while (my ($count)= $sth->fetchrow_array) { >-- >1.6.3.3 >
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 6093
: 3752