changing the default.css style sheets to handle the new navibar/buttons
[fa-stable.git] / purchasing / manage / suppliers.php
index 1748de25deeabac4c2902c1ec879454ef08111bd..3ac981fec411176331a9ca63434ff2a3d0a7c234 100644 (file)
@@ -12,6 +12,10 @@ include($path_to_root . "/includes/ui.inc");
 
 check_db_has_tax_groups(_("There are no tax groups defined in the system. At least one tax group is required before proceeding."));
 
+if (isset($_GET['supplier_id'])) 
+{
+       $_POST['supplier_id'] = $_GET['supplier_id'];
+}
 $new_supplier = get_post('supplier_id') == ''; 
 
 if (isset($_POST['submit'])) 
@@ -76,8 +80,7 @@ if (isset($_POST['submit']))
                        $_POST['supplier_id'] = db_insert_id();
                        $new_supplier = false;
                        display_notification(_("A new supplier has been added."));
-                       $Ajax->activate('supplier_id');
-                       $Ajax->activate('controls');
+                       $Ajax->activate('_page_body');
                }
        }
 
@@ -121,6 +124,10 @@ 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();
 
@@ -134,7 +141,7 @@ if (db_has_suppliers())
 } 
 else 
 {
-       hidden('supplier_id', $_POST['supplier_id']);
+       hidden('supplier_id', get_post('supplier_id'));
 }
 
 //start_table("class='tablestyle2'", 0, 3);
@@ -226,6 +233,7 @@ if (!$new_supplier)
 {
        submit_center_first('submit', _("Update Supplier"), 
          _('Update supplier data'), true);
+       submit_return('select', _("Return"), _("Select this supplier and return to document entry."), true);
        submit_center_last('delete', _("Delete Supplier"), 
          _('Delete supplier data if have been never used'), true);
 }