From: Joe Hunt Date: Sat, 26 Jun 2010 08:04:39 +0000 (+0000) Subject: Option to suppress tax rates on documents. To be used for tax on tax X-Git-Tag: v2.4.2~19^2~824 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=a2e0638b8caab0356ee8d39b5761745a5991fc2d Option to suppress tax rates on documents. To be used for tax on tax The tax % should be included in the tax name and the calculated rate be set as the rate. $suppress_tax_rates in config.php set to 1. Preparing for 2.3. Beta --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c5a2f00e..ea6d3da9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,17 @@ Legend: ! -> Note $ -> Affected files +26-Jun-2010 Joe Hunt +! Option to suppress tax rates on documents. To be used for tax on tax + The tax % should be included in the tax name and the calculated + rate be set as the rate. $suppress_tax_rates in config.php set to 1. +$ config.default.php + /includes/ui/ui_view.inc + /reporting/rep107.php + /reporting/rep110.php ++ Preparing for 2.3 Beta +$ update.html + 26-Jun-2010 Janusz Dobrowolski # Fixed sql for child transaction retrieval $ /sales/includes/sales_db.inc diff --git a/config.default.php b/config.default.php index 84c8578f..67b1d627 100644 --- a/config.default.php +++ b/config.default.php @@ -57,7 +57,7 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ // Main Title $app_title = "FrontAccounting"; // application version - $version = "2.3 CVS (m10)"; + $version = "2.3 Beta"; // src-data compatibility check. Do not change. $core_version = "2.3"; @@ -91,7 +91,7 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ // $old_style_help = 1; // this setting is depreciated and subject to removal in next FA versions // locally installed wiki module // $help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.'; - // context help feed from frontaccounting.net + // context help feed from frontaccounting.com // $help_base_url = 'http://frontaccounting.com/fawiki/index.php?n=Help.'; // not used $help_base_url = null; @@ -115,6 +115,9 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ /* 1 = print Subtotal tax excluded, tax and Total tax included */ $alternative_tax_include_on_docs = 0; + /* suppress tax rates on documents. 0 = no, 1 = yes. */ + $suppress_tax_rates = 0; + $dateformats = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD"); $dateseps = array("/", ".", "-", " "); $thoseps = array(",", ".", " "); diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index 55881b1d..cce5b51d 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -374,11 +374,15 @@ function display_debit_or_credit_cells($value) function display_customer_trans_tax_details($tax_items, $columns) { - global $alternative_tax_include_on_docs; + global $alternative_tax_include_on_docs, $suppress_tax_rates; $first = true; while ($tax_item = db_fetch($tax_items)) { $tax = number_format2($tax_item['amount'],user_price_dec()); + if (isset($suppress_tax_rates) && $suppress_tax_rates == 1) + $tax_type_name = $tax_item['tax_type_name']; + else + $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) "; if ($tax_item['included_in_price']) { if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1) @@ -386,17 +390,15 @@ function display_customer_trans_tax_details($tax_items, $columns) if ($first) label_row(_("Total Tax Excluded"), number_format2($tax_item['net_amount'], user_price_dec()), "colspan=$columns align=right", "align=right"); - label_row($tax_item['tax_type_name'] . " (" . $tax_item['rate'] . "%)", - $tax, "colspan=$columns align=right", "align=right"); + label_row($tax_type_name, $tax, "colspan=$columns align=right", "align=right"); $first = false; } else - label_row(_("Included") . " " . $tax_item['tax_type_name'] . " (" . $tax_item['rate'] . "%) " . + label_row(_("Included") . " " . $tax_type_name . _("Amount") . ": $tax", "", "colspan=$columns align=right", "align=right"); } else - label_row($tax_item['tax_type_name'] . " (" . $tax_item['rate'] . "%)", - $tax, "colspan=$columns align=right", "align=right"); + label_row($tax_type_name, $tax, "colspan=$columns align=right", "align=right"); } } diff --git a/reporting/rep107.php b/reporting/rep107.php index 11af3b83..78a59495 100644 --- a/reporting/rep107.php +++ b/reporting/rep107.php @@ -32,7 +32,7 @@ print_invoices(); function print_invoices() { - global $path_to_root, $alternative_tax_include_on_docs; + global $path_to_root, $alternative_tax_include_on_docs, $suppress_tax_rates; include_once($path_to_root . "/reporting/includes/pdf_report.inc"); @@ -173,6 +173,11 @@ function print_invoices() while ($tax_item = db_fetch($tax_items)) { $DisplayTax = number_format2($sign*$tax_item['amount'], $dec); + + if (isset($suppress_tax_rates) && $suppress_tax_rates == 1) + $tax_type_name = $tax_item['tax_type_name']; + else + $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) "; if ($tax_item['included_in_price']) { @@ -184,19 +189,16 @@ function print_invoices() $rep->TextCol(6, 7, number_format2($sign*$tax_item['net_amount'], $dec), -2); $rep->NewLine(); } - $rep->TextCol(3, 6, $tax_item['tax_type_name'] . " (" . - $tax_item['rate'] . "%)", -2); + $rep->TextCol(3, 6, $tax_type_name, -2); $rep->TextCol(6, 7, $DisplayTax, -2); $first = false; } else - $rep->TextCol(3, 7, $doc_Included . " " . $tax_item['tax_type_name'] . - " (" . $tax_item['rate'] . "%) " . $doc_Amount . ": " . $DisplayTax, -2); + $rep->TextCol(3, 7, $doc_Included . " " . $tax_type_name . $doc_Amount . ": " . $DisplayTax, -2); } else { - $rep->TextCol(3, 6, $tax_item['tax_type_name'] . " (" . - $tax_item['rate'] . "%)", -2); + $rep->TextCol(3, 6, $tax_type_name, -2); $rep->TextCol(6, 7, $DisplayTax, -2); } $rep->NewLine(); diff --git a/reporting/rep110.php b/reporting/rep110.php index db7c1c94..1c9cf743 100644 --- a/reporting/rep110.php +++ b/reporting/rep110.php @@ -34,7 +34,7 @@ print_deliveries(); function print_deliveries() { - global $path_to_root, $packing_slip, $alternative_tax_include_on_docs; + global $path_to_root, $packing_slip, $alternative_tax_include_on_docs, $suppress_tax_rates; include_once($path_to_root . "/reporting/includes/pdf_report.inc"); @@ -169,7 +169,13 @@ function print_deliveries() while ($tax_item = db_fetch($tax_items)) { $DisplayTax = number_format2($tax_item['amount'], $dec); - if ($tax_item['included_in_price']) + + if (isset($suppress_tax_rates) && $suppress_tax_rates == 1) + $tax_type_name = $tax_item['tax_type_name']; + else + $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) "; + + if ($tax_item['included_in_price']) { if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1) { @@ -179,19 +185,16 @@ function print_deliveries() $rep->TextCol(6, 7, number_format2($tax_item['net_amount'], $dec), -2); $rep->NewLine(); } - $rep->TextCol(3, 6, $tax_item['tax_type_name'] . " (" . - $tax_item['rate'] . "%)", -2); + $rep->TextCol(3, 6, $tax_type_name, -2); $rep->TextCol(6, 7, $DisplayTax, -2); $first = false; } else - $rep->TextCol(3, 7, $doc_Included . " " . $tax_item['tax_type_name'] . - " (" . $tax_item['rate'] . "%) " . $doc_Amount . ": " . $DisplayTax, -2); + $rep->TextCol(3, 7, $doc_Included . " " . $tax_type_name . $doc_Amount . ": " . $DisplayTax, -2); } else { - $rep->TextCol(3, 6, $tax_item['tax_type_name'] . " (" . - $tax_item['rate'] . "%)", -2); + $rep->TextCol(3, 6, $tax_type_name, -2); $rep->TextCol(6, 7, $DisplayTax, -2); } $rep->NewLine(); diff --git a/update.html b/update.html index 1d31aa0f..dbf6b3ab 100644 --- a/update.html +++ b/update.html @@ -17,14 +17,16 @@ server overwriting the existing files. From 2.2 RC, your existing configuration these files.
-
  • Upload all the new files. -
  • Look into the file, config.default.php and compare with your own config.php file. You should update the the following in your config.php:

  • Rename or remove the /install folder (you have already performed the install +
  • Upload all the new files.
  • If this is an upgrade from 2.X.X to 2.3 go into Setup tab,  Software Upgrade.
  • Look into the file, config.default.php and compare with your own config.php file. You should update the the following in your config.php:

  • Rename or remove the /install folder (you have already performed the install process earlier).
    -
  • There are no database changes during a major and minor release. Like from 2.2 to 2.2.1 - 2.2.X .
  • If you are upgrading from an earlier installation you +
  • There are no database changes during a major and minor release. Like from 2.3 to 2.3.1 - 2.3.X .
  • If you are upgrading from an earlier installation you must immediately login on company 0, the first company you created, as admin (called the superadmin). If you use a theme other than the standard 3, @@ -34,7 +36,7 @@ later.  Go to the 'Setup' tab and run 'Software Upgrade'. Mark the checkbox 'Install' and press 'Upgrade System'.  You must -also do this if you upgrade from 2.2 Beta to 2.2 RC. This will +also do this if you upgrade from 2.3 Beta to 2.3 RC. This will upgrade ALL your companies.
  • If something goes wrong during upgrade, you can enter here again and try 'Force Upgrade', and press 'Upgrade System' again.
  • Enter 'Setup' tab, 'System and Generel GL Setup'.  Set the correct Accounts for Retained Earnings, Profit/Loss Year and Bank Charge.
  • Enter