From: Joe Hunt Date: Tue, 5 Sep 2017 06:58:11 +0000 (+0200) Subject: Option for showing company logo on reports. On company base. X-Git-Tag: v2.4.3~47 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=27457e8b66b9ebd588cb515f03ca622f78fafc03 Option for showing company logo on reports. On company base. --- diff --git a/admin/company_preferences.php b/admin/company_preferences.php index 65c27787..b35ce9ea 100644 --- a/admin/company_preferences.php +++ b/admin/company_preferences.php @@ -114,7 +114,7 @@ if (isset($_POST['update']) && $_POST['update'] != "") 'use_dimension', 'curr_default', 'f_year', 'no_item_list' => 0, 'no_customer_list' => 0, 'no_supplier_list' =>0, 'base_sales', - 'time_zone' => 0, 'add_pct', 'round_to', 'login_tout', 'auto_curr_reval', + 'time_zone' => 0, 'company_logo_report' => 0, 'add_pct', 'round_to', 'login_tout', 'auto_curr_reval', 'bcc_email', 'alternative_tax_include_on_docs', 'suppress_tax_rates', 'use_manufacturing', 'use_fixed_assets')) ); @@ -149,6 +149,12 @@ $_POST['no_supplier_list'] = $myrow["no_supplier_list"]; $_POST['curr_default'] = $myrow["curr_default"]; $_POST['f_year'] = $myrow["f_year"]; $_POST['time_zone'] = $myrow["time_zone"]; +if (empty($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"]; $_POST['version_id'] = $myrow["version_id"]; $_POST['add_pct'] = $myrow['add_pct']; $_POST['login_tout'] = $myrow['login_tout']; @@ -188,6 +194,7 @@ check_row(_("Delete Company Logo:"), 'del_coy_logo', $_POST['del_coy_logo']); check_row(_("Automatic Revaluation Currency Accounts"), 'auto_curr_reval', $_POST['auto_curr_reval']); check_row(_("Time Zone on Reports"), 'time_zone', $_POST['time_zone']); +check_row(_("Company Logo on Reports"), 'company_logo_report', $_POST['company_logo_report']); label_row(_("Database Scheme Version"), $_POST['version_id']); table_section(2); diff --git a/config.default.php b/config.default.php index 6602baf4..65a66418 100644 --- a/config.default.php +++ b/config.default.php @@ -127,9 +127,6 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ $config_allocation_settled_allowance = 0.005; - /* Show company logo on reports */ - $show_company_logo_report = 0; - /* Show average costed values instead of fixed standard cost in report, Inventory Valuation Report */ $use_costed_values = 1; diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index c475a29b..65aaaf9e 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -314,7 +314,7 @@ class FrontReport extends Cpdf $this->Font(); $this->fontSize -= 4; $logo = company_path() . "/images/" . $this->company['coy_logo']; - if (!empty($SysPrefs->show_company_logo_report) && $this->company['coy_logo'] != '' && file_exists($logo)) + if (!empty($SysPrefs->prefs['company_logo_report']) && $this->company['coy_logo'] != '' && file_exists($logo)) { $this->row -= ($this->lineHeight + 3); $this->AddImage($logo, $companyCol, $this->row, 0, 30);