Popup editors now available as option for some list selectors.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 25 Jul 2009 12:17:44 +0000 (12:17 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 25 Jul 2009 12:17:44 +0000 (12:17 +0000)
27 files changed:
CHANGELOG.txt
gl/gl_bank.php
gl/includes/ui/gl_bank_ui.inc
includes/page/footer.inc
includes/session.inc
includes/ui/ui_controls.inc
includes/ui/ui_lists.inc
inventory/purchasing_data.php
js/inserts.js
purchasing/allocations/supplier_allocation_main.php
purchasing/includes/ui/po_ui.inc
purchasing/po_entry_items.php
purchasing/supplier_credit.php
purchasing/supplier_invoice.php
purchasing/supplier_payment.php
sales/allocations/customer_allocation_main.php
sales/credit_note_entry.php
sales/customer_payments.php
sales/includes/ui/sales_credit_ui.inc
sales/includes/ui/sales_order_ui.inc
sales/sales_order_entry.php
themes/aqua/default.css
themes/aqua/renderer.php
themes/cool/default.css
themes/cool/renderer.php
themes/default/default.css
themes/default/renderer.php

index 6a4a8fcbd2581ccc07bf6762ae65aa7cba87b156..74cf20db7dfb636b1eeafc97f7b13237698e5ad2 100644 (file)
@@ -19,6 +19,35 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+25-Jul-2009 Janusz Dobrowolski
+! Popup editor now available as option for some list selectors.
+$ /includes/ui/ui_lists.inc
+  /gl/gl_bank.php
+  /gl/includes/ui/gl_bank_ui.inc
+  /includes/session.inc
+  /includes/page/footer.inc
+  /includes/ui/ui_controls.inc
+  /inventory/purchasing_data.php
+  /js/inserts.js
+  /purchasing/po_entry_items.php
+  /purchasing/supplier_credit.php
+  /purchasing/supplier_invoice.php
+  /purchasing/supplier_payment.php
+  /purchasing/allocations/supplier_allocation_main.php
+  /purchasing/includes/ui/po_ui.inc
+  /sales/credit_note_entry.php
+  /sales/customer_payments.php
+  /sales/sales_order_entry.php
+  /sales/allocations/customer_allocation_main.php
+  /sales/includes/ui/sales_credit_ui.inc
+  /sales/includes/ui/sales_order_ui.inc
+  /themes/aqua/default.css
+  /themes/aqua/renderer.php
+  /themes/cool/default.css
+  /themes/cool/renderer.php
+  /themes/default/default.css
+  /themes/default/renderer.php
+
 21-Jul-2009 Janusz Dobrowolski
 ! Asynchronous customer/supplier/item selection now use popup window.
 $ /index.php
index a9d969a2ec77657f326903d63e5cb086ff2875f0..34218c6f275b6b59a0730e0395655fee1d16d758 100644 (file)
@@ -41,10 +41,6 @@ page($_SESSION['page_title'], false, false, '', $js);
 check_db_has_bank_accounts(_("There are no bank accounts defined in the system."));
 
 //----------------------------------------------------------------------------------------
-set_editor('supplier', 'person_id' , 'ref');
-set_editor('customer', 'person_id' , 'ref');
-set_editor('branch', 'PersonDetailID' , 'ref');
-
 if (list_updated('PersonDetailID')) {
        $br = get_branch(get_post('PersonDetailID'));
        $_POST['person_id'] = $br['debtor_no'];
index 4693ec34b0b3d571df6cb94caf1fb90485df0274..f42e8e36b96dcd94b71e4cce443daa823880c529 100644 (file)
@@ -44,6 +44,8 @@ function display_bank_header(&$order)
                $_POST['person_id'] = '';
                $Ajax->activate('pmt_header');
                $Ajax->activate('code_id');
+               $Ajax->activate('pagehelp');
+               $Ajax->activate('editors');
        }
     payment_person_types_list_row( $payment ? _("Pay To:"):_("From:"),
                 'PayType', $_POST['PayType'], true);
@@ -57,14 +59,15 @@ function display_bank_header(&$order)
        //      workorders_list_row(_("Work Order:"), 'person_id', null);
        //      break;
                case payment_person_types::supplier() :
-               supplier_list_row(_("Supplier:"), 'person_id', null, false, true);
+               supplier_list_row(_("Supplier:"), 'person_id', null, false, true, false, true);
                break;
                case payment_person_types::customer() :
-               customer_list_row(_("Customer:"), 'person_id', null, false, true);
+               customer_list_row(_("Customer:"), 'person_id', null, false, true, false, true);
 
                if (db_customer_has_branches($_POST['person_id']))
                {
-                       customer_branches_list_row(_("Branch:"), $_POST['person_id'], 'PersonDetailID', null, false, true, true);
+                       customer_branches_list_row(_("Branch:"), $_POST['person_id'], 
+                                       'PersonDetailID', null, false, true, true, true);
                }
                else
                {
index da53a925c1e93e63cdafa7b45aa078d10142f5d0..7256dfe1aa41cb4910993cc2dc22b03c9b703d8f 100644 (file)
 ***********************************************************************/
 function page_footer($no_menu=false, $is_index=false)
 {
-       global $path_to_root, $js_lib, $Validate, $Editors;
-
-       if (in_ajax())
-               return;// just for speed up
+       global $path_to_root, $js_lib, $Validate, $Editors, $Ajax;
 
        if (!$is_index && function_exists('hyperlink_back'))
                hyperlink_back();
@@ -22,10 +19,13 @@ function page_footer($no_menu=false, $is_index=false)
        $rend = new renderer();
        $rend->menu_footer($no_menu, $is_index);
 
+       $edits = "editors = ".JsHttpRequest::php2js($Editors).";";
+       $Ajax->addScript('editors', $edits);
+
        echo "<script>
                _focus = '" . get_post('_focus') . "';
                _validate = " . JsHttpRequest::php2js($Validate).";
-               var editors = ".JsHttpRequest::php2js($Editors).";
+               var $edits
        </script>";
 
        add_user_js_data();
index d53e9b63e660cd154fd9fcdc5c49f40fb45a53eb..e327b3bbe96a0430d2bf9472e33e5dc9b64cf759 100644 (file)
@@ -145,6 +145,8 @@ $Ajax =& new Ajax();
 $Validate = array();
 // bindings for editors
 $Editors = array();
+// page help. Currently help for function keys.
+$Pagehelp = array();
 
 // intercept all output to destroy it in case of ajax call
 register_shutdown_function('end_flush');
index 7b518e57108cb567944bd59937a8809a52c18001..b05eaa80c64365e5ebdb2ebcb6dc7b34b2e016da 100644 (file)
@@ -322,40 +322,39 @@ function div_end()
     }
 }
 
+/* Table editor interfaces. Key is editor type
+       0 => url of editor page
+       1 => hotkey code
+       2 => context help
+*/
+$popup_editors = array(
+       'customer' => array('/sales/manage/customers.php?debtor_no=', 
+               113,    _("Customers")),
+       'branch' => array('/sales/manage/customer_branches.php?SelectedBranch=', 
+               114, _("Branches")),
+       'supplier' => array('/purchasing/manage/suppliers.php?supplier_id=', 
+               113, _("Suppliers")),
+       'item' => array('/inventory/manage/items.php?stock_id=', 
+               115, _("Items"))
+);
 /*
        Bind editors for various selectors.
        $type - type of editor
-       $input - array org_input => editor_input
-       $focus - focus after selection
+       $input - name of related input field
+       $caller - optional function key code (available values F1-F12: 112-123,
+               true: default)
 */
-function set_editor($type, $input, $focus=null) 
+function set_editor($type, $input, $caller=true)
 {
-       global $path_to_root, $Editors;
-       // table of table editor interfaces.
-       // key is editor type, values contain:
-       // 0 => url of editor page
-       // 1 => array of names of parameters returned back from editor interface
-       // 2 => hotkey code
+       global $path_to_root, $Editors, $popup_editors, $Pagehelp;
 
-       if($focus === null) {
-               $focus = $caller;
-       }
-       $urls = array(
-               'customer' => array('/sales/manage/customers.php?debtor_no=', 
-                       113,    _("F2 - Customers")),
-               'branch' => array('/sales/manage/customer_branches.php?SelectedBranch=', 
-                       114, _("F3 - Branches")),
-               'supplier' => array('/purchasing/manage/suppliers.php?supplier_id=', 
-                       113, _("F2 - Suppliers")),
-               'item' => array('/inventory/manage/items.php?stock_id=', 
-                       115, _("F4 - Items"))
-       );
-       $back = array();
-       $caller = $urls[$type][1];
-       $Editors[$caller] = array( $path_to_root . $urls[$type][0], $input, $focus);
-
-// FIX status comments
+       $key = $caller===true ? $popup_editors[$type][1] : $caller;
 
+       $Editors[$key] = array( $path_to_root . $popup_editors[$type][0], $input);
+       
+       $help = 'F' . ($key - 111) . ' - ';
+       $help .= $popup_editors[$type][2];
+       $Pagehelp[] = $help;
 }
 //------------------------------------------------------------------------------
 // Procedures below are now obsolete. Preserved for eventual future use.
index 672f1950d98d518799e982399f4d9ea22ab6c52f..b2332aeab064e42ad5981ff045a663fde8260c03 100644 (file)
@@ -68,7 +68,7 @@ $opts = array(                // default options
 
        $search_box = $opts['search_box']===true ? '_'.$name.'_edit' : $opts['search_box'];
        $search_submit = $opts['search_submit']===true ? '_'.$name.'_button' : $opts['search_submit'];
-       $select_submit =  $opts['select_submit']===true ? '_'.$name.'_update' : $opts['select_submit'];
+       $select_submit =  $opts['select_submit'];
        $spec_id = $opts['spec_id'];
        $spec_option = $opts['spec_option'];
        $by_id = ($opts['type'] == 0);
@@ -94,7 +94,7 @@ $opts = array(                // default options
        $rel = '';
        $limit = '';
 
-       if (isset($_POST[$select_submit])) {
+       if (isset($_POST['_'.$name.'_update'])) {
                if ($by_id) $txt = $_POST[$name];
 
                if (!$opts['async'])
@@ -222,7 +222,7 @@ $opts = array(              // default options
        // button class selects form reload/ajax selector update
                $selector .= sprintf($_select_button, $disabled, user_theme(),
                        (fallback_mode() ? '' : 'display:none;'),
-                       $select_submit)."\n";
+                        '_'.$name.'_update')."\n";
        }
 // ------ make combo ----------
 
@@ -281,7 +281,7 @@ $opts = array(              // default options
 // ------ merge options with defaults ----------
        if($options != null)
                $opts = array_merge($opts, $options);
-       $select_submit =  $opts['select_submit']===true ? '_'.$name.'_update' : $opts['select_submit'];
+       $select_submit =  $opts['select_submit'];
        $spec_id = $opts['spec_id'];
        $spec_option = $opts['spec_option'];
        $disabled = $opts['disabled'] ? "disabled" : '';
@@ -290,7 +290,7 @@ $opts = array(              // default options
                $selected_id = get_post($name, $opts['default']);
        }
 
-       if (isset($_POST[$select_submit])) {
+       if (isset($_POST[ '_'.$name.'_update'])) {
                if (!$opts['async'])
                        $Ajax->activate('_page_body');
                else
@@ -340,7 +340,7 @@ $opts = array(              // default options
                global $_select_button;
                $selector .= sprintf($_select_button, $disabled, user_theme(),
                        (fallback_mode() ? '' : 'display:none;'),
-                       $select_submit)."\n";
+                        '_'.$name.'_update')."\n";
        }
        default_focus($name);
        echo $selector;
@@ -362,7 +362,7 @@ function _format_add_curr($row)
 }
 
 function supplier_list($name, $selected_id=null, $spec_option=false, $submit_on_change=false,
-       $all=false)
+       $all=false, $editkey = false)
 {
        global $all_items;
 
@@ -370,6 +370,9 @@ function supplier_list($name, $selected_id=null, $spec_option=false, $submit_on_
 
        $mode = get_company_pref('no_supplier_list');
 
+       if ($editkey)
+               set_editor('supplier', $name, $editkey);
+               
        return combo_input($name, $selected_id, $sql, 'supplier_id', 'supp_name',
        array(
                'format' => '_format_add_curr',
@@ -386,25 +389,29 @@ function supplier_list($name, $selected_id=null, $spec_option=false, $submit_on_
 }
 
 function supplier_list_cells($label, $name, $selected_id=null, $all_option=false, 
-       $submit_on_change=false, $all=false)
+       $submit_on_change=false, $all=false, $editkey = false)
 {
        if ($label != null)
                echo "<td>$label</td><td>\n";
-       $str = supplier_list($name, $selected_id, $all_option, $submit_on_change, $all);
+       $str = supplier_list($name, $selected_id, $all_option, $submit_on_change, 
+               $all, $editkey);
                echo "</td>\n";
        return $str;
 }
 
-function supplier_list_row($label, $name, $selected_id=null, $all_option = false, $submit_on_change=false)
+function supplier_list_row($label, $name, $selected_id=null, $all_option = false, 
+       $submit_on_change=false, $all=false, $editkey = false)
 {
 echo "<tr><td>$label</td><td>";
-       $str = supplier_list($name, $selected_id, $all_option, $submit_on_change );
+       $str = supplier_list($name, $selected_id, $all_option, $submit_on_change,
+               $all, $editkey);
 echo "</td></tr>\n";
 return $str;
 }
 //----------------------------------------------------------------------------------------------
 
-function customer_list($name, $selected_id=null, $spec_option=false, $submit_on_change=false, $show_inactive=false)
+function customer_list($name, $selected_id=null, $spec_option=false, $submit_on_change=false, 
+       $show_inactive=false, $editkey = false)
 {
        global $all_items;
 
@@ -412,6 +419,9 @@ function customer_list($name, $selected_id=null, $spec_option=false, $submit_on_
 
        $mode = get_company_pref('no_customer_list');
 
+       if ($editkey)
+               set_editor('customer', $name, $editkey);
+
 return combo_input($name, $selected_id, $sql, 'debtor_no', 'name',
        array(
            'format' => '_format_add_curr',
@@ -429,23 +439,23 @@ return combo_input($name, $selected_id, $sql, 'debtor_no', 'name',
 }
 
 function customer_list_cells($label, $name, $selected_id=null, $all_option=false, 
-       $submit_on_change=false, $show_inactive=false)
+       $submit_on_change=false, $show_inactive=false, $editkey = false)
 {
        if ($label != null)
                echo "<td>$label</td>\n";
        echo "<td nowrap>";
        $str = customer_list($name, $selected_id, $all_option, $submit_on_change,
-               $show_inactive);
+               $show_inactive, $editkey);
        echo "</td>\n";
        return $str;
 }
 
 function customer_list_row($label, $name, $selected_id=null, $all_option = false, 
-       $submit_on_change=false, $show_inactive=false)
+       $submit_on_change=false, $show_inactive=false, $editkey = false)
 {
        echo "<tr><td>$label</td><td nowrap>";
        $str = customer_list($name, $selected_id, $all_option, $submit_on_change,
-               $show_inactive);
+               $show_inactive, $editkey);
        echo "</td>\n</tr>\n";
        return $str;
 }
@@ -453,13 +463,16 @@ function customer_list_row($label, $name, $selected_id=null, $all_option = false
 //------------------------------------------------------------------------------------------------
 
 function customer_branches_list($customer_id, $name, $selected_id=null,
-       $spec_option = true, $enabled=true, $submit_on_change=false)
+       $spec_option = true, $enabled=true, $submit_on_change=false, $editkey = false)
 {
        global $all_items;
 
        $sql = "SELECT branch_code, br_name FROM ".TB_PREF."cust_branch
                WHERE debtor_no='" . $customer_id . "' ";
 
+       if ($editkey)
+               set_editor('branch', $name, $editkey);
+
        $where = $enabled ? array("disable_trans = 0") : array();
 return  combo_input($name, $selected_id, $sql, 'branch_code', 'br_name',
        array(
@@ -472,20 +485,24 @@ return  combo_input($name, $selected_id, $sql, 'branch_code', 'br_name',
 }
 //------------------------------------------------------------------------------------------------
 
-function customer_branches_list_cells($label,$customer_id, $name, $selected_id=null, $all_option = true, $enabled=true, $submit_on_change=false)
+function customer_branches_list_cells($label,$customer_id, $name, $selected_id=null, 
+       $all_option = true, $enabled=true, $submit_on_change=false, $editkey = false)
 {
        if ($label != null)
                echo "<td>$label</td>\n";
        echo "<td>";
-       $ret = customer_branches_list($customer_id, $name, $selected_id, $all_option, $enabled, $submit_on_change);
+       $ret = customer_branches_list($customer_id, $name, $selected_id, $all_option, $enabled, 
+               $submit_on_change, $editkey);
        echo "</td>\n";
        return $ret;
 }
 
-function customer_branches_list_row($label,$customer_id, $name, $selected_id=null, $all_option = true, $enabled=true, $submit_on_change=false)
+function customer_branches_list_row($label, $customer_id, $name, $selected_id=null, 
+       $all_option = true, $enabled=true, $submit_on_change=false, $editkey = false)
 {
        echo "<tr>";
-       $ret = customer_branches_list_cells($label, $customer_id, $name, $selected_id, $all_option, $enabled, $submit_on_change);
+       $ret = customer_branches_list_cells($label, $customer_id, $name, $selected_id, 
+               $all_option, $enabled, $submit_on_change, $editkey);
        echo "</tr>";
        return $ret;
 }
@@ -647,13 +664,16 @@ function dimensions_list_row($label, $name, $selected_id=null, $no_option=false,
 //---------------------------------------------------------------------------------------------------
 
 function stock_items_list($name, $selected_id=null, $all_option=false, 
-       $submit_on_change=false, $opts=array())
+       $submit_on_change=false, $opts=array(), $editkey = false)
 {
        global $all_items;
 
        $sql = "SELECT stock_id, s.description, c.description, s.inactive
                        FROM ".TB_PREF."stock_master s,".TB_PREF."stock_category c WHERE s.category_id=c.category_id";
 
+       if ($editkey)
+               set_editor('item', $name, $editkey);
+
        return combo_input($name, $selected_id, $sql, 'stock_id', 's.description',
        array_merge(
          array(
@@ -676,12 +696,12 @@ function _format_stock_items($row)
 }
 
 function stock_items_list_cells($label, $name, $selected_id=null, $all_option=false, 
-       $submit_on_change=false, $all=false)
+       $submit_on_change=false, $all=false, $editkey = false)
 {
        if ($label != null)
                echo "<td>$label</td>\n";
        $str = stock_items_list($name, $selected_id, $all_option, $submit_on_change,
-               array('cells'=>true, 'show_inactive'=>$all));
+               array('cells'=>true, 'show_inactive'=>$all), $editkey);
        return $str;
 }
 /*
@@ -796,20 +816,21 @@ function stock_manufactured_items_list_row($label, $name, $selected_id=null,
 //------------------------------------------------------------------------------------
 
 function stock_component_items_list($name, $parent_stock_id, $selected_id=null,
-       $all_option=false, $submit_on_change=false)
+       $all_option=false, $submit_on_change=false, $editkey = false)
 {
        $str = stock_items_list($name, $selected_id, $all_option, $submit_on_change,
-               array('where'=>array("stock_id != '$parent_stock_id'")));
+               array('where'=>array("stock_id != '$parent_stock_id'")), $editkey);
        return $str;
 }
 
 function stock_component_items_list_cells($label, $name, $parent_stock_id, 
-       $selected_id=null, $all_option=false, $submit_on_change=false)
+       $selected_id=null, $all_option=false, $submit_on_change=false, $editkey = false)
 {
        if ($label != null)
                echo "<td>$label</td>\n";
        $str = stock_items_list($name, $selected_id, $all_option, $submit_on_change,
-               array('where'=>array("stock_id != '$parent_stock_id'"), 'cells'=>true));
+               array('where'=>array("stock_id != '$parent_stock_id'"), 'cells'=>true),
+               $editkey);
        return $str;
 }
 //------------------------------------------------------------------------------------
@@ -834,31 +855,31 @@ function stock_costable_items_list_cells($label, $name, $selected_id=null,
 
 //------------------------------------------------------------------------------------
 function stock_purchasable_items_list($name, $selected_id=null,        
-       $all_option=false, $submit_on_change=false, $all=false)
+       $all_option=false, $submit_on_change=false, $all=false, $editkey=false)
 {
        $str = stock_items_list($name, $selected_id, $all_option, $submit_on_change,
                array('where'=>array("mb_flag!= 'M'"), 
-                       'show_inactive'=>$all));
+                       'show_inactive'=>$all), $editkey);
        return $str;
 }
 
 function stock_purchasable_items_list_cells($label, $name, $selected_id=null,
-                       $all_option=false, $submit_on_change=false, $all=false)
+                       $all_option=false, $submit_on_change=false, $editkey=false)
 {
        if ($label != null)
                echo "<td>$label</td>\n";
        $str = stock_items_list($name, $selected_id, $all_option, $submit_on_change,
                array('where'=>array("mb_flag!= 'M'"), 
-                        'cells'=>true));
+                        'cells'=>true), $editkey);
        return $str;
 }
 
 function stock_purchasable_items_list_row($label, $name, $selected_id=null,
-                       $all_option=false, $submit_on_change=false)
+                       $all_option=false, $submit_on_change=false, $editkey=false)
 {
        echo "<tr>\n";
        $ret = stock_purchasable_items_list_cells($label, $name, $selected_id=null,
-               $all_option, $submit_on_change);
+               $all_option, $submit_on_change, $editkey);
        echo "</tr>\n";
        return $ret;
 }
index 20cf75366e35817bc0bcd50975e7082aad810606..69d4b91eedcfd4f8f92370705fca736ab8028f61 100644 (file)
@@ -24,9 +24,8 @@ check_db_has_purchasable_items(_("There are no purchasable inventory items defin
 check_db_has_suppliers(_("There are no suppliers defined in the system."));
 
 //----------------------------------------------------------------------------------------
-set_editor('supplier', 'supplier_id' , 'supplier_id');
-
 simple_page_mode(true);
+
 //--------------------------------------------------------------------------------------------------
 
 if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
index 6100d2ddeca2ef1c9a6dd7f8830366d8108118c8..489a4b42ff08dbd0d9ffe9ee64277d2ccb41328f 100644 (file)
@@ -160,9 +160,9 @@ function passBack(value) {
                                to[0].value = value; // ugly hack to set selector to any value
                        to.value = value;
                        // update page after item selection
-                       o.JsHttpRequest.request('_'+to.name+'_update');
+                       o.JsHttpRequest.request('_'+to.name+'_update', to.form);
+                       o.setFocus(to.name);
                }
-               o.setFocus(back[2]);
        }
        close();
 }
index 8c11ea9e563d11ea4b7488a399c5b38e140ae79f..2bef7bab9164ee09a0cdb9b518aad507c5786253 100644 (file)
@@ -26,7 +26,6 @@ if ($use_popup_windows)
 page(_("Supplier Allocations"), false, false, "", $js);
 
 //--------------------------------------------------------------------------------
-set_editor('supplier', 'supplier_id' , 'ShowSettled');
 
 start_form();
 
index 2c7d58d76ac801a074cb42138af1c8aa02cad1b6..aa0d8bcc442ab8fe1dab6eba7ff29220a3db6dc9 100644 (file)
@@ -62,7 +62,7 @@ function display_po_header(&$order)
         if (!isset($_POST['supplier_id']) && (get_global_supplier() != reserved_words::get_all()))
                $_POST['supplier_id'] = get_global_supplier();
 
-       supplier_list_row(_("Supplier:"), 'supplier_id', null, false, true);
+       supplier_list_row(_("Supplier:"), 'supplier_id', null, false, true, false, true);
        }
        else
        {
@@ -302,7 +302,7 @@ function po_item_controls(&$order, $stock_id=null)
        {
                hidden('line_no', ($_SESSION['PO']->lines_on_order + 1));
 
-               stock_purchasable_items_list_cells(null, 'stock_id', null, false, true);
+               stock_purchasable_items_list_cells(null, 'stock_id', null, false, false, true);
                if (list_updated('stock_id')) {
                            $Ajax->activate('price');
                            $Ajax->activate('units');
index 0bf90f9b8c9d0e6535b35fd4dd707ff47eef569c..b0d116995a73507ee649bfb39c2d5aab08bee265 100644 (file)
@@ -38,8 +38,6 @@ 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."));
 
 //---------------------------------------------------------------------------------------------------------------
-set_editor('supplier', 'supplier_id' , 'ref');
-set_editor('item', 'stock_id' , 'qty');
 
 if (isset($_GET['AddedID'])) 
 {
index 6f27aa51874fbc29c262059c9a4913101fda05d0..bd2fb08ae0ae717a2640f051bfa20b8660a21f59 100644 (file)
@@ -33,7 +33,6 @@ page(_("Supplier Credit Note"), false, false, "", $js);
 check_db_has_suppliers(_("There are no suppliers defined in the system."));
 
 //---------------------------------------------------------------------------------------------------------------
-set_editor('supplier', 'supplier_id' , 'reference');
 
 if (isset($_GET['AddedID'])) 
 {
index 89ed41b76678fc58f012edcc9ba3e14825cd2555..371dfabc9b71409b7414c67169a63dc8f5ee9cca 100644 (file)
@@ -27,7 +27,6 @@ if ($use_date_picker)
        $js .= get_js_date_picker();
 page(_("Enter Supplier Invoice"), false, false, "", $js);
 
-set_editor('supplier', 'supplier_id' , 'reference');
 //----------------------------------------------------------------------------------------
 
 check_db_has_suppliers(_("There are no suppliers defined in the system."));
index 91db00d4e240953529578a803d662db0faa0a39a..a2603dfb113c43b1710bec4e80384b66fe7b1bee 100644 (file)
@@ -42,7 +42,6 @@ check_db_has_suppliers(_("There are no suppliers defined in the system."));
 check_db_has_bank_accounts(_("There are no bank accounts defined in the system."));
 
 //----------------------------------------------------------------------------------------
-set_editor('supplier', 'supplier_id' , 'bank_account');
 
 if (!isset($_POST['supplier_id']))
        $_POST['supplier_id'] = get_global_supplier(false);
index 5e7d292a872f817b2bc516412fa4fa6105f9c882..e874d53d3879c03ce968558f39e03f68b18e1e43 100644 (file)
@@ -22,7 +22,6 @@ if ($use_popup_windows)
 page(_("Customer Allocations"), false, false, "", $js);
 
 //--------------------------------------------------------------------------------
-set_editor('customer', 'customer_id' , 'ShowSettled');
 
 start_form();
        /* show all outstanding receipts and credits to be allocated */
index 4c4617020b8ab864971be69bf50b6dfb21c47cfd..4b20b7474bcbf2448a7a3d391a547bd8743b7079 100644 (file)
@@ -51,8 +51,6 @@ check_db_has_stock_items(_("There are no items defined in the system."));
 check_db_has_customer_branches(_("There are no customers, or there are no customers with branches. Please define customers and customer branches."));
 
 //-----------------------------------------------------------------------------
-set_editor('customer', 'customer_id' , 'branch_id');
-set_editor('branch', 'branch_id' , 'ref');
 
 if (list_updated('branch_id')) {
        // when branch is selected via external editor also customer can change
index 24c6e0cd594e418c9032a918b112d218fdb5e622..f00a88dab6364a8a6e51674adb1531c8e4047e3f 100644 (file)
@@ -38,8 +38,6 @@ check_db_has_customers(_("There are no customers defined in the system."));
 check_db_has_bank_accounts(_("There are no bank accounts defined in the system."));
 
 //----------------------------------------------------------------------------------------
-set_editor('customer', 'customer_id' , 'sales_type');
-set_editor('branch', 'BranchID' , 'bank_account');
 
 if (list_updated('BranchID')) {
        // when branch is selected via external editor also customer can change
index e9bb8ebe259dade19f5d2d190d2254403a5058a2..6adfa4ceeeecd0b1577efb870b7c35c0e368cf36 100644 (file)
@@ -26,7 +26,7 @@ function display_credit_header(&$order)
     if (!isset($_POST['customer_id']) && (get_global_customer() != reserved_words::get_all()))
        $_POST['customer_id'] = get_global_customer();
 
-       customer_list_row(_("Customer:"), 'customer_id', null, false, true);
+       customer_list_row(_("Customer:"), 'customer_id', null, false, true, false, true);
 
        if ($order->customer_id != $_POST['customer_id'] /*|| $order->sales_type != $_POST['sales_type_id']*/)
        {
@@ -35,7 +35,7 @@ function display_credit_header(&$order)
        }
 
        customer_branches_list_row(_("Branch:"), $_POST['customer_id'], 
-         'branch_id', null, false, true, true);
+         'branch_id', null, false, true, true, true);
 
        //if (($_SESSION['credit_items']->order_no == 0) ||
        //      ($order->customer_id != $_POST['customer_id']) ||
index 8b5ec90147832a57f1d11f23dac8c2929cbd76cf..401a725c27b3cef3f61fc4cd417dfd5724b4871b 100644 (file)
@@ -258,7 +258,7 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group
        }
        else
        {
-               customer_list_row(_("Customer:"), 'customer_id', null, false, true);
+               customer_list_row(_("Customer:"), 'customer_id', null, false, true, false, true);
 
                if ($order->customer_id != get_post('customer_id', -1))
                {
@@ -266,7 +266,7 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group
                        $Ajax->activate('branch_id');
                }
                customer_branches_list_row(_("Branch:"),
-                 $_POST['customer_id'], 'branch_id', null, false, true, true);
+                 $_POST['customer_id'], 'branch_id', null, false, true, true, true);
 
                if( ($order->customer_id != get_post('customer_id', -1)) ||
                        ($order->Branch != get_post('branch_id', -1)) ||
index 40e008fdc9e87b2663c8c3d836160688c6ef5e9a..4df319c7641413d2a10dd6657f4b8e33d218985b 100644 (file)
@@ -60,8 +60,6 @@ if (isset($_GET['NewDelivery']) && is_numeric($_GET['NewDelivery'])) {
 
 page($_SESSION['page_title'], false, false, "", $js);
 //-----------------------------------------------------------------------------
-set_editor('customer', 'customer_id', 'sales_type');
-set_editor('branch', 'branch_id', 'sales_type');
 
 if (list_updated('branch_id')) {
        // when branch is selected via external editor also customer can change
index 82d778eed70fde5c0beac5a34825e313196cc9cd..775116d94a6fdcbe5a7efb00af25ceafc89d442a 100644 (file)
@@ -229,6 +229,11 @@ div.tabs a:hover {
        border: 1px solid #8cacbb;
 }
 
+#hotkeyshelp {
+       text-align: right;
+       font-weight: bolder;
+}
+
 #footer {
        position: relative;
        bottom: -3px;
index 8abc9c46e054e7377acfe610d04863ff5af28968..9e4f2c0d5f7d8d4eb86b39562e75104e25c552bc 100644 (file)
@@ -89,7 +89,8 @@
 
                function menu_footer($no_menu, $is_index)
                {
-                       global $version, $allow_demo_mode, $app_title, $power_url, $power_by, $path_to_root;
+                       global $version, $allow_demo_mode, $app_title, $power_url,
+                               $power_by, $path_to_root, $Pagehelp, $Ajax;
                        include_once($path_to_root . "/includes/date_functions.inc");
 
                        if ($no_menu == false)
                                else
                                        echo "<table class=bottomBar2>\n";
                                echo "<tr>";
-                               if (isset($_SESSION['wa_current_user']))
+                               if (isset($_SESSION['wa_current_user'])) {
+                                       $phelp = implode('; ', $Pagehelp);
                                        echo "<td class=bottomBarCell>" . Today() . " | " . Now() . "</td>\n";
+                                       $Ajax->addUpdate(true, 'hotkeyshelp', $phelp);
+                                       echo "<td id='hotkeyshelp'>".$phelp."</td>";
+                               }
                                echo "</tr></table>\n";
                        }
                        echo "</td></tr></table></td>\n";
index ac706d53106b3e27c77cf75902a8257227fd52eb..bf6e6eacc0f7895fa414997144914793f441d297 100644 (file)
@@ -233,6 +233,11 @@ div.tabs a:hover {
        border: 1px solid #cccccc;
 }
 
+#hotkeyshelp {
+       text-align: right;
+       font-weight: bolder;
+}
+
 #footer {
        position: relative;
        bottom: -3px;
index f4f59c15e502fbb7e1a7d525ad0c3a0dfa961e40..73520c51652f26f6f377ba726c19f647f6f9fa47 100644 (file)
@@ -89,7 +89,8 @@
 
                function menu_footer($no_menu, $is_index)
                {
-                       global $version, $allow_demo_mode, $app_title, $power_url, $power_by, $path_to_root;
+                       global $version, $allow_demo_mode, $app_title, $power_url, 
+                               $power_by, $path_to_root, $Pagehelp, $Ajax;
                        include_once($path_to_root . "/includes/date_functions.inc");
 
                        if ($no_menu == false)
                                else
                                        echo "<table class=bottomBar2>\n";
                                echo "<tr>";
-                               if (isset($_SESSION['wa_current_user']))
+                               if (isset($_SESSION['wa_current_user'])) {
+                                       $phelp = implode('; ', $Pagehelp);
                                        echo "<td class=bottomBarCell>" . Today() . " | " . Now() . "</td>\n";
+                                       $Ajax->addUpdate(true, 'hotkeyshelp', $phelp);
+                                       echo "<td id='hotkeyshelp'>".$phelp."</td>";
+                               }
                                echo "</tr></table>\n";
                        }
                        echo "</td></tr></table></td>\n";
index b6443476d690a10520366303aa58122198b7895f..d45f2e2ce2db45eb21aa34af168da58a373eeb99 100644 (file)
@@ -229,6 +229,11 @@ div.tabs a:hover {
        border: 1px solid #8cacbb;
 }
 
+#hotkeyshelp {
+       text-align: right;
+       font-weight: bolder;
+}
+
 #footer {
        position: relative;
        bottom: -3px;
index 43b163bd4e926a2340e8eed1cd155b07f909aea9..cde08ae3125cac429721e3099a2bae9a89262b5b 100644 (file)
@@ -90,7 +90,8 @@
 
                function menu_footer($no_menu, $is_index)
                {
-                       global $version, $allow_demo_mode, $app_title, $power_url, $power_by, $path_to_root;
+                       global $version, $allow_demo_mode, $app_title, $power_url, 
+                               $power_by, $path_to_root, $Pagehelp, $Ajax;
                        include_once($path_to_root . "/includes/date_functions.inc");
 
                        if ($no_menu == false)
                                else
                                        echo "<table class=bottomBar2>\n";
                                echo "<tr>";
-                               if (isset($_SESSION['wa_current_user']))
+                               if (isset($_SESSION['wa_current_user'])) {
+                                       $phelp = implode('; ', $Pagehelp);
                                        echo "<td class=bottomBarCell>" . Today() . " | " . Now() . "</td>\n";
+                                       $Ajax->addUpdate(true, 'hotkeyshelp', $phelp);
+                                       echo "<td id='hotkeyshelp'>".$phelp."</td>";
+                               }
                                echo "</tr></table>\n";
                        }
                        echo "</td></tr></table></td>\n";