Fix a serial batch receive problem reported by Sally Fortin
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 13 Jun 2011 20:40:07 +0000 (16:40 -0400)
committerDan Wells <dbw2@calvin.edu>
Mon, 13 Jun 2011 21:17:07 +0000 (17:17 -0400)
That prevents receiving items when not using units in some cases.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/xul/staff_client/server/serial/batch_receive.js

index 0009ccb..503a2ec 100644 (file)
@@ -996,7 +996,8 @@ function BatchReceiver() {
              * they start or end in spaces, we'll unintentionally create
              * a new, different CN if we trim that */
             var cn_string = this._row_field_value(id, "call_number");
-            var barcode = this._row_field_value(id, "barcode").trim();
+            var barcode = this._row_field_value(id, "barcode");
+            if (barcode && barcode.trim) barcode = barcode.trim();
 
             if (barcode && cn_string.length) {
                 var unit = new sunit();