LP#1319519 Add to PO limits to new/pending PO's
authorBill Erickson <berick@esilibrary.com>
Wed, 14 May 2014 18:43:56 +0000 (14:43 -0400)
committerBen Shum <bshum@biblio.org>
Wed, 6 Aug 2014 18:21:47 +0000 (14:21 -0400)
Limit the auto-select output of the PO name text box when adding
records/lineitems to existing PO's to PO's with the "new" or "pending"
statuses.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/acq/common/add_to_po.tt2

index 370bd28..724cac7 100644 (file)
@@ -44,7 +44,9 @@
                 <tr>
                     <td><label>[% l('Enter the PO Name: ') %]</label></td>
                     <td>
-                        <input jsId="addToPoInput" dojoType="openils.widget.PCrudAutocompleteBox" fmclass="acqpo" searchAttr="name" name="target_po" />
+                        <input jsId="addToPoInput" dojoType="openils.widget.PCrudAutocompleteBox" 
+                          store_options="{base_filter:{state:['new','pending']}}"
+                          fmclass="acqpo" searchAttr="name" name="target_po" />
 
                         </td>
                 </tr>