+if (!isset($myrow["max_days_in_docs"]))
+{
+ set_company_pref("max_days_in_docs", "setup.company", "smallint", 5, '180');
+ $myrow["max_days_in_docs"] = get_company_pref("max_days_in_docs");
+}
+$_POST['max_days_in_docs'] = $myrow["max_days_in_docs"];
+if (!isset($myrow["company_logo_report"]))
+{
+ set_company_pref("company_logo_report", "setup.company", "tinyint", 1, '0');
+ $myrow["company_logo_report"] = get_company_pref("company_logo_report");
+}
+$_POST['company_logo_report'] = $myrow["company_logo_report"];
+if (!isset($myrow["ref_no_auto_increase"]))
+{
+ set_company_pref("ref_no_auto_increase", "setup.company", "tinyint", 1, '0');
+ $myrow["ref_no_auto_increase"] = get_company_pref("ref_no_auto_increase");
+}
+$_POST['ref_no_auto_increase'] = $myrow["ref_no_auto_increase"];
+if (!isset($myrow["barcodes_on_stock"]))
+{
+ set_company_pref("barcodes_on_stock", "setup.company", "tinyint", 1, '0');
+ $myrow["barcodes_on_stock"] = get_company_pref("barcodes_on_stock");
+}
+$_POST['barcodes_on_stock'] = $myrow["barcodes_on_stock"];
+if (!isset($myrow["print_dialog_direct"]))
+{
+ set_company_pref("print_dialog_direct", "setup.company", "tinyint", 1, '0');
+ $myrow["print_dialog_direct"] = get_company_pref("print_dialog_direct");
+}
+$_POST['print_dialog_direct'] = $myrow["print_dialog_direct"];
+if (!isset($myrow["dim_on_recurrent_invoice"]))
+{
+ set_company_pref("dim_on_recurrent_invoice", "setup.company", "tinyint", 1, '0');
+ $myrow["dim_on_recurrent_invoice"] = get_company_pref("dim_on_recurrent_invoice");
+}
+$_POST['dim_on_recurrent_invoice'] = $myrow["dim_on_recurrent_invoice"];
+if (!isset($myrow["long_description_invoice"]))
+{
+ set_company_pref("long_description_invoice", "setup.company", "tinyint", 1, '0');
+ $myrow["long_description_invoice"] = get_company_pref("long_description_invoice");
+}
+$_POST['long_description_invoice'] = $myrow["long_description_invoice"];