2 /**********************************************************************
3 Copyright (C) FrontAccounting, LLC.
4 Released under the terms of the GNU General Public License, GPL,
5 as published by the Free Software Foundation, either version 3
6 of the License, or (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
12 include_once($path_to_root . "/includes/reserved.inc");
14 function set_global_supplier($supplier_id)
16 $_SESSION['wa_global_supplier_id'] = $supplier_id;
19 function get_global_supplier($return_all=true)
21 if (!isset($_SESSION['wa_global_supplier_id']) ||
22 ($return_all == false && $_SESSION['wa_global_supplier_id'] == reserved_words::get_all()))
24 return $_SESSION['wa_global_supplier_id'];
27 function set_global_stock_item($stock_id)
29 $_SESSION['wa_global_stock_id'] = $stock_id;
32 function get_global_stock_item($return_all=true)
34 if (!isset($_SESSION['wa_global_stock_id']) ||
35 ($return_all == false && $_SESSION['wa_global_stock_id'] == reserved_words::get_all()))
37 return $_SESSION['wa_global_stock_id'];
40 function set_global_customer($customer_id)
42 $_SESSION['wa_global_customer_id'] = $customer_id;
45 function get_global_customer($return_all=true)
47 if (!isset($_SESSION['wa_global_customer_id']) ||
48 ($return_all == false && $_SESSION['wa_global_customer_id'] == reserved_words::get_all()))
50 return $_SESSION['wa_global_customer_id'];
53 function set_global_curr_code($curr_code)
55 $_SESSION['wa_global_curr_code'] = $curr_code;
58 function get_global_curr_code()
60 if (!isset($_SESSION['wa_global_curr_code']))
62 return $_SESSION['wa_global_curr_code'];
67 //--------------------------------------------------------------------------------------