From: Joe Hunt Date: Sat, 2 May 2009 08:41:51 +0000 (+0000) Subject: Company setup option for printing server Time Zone on Reports Print-Out. X-Git-Tag: v2.4.2~19^2~1422 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=34c15f2f88c2b4d8a18ca40f76df3b9748e463e1;p=fa-stable.git Company setup option for printing server Time Zone on Reports Print-Out. Company setup version_id for stamping the version id. Can be used for check for update. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 398a1b4a..1346c098 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,16 @@ Legend: ! -> Note $ -> Affected files +02-May-2009 Joe Hunt +! Company setup option for printing server Time Zone on Reports Print-Out. +! Company setup version_id for stamping the version id. Can be used for check for update. +$ /admin/company_preferences.php + /admin/db/company_db.inc + /reporting/includes/pdf_report.inc + /sql/alter2.2.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql + 01-May-2009 Joe Hunt ! Changed Customer Balance and Supplier Balance to period select with Open Balance $ /reporting/reports_main.php diff --git a/admin/company_preferences.php b/admin/company_preferences.php index feddf62f..648d260f 100644 --- a/admin/company_preferences.php +++ b/admin/company_preferences.php @@ -101,7 +101,7 @@ if (isset($_POST['update']) && $_POST['update'] != "") $_POST['email'], $_POST['coy_logo'], $_POST['domicile'], $_POST['use_dimension'], $_POST['curr_default'], $_POST['f_year'], check_value('no_item_list'), check_value('no_customer_list'), - check_value('no_supplier_list'), $_POST['base_sales']); + check_value('no_supplier_list'), $_POST['base_sales'], check_value('time_zone')); display_notification_centered(_("Company setup has been updated.")); } @@ -134,6 +134,8 @@ $_POST['no_customer_list'] = $myrow["no_customer_list"]; $_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"]; +$_POST['version_id'] = $myrow["version_id"]; $_POST['del_coy_logo'] = 0; start_outer_table($table_style2); @@ -151,13 +153,13 @@ text_row_ex(_("Official Company Number:"), 'coy_no', 25); text_row_ex(_("GSTNo:"), 'gst_no', 25); currencies_list_row(_("Home Currency:"), 'curr_default', $_POST['curr_default']); +fiscalyears_list_row(_("Fiscal Year:"), 'f_year', $_POST['f_year']); table_section(2); text_row_ex(_("Tax Periods:"), 'tax_prd', 10, 10, '', null, null, _('Months.')); text_row_ex(_("Tax Last Period:"), 'tax_last', 10, 10, '', null, null, _('Months back.')); -fiscalyears_list_row(_("Fiscal Year:"), 'f_year', $_POST['f_year']); label_row(_("Company Logo:"), $_POST['coy_logo']); label_row(_("New Company Logo (.jpg)") . ":", ""); check_row(_("Delete Company Logo:"), 'del_coy_logo', $_POST['del_coy_logo']); @@ -170,9 +172,10 @@ sales_types_list_row(_("Base for auto price calculations:"), 'base_sales', $_POS check_row(_("Search Item List"), 'no_item_list', $_POST['no_item_list']); check_row(_("Search Customer List"), 'no_customer_list', $_POST['no_customer_list']); check_row(_("Search Supplier List"), 'no_supplier_list', $_POST['no_supplier_list']); +label_row("", " "); +check_row(_("Time Zone on Reports"), 'time_zone', $_POST['time_zone']); +label_row(_("Version Id"), $_POST['version_id']); -start_row(); -end_row(); end_outer_table(1); hidden('coy_logo', $_POST['coy_logo']); diff --git a/admin/db/company_db.inc b/admin/db/company_db.inc index c9f416f0..0e8ddaaf 100644 --- a/admin/db/company_db.inc +++ b/admin/db/company_db.inc @@ -64,7 +64,7 @@ function update_company_gl_setup($retained_act, $profit_loss_act, $debtors_act, 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) + $base_sales, $time_zone) { if ($f_year == null) $f_year = 0; @@ -84,7 +84,8 @@ function update_company_setup($coy_name, $coy_no, $gst_no, $tax_prd, $tax_last, no_supplier_list=$no_supplier_list, curr_default=".db_escape($curr_default).", f_year=$f_year, - base_sales=$base_sales + base_sales=$base_sales, + time_zone=$time_zone WHERE coy_code=1"; db_query($sql, "The company setup could not be updated "); diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index 5beea7e9..5b8e98dc 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -203,6 +203,8 @@ class FrontReport extends Cpdf $str = _("Print Out Date") . ':'; $this->Text($this->leftMargin, $str, $this->titleCol); $str = Today() . ' ' . Now(); + if ($this->company['time_zone']) + $str .= ' ' . date('O') . ' GMT'; $this->Text($this->titleCol, $str, $this->companyCol); $this->Text($this->companyCol, $this->host); diff --git a/sql/alter2.2.sql b/sql/alter2.2.sql index 0973d87e..5904d82b 100644 --- a/sql/alter2.2.sql +++ b/sql/alter2.2.sql @@ -8,8 +8,9 @@ ALTER TABLE `0_company` DROP COLUMN `custom3_value`; ALTER TABLE `0_company` ADD COLUMN `default_delivery_required` SMALLINT(6) NULL DEFAULT '1'; ALTER TABLE `0_company` ADD COLUMN `version_id` VARCHAR(11) NOT NULL DEFAULT ''; ALTER TABLE `0_company` CHANGE `purch_exchange_diff_act` `profit_loss_year_act` VARCHAR(11) NOT NULL DEFAULT ''; +ALTER TABLE `0_company` ADD COLUMN `time_zone` TINYINT(1) NOT NULL DEFAULT '0'; INSERT INTO `0_chart_master` VALUES ('8900', '', 'Profit and Loss this year', '52', '0'); -UPDATE `0_company` SET `profit_loss_year_act`='8900' WHERE `coy_code`=1; +UPDATE `0_company` SET `profit_loss_year_act`='8900', `version_id`='2.2' WHERE `coy_code`=1; ALTER TABLE `0_stock_category` DROP COLUMN `stock_act`; ALTER TABLE `0_stock_category` DROP COLUMN `cogs_act`; diff --git a/sql/en_US-demo.sql b/sql/en_US-demo.sql index 9757d2ae..538f1dfd 100644 --- a/sql/en_US-demo.sql +++ b/sql/en_US-demo.sql @@ -369,13 +369,14 @@ CREATE TABLE `0_company` ( `legal_text` tinytext NOT NULL, `default_delivery_required` smallint(6) NOT NULL default '1', `version_id` varchar(11) NOT NULL default '', + `time_zone` tinyint(1) NOT NULL default '0', PRIMARY KEY (`coy_code`) ) TYPE=MyISAM ; ### Data of table `0_company` ### -INSERT INTO `0_company` VALUES ('1', 'Training Co.', '987654321', '123123123', '1', '1', 'N/A', '202-122320', '202-18889123', 'delta@delta.com', 'logo_frontaccounting.jpg', 'DownTown', 'USD', '1500', '4250', '2630', '1430', '4260', '4220', '2050', '3800', '3000', '3000', '3200', '1420', '4010', '4210', '3000', '1410', '5000', '0', '10', '10', '1000', '20', '20', '30', '1', '7', '0', '0', '0', '0', '0', '0', '', '1'); +INSERT INTO `0_company` VALUES ('1', 'Training Co.', '987654321', '123123123', '1', '1', 'N/A', '202-122320', '202-18889123', 'delta@delta.com', 'logo_frontaccounting.jpg', 'DownTown', 'USD', '1500', '4250', '2630', '1430', '4260', '4220', '2050', '3800', '3000', '3000', '3200', '1420', '4010', '4210', '3000', '1410', '5000', '0', '10', '10', '1000', '20', '20', '30', '1', '7', '0', '0', '0', '0', '0', '0', '', '1', '2.2', '0'); ### Structure of table `0_credit_status` ### diff --git a/sql/en_US-new.sql b/sql/en_US-new.sql index a95fd791..a9681851 100644 --- a/sql/en_US-new.sql +++ b/sql/en_US-new.sql @@ -340,13 +340,14 @@ CREATE TABLE `0_company` ( `legal_text` tinytext NOT NULL, `default_delivery_required` smallint(6) NOT NULL default '1', `version_id` varchar(11) NOT NULL default '', + `time_zone` tinyint(1) NOT NULL default '0', PRIMARY KEY (`coy_code`) ) TYPE=MyISAM ; ### Data of table `0_company` ### -INSERT INTO `0_company` VALUES ('1', 'Company name', '', '', '1', '1', 'N/A', '', '', '', '', '', 'USD', '1500', '4250', '2630', '1430', '4260', '4220', '2050', '3800', '3000', '3000', '3200', '1420', '4010', '4210', '3000', '1410', '5000', '0', '10', '10', '1000', '20', '20', '30', '1', '1', '0', '0', '0', '-1', '0', '0', '', '1'); +INSERT INTO `0_company` VALUES ('1', 'Company name', '', '', '1', '1', 'N/A', '', '', '', '', '', 'USD', '1500', '4250', '2630', '1430', '4260', '4220', '2050', '3800', '3000', '3000', '3200', '1420', '4010', '4210', '3000', '1410', '5000', '0', '10', '10', '1000', '20', '20', '30', '1', '1', '0', '0', '0', '-1', '0', '0', '', '1'. '2.2', '0'); ### Structure of table `0_credit_status` ###