Transform TADL patron barcodes in xul
authorJeff Godin <jgodin@tadl.org>
Thu, 26 Jul 2012 06:52:37 +0000 (02:52 -0400)
committerJeff Godin <jgodin@tadl.org>
Sun, 22 May 2016 03:50:32 +0000 (23:50 -0400)
Transform TADL patron barcodes in barcode_entry.xul, used when
retrieving a patron from the system.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/xul/staff_client/server/patron/barcode_entry.xul

index 9c57135..c303bec 100644 (file)
 
                 if (!barcode) { sound.bad(); add_msg($("patronStrings").getString('staff.patron.barcode_entry.no_barcode')); tb.select(); tb.focus(); return; }
 
+                // TADL patron barcode transforms
+                if (barcode.length == 27 || barcode.length == 25) {
+                    var bcode = barcode.substring(0,13); barcode = bcode.toLowerCase();
+                }
+                if (barcode.length == 23) { var bcode = barcode.substring(0,11); barcode = bcode.toLowerCase(); }
+
                 JSAN.use('util.network'); var net = new util.network();
 
                 tb.disabled = true;