Couldn't use the date picker in the new transaction tabs in customer/supplier/items.
[fa-stable.git] / purchasing / manage / suppliers.php
index 64b2cb5c9d0115e19160d7a7307ba927820ea6ed..b545115e9c7d8a60ce91c506ae58d45cd386c7d8 100644 (file)
 ***********************************************************************/
 $page_security = 'SA_SUPPLIER';
 $path_to_root = "../..";
-include($path_to_root . "/includes/session.inc");
+include($path_to_root . "/includes/db_pager.inc");
+include_once($path_to_root . "/includes/session.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 
 page(_($help_context = "Suppliers"), @$_REQUEST['popup'], false, "", $js);
 
@@ -149,17 +152,7 @@ function supplier_settings(&$supplier_id)
        table_section_title(_("General"));
        textarea_row(_("General Notes:"), 'notes', null, 35, 5);
        if ($supplier_id)
-       {
                record_status_list_row(_("Supplier status:"), 'inactive');
-               if (!@$_REQUEST['popup'])
-               {
-                       start_row();
-                       echo '<td class="label"> </td><td>';
-                       echo viewer_link('<b>'. _('Supplier Inquiry').'</b>', "purchasing/inquiry/supplier_inquiry.php?supplier_id=$supplier_id&popup=1"); 
-                       echo "</td>\n"; 
-                       end_row();
-               }       
-       }
        else {
                table_section_title(_("Contact Data"));
                text_row(_("Contact Person:"), 'contact', null, 42, 40);
@@ -312,6 +305,8 @@ if (!$supplier_id)
 tabbed_content_start('tabs', array(
                'settings' => array(_('&General settings'), $supplier_id),
                'contacts' => array(_('&Contacts'), $supplier_id),
+               'transactions' => array(_('&Transactions'), $supplier_id),
+               'orders' => array(_('Purchase &Orders'), $supplier_id),
        ));
        
        switch (get_post('_tabs_sel')) {
@@ -323,7 +318,16 @@ tabbed_content_start('tabs', array(
                        $contacts = new contacts('contacts', $supplier_id, 'supplier');
                        $contacts->show();
                        break;
+               case 'transactions':
+                       $_GET['supplier_id'] = $supplier_id;
+                       $_GET['popup'] = 1;
+                       include_once($path_to_root."/purchasing/inquiry/supplier_inquiry.php");
+                       break;
                case 'orders':
+                       $_GET['supplier_id'] = $supplier_id;
+                       $_GET['popup'] = 1;
+                       include_once($path_to_root."/purchasing/inquiry/po_search_completed.php");
+                       break;
        };
 br();
 tabbed_content_end();