-
-
-function update_company_gl_setup($debtors_act, $pyt_discount_act, $creditors_act,
- $freight_act,
- $exchange_diff_act,
- $default_sales_act,
- $default_sales_discount_act,
- $default_prompt_payment_act,
- $default_inventory_act,
- $default_cogs_act,
- $default_adj_act,
- $default_inv_sales_act,
- $default_assembly_act,
- $allow_negative_stock,
- $po_over_receive,
- $po_over_charge,
- $past_due_days,
- $default_credit_limit,
- $default_workorder_required,
- $default_dim_required)
-{
- $sql = "UPDATE ".TB_PREF."company SET
- debtors_act=".db_escape($debtors_act).", pyt_discount_act=".db_escape($pyt_discount_act).",
- creditors_act=".db_escape($creditors_act).",
- freight_act=".db_escape($freight_act).",
- exchange_diff_act=".db_escape($exchange_diff_act).",
- default_sales_act=".db_escape($default_sales_act).",
- default_sales_discount_act=".db_escape($default_sales_discount_act).",
- default_prompt_payment_act=".db_escape($default_prompt_payment_act).",
- default_inventory_act=".db_escape($default_inventory_act).",
- default_cogs_act=".db_escape($default_cogs_act).",
- default_adj_act=".db_escape($default_adj_act).",
- default_inv_sales_act=".db_escape($default_inv_sales_act).",
- default_assembly_act=".db_escape($default_assembly_act).",
- allow_negative_stock=$allow_negative_stock,
- po_over_receive=$po_over_receive,
- po_over_charge=$po_over_charge,
- past_due_days=$past_due_days,
- default_credit_limit=$default_credit_limit,
- default_workorder_required=$default_workorder_required,
- default_dim_required=$default_dim_required
- WHERE coy_code=1";
-
- db_query($sql, "The company gl setup could not be updated ");
-}
-
-function update_company_setup($coy_name, $coy_no, $gst_no, $tax_prd, $tax_last, $postal_address, $phone, $fax, $email,
- $coy_logo, $domicile, $Dimension, $custom1_name, $custom2_name, $custom3_name,
- $custom1_value, $custom2_value, $custom3_value, $curr_default, $f_year, $no_item_list, $no_customer_list,
- $no_supplier_list, $base_sales)
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU General Public License, GPL,
+ as published by the Free Software Foundation, either version 3
+ of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
+include_once($path_to_root. "/admin/db/payment_terms_db.inc");
+
+/*
+ Update main or gl company setup.
+*/
+function update_company_prefs($params)