From: Rafael C. <raf...@gm...> - 2014-03-28 23:30:24
|
Hi Phil. Thank you, very much. From what I could understand the code, I think it is what you indicate me. I'm not entirely sure, so I preferred to confirm. I'll make the fix. Best regards, Rafael. 2014-03-28 0:15 GMT-06:00 Phil Daintree <ph...@lo...>: > Hi Rafael, > > Well debtortranstaxes can have many tax amounts that accumulate to equal > the debtortrans.ovgst - the reason we have debtortranstaxes at all is > because of the requirement for multiple taxes in some authorities. > > I think debtortranstaxes stores the tax in local currency though not the > FX ... would need to check I may be wrong. > > Phil > > Phil Daintree > Logic Works Ltd - +64 (0)275 567890 > http://www.logicworks.co.nz > > On 28/03/14 03:14, Rafael Chacón wrote: >> 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. >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Web-erp-developers mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > ------------------------------------------------------------------------------ > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |