Asynchronous customer/supplier/item selection now use popup window.
[fa-stable.git] / purchasing / manage / suppliers.php
index 0df75281dbe0561fcd39395dd1338b0222c3c836..45c4d1198d49039c1012d018fc765c828a8a7f12 100644 (file)
@@ -13,7 +13,7 @@ $page_security=5;
 $path_to_root="../..";
 include($path_to_root . "/includes/session.inc");
 
-page(_("Suppliers"));
+page(_("Suppliers"), @$_REQUEST['popup']);
 
 //include($path_to_root . "/includes/date_functions.inc");
 
@@ -156,10 +156,6 @@ elseif (isset($_POST['delete']) && $_POST['delete'] != "")
                $Ajax->activate('_page_body');
        } //end if Delete supplier
 }
-elseif (isset($_POST['select']))
-{
-       context_return(array('supplier_id' => $_POST['supplier_id']));
-}
 
 start_form();
 
@@ -244,7 +240,7 @@ text_row(_("Fax Number:"), 'fax', null, 42, 40);
 
 email_row(_("E-mail:"), 'email', null, 35, 55);
 link_row(_("Website:"), 'website', null, 35, 55);
-text_row(_("Supplier Account No.:"), 'supp_account_no', null, 42, 40);
+text_row(_("Our Customer No:"), 'supp_account_no', null, 42, 40);
 
 table_section_title(_("Addresses"));
 textarea_row(_("Mailing Address:"), 'address', null, 35, 5);
@@ -301,8 +297,8 @@ div_start('controls');
 if (!$new_supplier) 
 {
        submit_center_first('submit', _("Update Supplier"), 
-         _('Update supplier data'), 'default');
-       submit_return('select', _("Return"), _("Select this supplier and return to document entry."), 'cancel');
+         _('Update supplier data'), true);
+       submit_return('select', get_post('supplier_id'), _("Select this supplier and return to document entry."));
        submit_center_last('delete', _("Delete Supplier"), 
          _('Delete supplier data if have been never used'), true);
 }
@@ -311,6 +307,7 @@ else
        submit_center('submit', _("Add New Supplier Details"), true, '', 'default');
 }
 div_end();
+hidden('popup', @$_REQUEST['popup']);
 end_form();
 
 end_page();