ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Smits <pierre.sm...@gmail.com>
Subject Re: VAT Setup
Date Tue, 11 Aug 2015 06:56:06 GMT
Hi Peter,

You might benefit from a book written by community member Sharan Foga on
the subject of accounting with OFBiz.

See:
http://www.lulu.com/shop/sharan-foga/getting-started-with-apache-ofbiz-accounting/paperback/product-21841766.html

Best regards,

Pierre

Op dinsdag 11 augustus 2015 heeft Peter Arnold <parnold@paec.cl> het
volgende geschreven:

> The VAT tax seems to be added to the price because of following code in
> TaxAuthorityServices.java:
>
> TaxAuthorityServices.java
>
> // add up amounts from adjustments (amount OR exemptAmount,
> sourcePercentage)
>                 for (GenericValue taxAdjustment : taxAdustmentList) {
>                     if
> ("SALES_TAX".equals(taxAdjustment.getString("orderAdjustmentTypeId"))) {
>                         taxPercentage =
> taxPercentage.add(taxAdjustment.getBigDecimal("sourcePercentage"));
>                         BigDecimal adjAmount =
> taxAdjustment.getBigDecimal("amount");
>                         taxTotal = taxTotal.add(adjAmount);
>                         priceWithTax =
> priceWithTax.add(adjAmount.divide(quantity,salestaxCalcDecimals,salestaxRounding));
>                         Debug.logInfo("For productId [" + productId + "]
> added [" + adjAmount.divide(quantity,salestaxCalcDecimals,salestaxRounding)
> + "] of tax to price for geoId [" + taxAdjustment.getString("taxAuthGeoId")
> + "], new price is [" + priceWithTax + "]", module);
>
>
> Somehow, somewhere "orderAdjustmentTypeId" is set to "SALES_TAX"
> eventhough I am not aware where this might be done as I have created the
> tax as a VAT-Tax.
> Since above code detects:      if
> ("SALES_TAX".equals(taxAdjustment.getString("orderAdjustmentTypeId))) as
> true, subsequently the line
>                                 priceWithTax =
> priceWithTax.add(adjAmount.divide(quantity,salestaxCalcDecimals,salestaxRounding));
> is executed which is responsible for adding the VAT tax.
>
> I have tracked this by using "verbose" - logging.
>
> By comenting out above code the prices are correctly indicated when the
> product is displayed in the ecommerce shop.
> Nevertheless when performing Quick Check-Out and shipping the order to a
> Chilean address once again a Sales Tax of 19% is added.
> So far I have not found out which part of the code is responsible for
> adding the Sales Tax.
>
>
> Help on this subject is much appreciated.
>
>
> Regards,
> Peter
>
>
>
>
> ---
> El software de antivirus Avast ha analizado este correo electrónico en
> busca de virus.
> http://www.avast.com
>
>

-- 
Pierre Smits

*ORRTIZ.COM <http://www.orrtiz.com>*
Services & Solutions for Cloud-
Based Manufacturing, Professional
Services and Retail & Trade
http://www.orrtiz.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message