X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fdb%2Fcompany_db.inc;h=1215229a755a054dea33b3b010ce29ca811bfe10;hb=c4eae7a18f0eb824e6eda7be2ba6fa820e9e58c9;hp=8a832211bee06d4369d8dcd736227dca87c67eb4;hpb=f12dbe7523bb1abc6cd69b009ef8f0be838f5348;p=fa-stable.git diff --git a/admin/db/company_db.inc b/admin/db/company_db.inc index 8a832211..1215229a 100644 --- a/admin/db/company_db.inc +++ b/admin/db/company_db.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ function update_company_gl_setup($debtors_act, $pyt_discount_act, $creditors_act, $freight_act, @@ -15,10 +24,13 @@ function update_company_gl_setup($debtors_act, $pyt_discount_act, $creditors_act $allow_negative_stock, $po_over_receive, $po_over_charge, + $accumulate_shipping, + $legal_text, $past_due_days, $default_credit_limit, $default_workorder_required, - $default_dim_required) + $default_dim_required, + $default_delivery_required) { $sql = "UPDATE ".TB_PREF."company SET debtors_act=".db_escape($debtors_act).", pyt_discount_act=".db_escape($pyt_discount_act).", @@ -36,19 +48,22 @@ function update_company_gl_setup($debtors_act, $pyt_discount_act, $creditors_act allow_negative_stock=$allow_negative_stock, po_over_receive=$po_over_receive, po_over_charge=$po_over_charge, + accumulate_shipping=$accumulate_shipping, + legal_text=".db_escape($legal_text).", past_due_days=$past_due_days, default_credit_limit=$default_credit_limit, default_workorder_required=$default_workorder_required, - default_dim_required=$default_dim_required + default_dim_required=$default_dim_required, + default_delivery_required=$default_delivery_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) +function update_company_setup($coy_name, $coy_no, $gst_no, $tax_prd, $tax_last, + $postal_address, $phone, $fax, $email, $coy_logo, $domicile, $Dimension, + $curr_default, $f_year, $no_item_list, $no_customer_list, $no_supplier_list, + $base_sales) { if ($f_year == null) $f_year = 0; @@ -66,12 +81,6 @@ function update_company_setup($coy_name, $coy_no, $gst_no, $tax_prd, $tax_last, no_item_list=$no_item_list, no_customer_list=$no_customer_list, no_supplier_list=$no_supplier_list, - custom1_name=".db_escape($custom1_name).", - custom2_name=".db_escape($custom2_name).", - custom3_name=".db_escape($custom3_name).", - custom1_value=".db_escape($custom1_value).", - custom2_value=".db_escape($custom2_value).", - custom3_value=".db_escape($custom3_value).", curr_default=".db_escape($curr_default).", f_year=$f_year, base_sales=$base_sales @@ -80,9 +89,10 @@ function update_company_setup($coy_name, $coy_no, $gst_no, $tax_prd, $tax_last, db_query($sql, "The company setup could not be updated "); } -function get_company_prefs() +function get_company_prefs($tbpref = TB_PREF) { - $sql = "SELECT * FROM ".TB_PREF."company WHERE coy_code=1"; + $sql = "SELECT * FROM ".$tbpref."company WHERE coy_code=1"; + $result = db_query($sql, "The company preferences could not be retrieved"); if (db_num_rows($result) == 0) @@ -91,9 +101,9 @@ function get_company_prefs() return db_fetch($result); } -function get_company_pref($pref_name) +function get_company_pref($pref_name, $tbpref = TB_PREF) { - $prefs = get_company_prefs(); + $prefs = get_company_prefs($tbpref); return $prefs[$pref_name]; }