Company setup version_id for stamping the version id. Can be used for check for update.
! -> 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
$_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."));
}
$_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);
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)") . ":", "<input type='file' id='pic' name='pic'>");
check_row(_("Delete Company Logo:"), 'del_coy_logo', $_POST['del_coy_logo']);
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']);
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;
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 ");
$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);
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`;
`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` ###
`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` ###