From: Rafael C. <raf...@gm...> - 2014-03-27 14:14:20
|
Hi All, Any comments or suggestions? Best regards, Rafael. 2014-03-21 5:23 GMT-06:00 Rafael Chacón <raf...@gm...>: > Hi, > > In tax.php (line 46) we have: > > (debtortrans.ovamount+debtortrans.ovfreight)/debtortrans.rate AS netamount, > debtortrans.ovfreight/debtortrans.rate AS freightamount, > debtortranstaxes.taxamount/debtortrans.rate AS tax > > ***dividing by exchange rate*** > > but > In ConfirmDispatch_Invoice.php (line 830) we use: $SQL = "INSERT INTO > debtortranstaxes.taxamount VALUES ('" . $TaxAmount/$_SESSION['CurrencyRate'] > . "')"; > In ConfirmDispatch_Invoice.php (line 1615) we use: $SQL = "INSERT INTO > gltrans.amount VALUES ('" . > round((-$TaxAmount/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) > . "')"; > In CounterReturns.php (line 965) we use: $SQL = "INSERT INTO > debtortranstaxes.taxamount VALUES ('" . -$TaxAmount/$ExRate . "')"; > In CounterReturns.php (line 1428) we use: $SQL = "INSERT INTO gltrans.amount > VALUES ('" . ($TaxAmount/$ExRate) . "')"; > In CounterSales.php (line 1383) we use: $SQL = "INSERT INTO > debtortranstaxes.taxamount VALUES ('" . $TaxAmount/$ExRate . "')"; > In CounterSales.php (line 1885) we use: $SQL = "INSERT INTO gltrans.amount > VALUES ('" . (-$TaxAmount/$ExRate) . "')"; > In Credit_Invoice.php (line 644) we use: $SQL = "INSERT INTO > debtortranstaxes.taxamount VALUES ('" . > (-$TaxAmount/$_SESSION['CurrencyRate']) . "')"; > In RecurringSalesOrdersProcess.php (line 692) we use: $SQL = "INSERT INTO > debtortranstaxes.taxamount VALUES ('" . > filter_number_format($Tax['FXAmount']/$CurrencyRate) . "')"; > In SelectCreditItems.php (line 1178) we use: $SQL = "INSERT INTO > debtortranstaxes.taxamount VALUES ('" . > -$TaxAmount/$_SESSION['CurrencyRate'] . "')"; > In SupplierCredit.php (line 1158) we use: $SQL = "INSERT INTO > supptranstaxes.taxamount VALUES ('" . -$TaxTotals->TaxOvAmount . "')"; > In SupplierInvoice.php (1514) we use: $SQL = "INSERT INTO > supptranstaxes.taxamount VALUES ('" . $TaxTotals->TaxOvAmount . "')"; > > I guess it must be corrected to: > > (debtortrans.ovamount+debtortrans.ovfreight)/debtortrans.rate AS netamount, > debtortrans.ovfreight/debtortrans.rate AS freightamount, > debtortranstaxes.taxamount AS tax > > ***NOT dividing by exchange rate*** > > Also, I have also doubt to what it serves the field debtortrans.ovgst. What > is the difference between tax saved in debtortrans.ovgst and > debtortranstaxes.taxamount? Is it exchange rate? > > Best regards, Rafael Chacon. |