Fixes in sales reports to use debtor_trans.tax_included field instead of trans_tax_de...
authorJanusz Dobrowolski <janusz@frontaccouting.eu>
Fri, 15 Jun 2012 11:36:36 +0000 (13:36 +0200)
committerJanusz Dobrowolski <janusz@frontaccouting.eu>
Fri, 15 Jun 2012 11:36:36 +0000 (13:36 +0200)
reporting/rep107.php
reporting/rep110.php
reporting/rep113.php
sql/alter2.4.sql

index 36acff5abcd21e3ca7e592cc14fa3ae72ae8a496..84e56113912477063a284c54014b3a5fc63b7d0e 100644 (file)
@@ -164,7 +164,7 @@ function print_invoices()
                        else
                                $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) ";
 
-                       if ($tax_item['included_in_price'])
+                       if ($myrow['tax_included'])
                        {
                                if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1)
                                {
index 856da3240a51fb35ccea69f6d235f177731e354a..488d58318d5006738bdd756a37cd774537f89cfc 100644 (file)
@@ -176,8 +176,8 @@ function print_deliveries()
                                                $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 ($myrow['tax_included'])
                                {
                                                if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1)
                                        {
index aec634e25f3da7d65e1b562d3766d7451011240a..26f51fbde9c934b0161b157af97652cc08ee569e 100644 (file)
@@ -163,7 +163,7 @@ function print_credits()
                        else
                                $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) ";
 
-                       if ($tax_item['included_in_price'])
+                       if ($myrow['tax_included'])
                        {
                                if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1)
                                {
index c0fdca279ba582820837a3cbf6a654d01b00b3a0..2d816bc3c1638d64fe42f4f71052631ec586de58 100644 (file)
@@ -41,8 +41,9 @@ ALTER TABLE `0_cust_branch` ADD COLUMN `bank_account` varchar(60) DEFAULT NULL A
 
 ALTER TABLE `0_debtor_trans` ADD COLUMN `tax_included` tinyint(1) unsigned NOT NULL default '0' AFTER `payment_terms`;
 UPDATE `0_debtor_trans` tr, `0_trans_tax_details` td SET tr.tax_included=td.included_in_price
-       WHERE tr.`type`=td.trans_type AND tr.trans_no=td.trans_no AND td.included_in_price
+       WHERE tr.`type`=td.trans_type AND tr.trans_no=td.trans_no AND td.included_in_price;
+
 ALTER TABLE `0_bank_accounts` ADD COLUMN `bank_charge_act` varchar(15) NOT NULL DEFAULT '' AFTER `id`;
-UPDATE `0_bank_accounts` SET `bank_charge_act`=(SELECT `value` FROM 0_sys_prefs WHERE name='bank_charge_act'); 
-ALTER TABLE `0_users` ADD `transaction_days` INT( 6 ) NOT NULL COMMENT 'Transaction days' AFTER `startup_tab`; 
-UPDATE `0_users` SET `transaction_days`=30; 
+UPDATE `0_bank_accounts` SET `bank_charge_act`=(SELECT `value` FROM 0_sys_prefs WHERE name='bank_charge_act');
+
+ALTER TABLE `0_users` ADD `transaction_days` INT( 6 ) NOT NULL default '30' COMMENT 'Transaction days' AFTER `startup_tab`;