From: erickson Date: Mon, 4 May 2009 19:50:42 +0000 (+0000) Subject: added ordering agency field to create-po dialog X-Git-Tag: sprint4-merge-nov22~10083 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7ff46a5283ea1e1761c053c8c6f5f0551e95c859;p=working%2FEvergreen.git added ordering agency field to create-po dialog git-svn-id: svn://svn.open-ils.org/ILS/trunk@13056 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js index aeecd18c8d..d315024fde 100644 --- a/Open-ILS/web/js/ui/default/acq/common/li_table.js +++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js @@ -338,6 +338,7 @@ function AcqLiTable() { this.removeLineitem = function(liId) { this.tbody.removeChild(dojo.query('[li='+liId+']', this.tbody)[0]); delete this.liCache[liId]; + //selected.push(self.liCache[i.parentNode.parentNode.getAttribute('li')]); } this.drawInfo = function(liId) { @@ -678,12 +679,24 @@ function AcqLiTable() { fmField : 'provider', fmClass : 'acqpo', parentNode : dojo.byId('acq-lit-po-provider'), - orgLimitPerms : ['CREATE_PURCHASE_ORDER'], }); widget.build( function(w) { self.createPoProviderSelector = w; } ); } + + if(!this.createPoAgencySelector) { + var widget = new openils.widget.AutoFieldWidget({ + fmField : 'ordering_agency', + fmClass : 'acqpo', + parentNode : dojo.byId('acq-lit-po-agency'), + orgLimitPerms : ['CREATE_PURCHASE_ORDER'], + }); + widget.build( + function(w) { self.createPoAgencySelector = w; } + ); + } + acqLitPoCreateDialog.show(); break; @@ -834,6 +847,7 @@ function AcqLiTable() { this.show('acq-lit-progress-numbers'); var po = new fieldmapper.acqpo(); po.provider(this.createPoProviderSelector.attr('value')); + po.ordering_agency(this.createPoAgencySelector.attr('value')); var selected = this.getSelected( (fields.create_from == 'all') ); if(selected.length == 0) return; diff --git a/Open-ILS/web/templates/default/acq/common/li_table.tt2 b/Open-ILS/web/templates/default/acq/common/li_table.tt2 index 05c2e58ec3..14614d1c7a 100644 --- a/Open-ILS/web/templates/default/acq/common/li_table.tt2 +++ b/Open-ILS/web/templates/default/acq/common/li_table.tt2 @@ -320,6 +320,10 @@
+ + + +
Ordering Agency
Provider