LP1187016 Prevent new copies on activated POs
authorBill Erickson <berick@esilibrary.com>
Wed, 5 Jun 2013 21:29:36 +0000 (17:29 -0400)
committerBen Shum <bshum@biblio.org>
Mon, 8 Jul 2013 14:44:25 +0000 (10:44 -0400)
If a PO has already been activated, prevent users from adding new copies
in the Item Count entry under the full lineitem copy grid.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/web/js/ui/default/acq/common/li_table.js

index f007bf6..16665c4 100644 (file)
@@ -1734,6 +1734,12 @@ function AcqLiTable() {
         acqLitBatchUpdateCopies.onClick = function() { self.batchCopyUpdate() };
         acqLitCopyCountInput.attr('value', '0');
 
+        if (this.isPO && PO && PO.order_date()) {
+            // prevent adding copies to activated POs
+            acqLitCopyCountInput.attr('disabled', true);
+            acqLitAddCopyCount.attr('disabled', true);
+        }
+
         while(this.copyTbody.childNodes[0])
             this.copyTbody.removeChild(this.copyTbody.childNodes[0]);