From 2bb5080521c328bc94a8981c406c5c5ce4e2df76 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Mon, 16 May 2011 12:12:40 -0400 Subject: [PATCH] persist partial changes to new copies in vol/copy editor has new copies are gathered. In other words, you can do something like enter 5 in the "# of Copies" field, enter the first barcode (say b1), edit an attribute (say, set Circulate = No), and then enter a second barcode (b2). Previously, the changes made to b1 would be lost as b2 was entered (or as other movement around the barcode entry textboxes happened) and both copies would get a Circulate = Yes, but now in this scenario, you would see 1 copy set to No and 1 copy set to Yes for the Circulate attribute. Signed-off-by: Jason Etheridge --- Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js index 9656044205..1aea205c1d 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js +++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js @@ -875,6 +875,9 @@ g.gather_copies = function() { for (var i = 0; i < barcodes.length; i++) { var acp_id = barcodes[i].getAttribute('acp_id') || g.new_acp_id--; + if (acp_id < 0) { + barcodes[i].setAttribute('acp_id',acp_id); + } var ou_id = barcodes[i].getAttribute('ou_id'); var callnumber_composite_key = barcodes[i].getAttribute('callkey'); var barcode = barcodes[i].value; -- 2.11.0