Asynchronous customer/supplier/item selection now use popup window.
[fa-stable.git] / purchasing / po_entry_items.php
index 2ab43bb791dd1a752fa6239751f67f640df99d63..0bf90f9b8c9d0e6535b35fd4dd707ff47eef569c 100644 (file)
@@ -38,26 +38,8 @@ check_db_has_suppliers(_("There are no suppliers defined in the system."));
 check_db_has_purchasable_items(_("There are no purchasable inventory items defined in the system."));
 
 //---------------------------------------------------------------------------------------------------------------
-if ($ret = context_restore()) {
- // return from supplier/items editors
-       copy_from_cart();
-       if(isset($ret['supplier_id']))
-               $_POST['supplier_id'] = $ret['supplier_id'];
-       if(isset($ret['stock_id'])) {
-               $_POST['stock_id'] = $_POST['_stock_id_edit'] = $ret['stock_id'];
-               set_focus('qty');
-       }
-}
-if (isset($_POST['_supplier_id_editor'])) {
-       copy_to_cart();
-       context_call($path_to_root.'/purchasing/manage/suppliers.php?supplier_id='.$_POST['supplier_id'], 'PO');
-}
-
-if (isset($_POST['_stock_id_editor'])) {
-       copy_to_cart();
-       context_call($path_to_root.'/inventory/manage/items.php?stock_id='.$_POST['stock_id'], 'PO');
-}
-//------------------------------------------------------------------------------
+set_editor('supplier', 'supplier_id' , 'ref');
+set_editor('item', 'stock_id' , 'qty');
 
 if (isset($_GET['AddedID'])) 
 {