atom feed35 messages in org.apache.ofbiz.userRe: VAT is not applied for the shipping
FromSent OnAttachments
biletnikovJan 24, 2011 10:55 am 
Jacques Le RouxJan 24, 2011 2:22 pm 
biletnikovJan 24, 2011 2:26 pm 
Jacques Le RouxJan 24, 2011 2:29 pm 
biletnikovJan 24, 2011 2:55 pm 
biletnikovJan 24, 2011 3:15 pm 
Jacques Le RouxJan 25, 2011 1:12 am 
biletnikovJan 25, 2011 12:11 pm 
biletnikovJan 28, 2011 3:48 am 
Jacques Le RouxJan 30, 2011 11:17 am 
Paul FoxworthyJan 31, 2011 11:50 pm 
Jacques Le RouxFeb 1, 2011 3:33 am 
biletnikovFeb 1, 2011 5:27 am 
Paul FoxworthyFeb 1, 2011 10:57 pm 
biletnikovFeb 1, 2011 11:49 pm 
Jacques Le RouxFeb 2, 2011 1:21 am 
Jacques Le RouxFeb 2, 2011 1:52 am 
biletnikovFeb 2, 2011 4:34 am 
Paul FoxworthyFeb 2, 2011 4:12 pm 
Paul FoxworthyFeb 2, 2011 4:29 pm 
Paul FoxworthyFeb 2, 2011 4:35 pm 
c.sc...@googlemail.comFeb 10, 2011 11:06 pm 
Jacques Le RouxFeb 11, 2011 1:38 am 
Paul FoxworthyFeb 11, 2011 6:48 pm 
Jacques Le RouxFeb 12, 2011 1:52 am 
Paul FoxworthyFeb 12, 2011 7:15 pm 
Jacques Le RouxFeb 13, 2011 1:12 am 
Jacques Le RouxFeb 15, 2011 2:39 am 
Ankit AroraFeb 15, 2011 8:03 pm 
BJ FreemanFeb 15, 2011 8:35 pm 
Ankit AroraFeb 15, 2011 8:42 pm 
BJ FreemanFeb 15, 2011 9:13 pm 
Jacques Le RouxFeb 16, 2011 12:26 am 
Ankit AroraFeb 16, 2011 2:28 am 
BJ FreemanFeb 16, 2011 2:54 am 
Subject:Re: VAT is not applied for the shipping
From:Jacques Le Roux (jacq@les7arts.com)
Date:Jan 30, 2011 11:17:12 am
List:org.apache.ofbiz.user

Sorry, I just began to look at it when I realized/remembered that you were using
R9.04. I have not enough time to support all versions in my spare time, only trunk...

Jacques

biletnikov wrote:

Hello, after my investigation I found the following:

the tax is calculated here - *TaxAuthorityService.rateProductTaxCalc* * * Firstly there is a loop through all product items: for (int i = 0; i < itemProductList.size(); i++) { GenericValue product = (GenericValue) itemProductList.get(i); BigDecimal itemAmount = (BigDecimal) itemAmountList.get(i); BigDecimal itemPrice = (BigDecimal) itemPriceList.get(i); BigDecimal shippingAmount = (BigDecimal) *itemShippingList* .get(i); List taxList = null; if (shippingAddress != null) { taxList = getTaxAdjustments(delegator, product, productStore, payToPartyId, billToPartyId, taxAuthoritySet, itemPrice, itemAmount, *shippingAmount*, ZERO_BASE); } // this is an add and not an addAll because we want a List of Lists of GenericValues, one List of Adjustments per item *itemAdjustments*.add(taxList); }

The *itemShippingList *contains 0 amount per any product item in any case, because of *Map serviceContext = this.makeTaxContext(i, shipAddress, shoppingCartItemIndexMap);* where product.add(i, cartItem.getProduct()); amount.add(i, cartItem.getItemSubTotal(itemInfo.quantity)); price.add(i, cartItem.getBasePrice()); * shipAmt.add(i, BigDecimal.ZERO); // no per item shipping yet* shoppingCartItemIndexMap.put(Integer.valueOf(i), cartItem);

and I do not see any sense in shipping amount per product item, because I have shipping amount per shipping group.

So, secondly: there is another possible way to add the shipping tax

if (orderShippingAmount != null && orderShippingAmount.compareTo(BigDecimal.ZERO) > 0) { List taxList = getTaxAdjustments(delegator, *null*, productStore, payToPartyId, billToPartyId, taxAuthoritySet, ZERO_BASE, ZERO_BASE, orderShippingAmount, ZERO_BASE); orderAdjustments.addAll(taxList); }

and orderShippingAmount has value in my case (9 EUR), let's go to the getTaxAdjustments (notice that product specified as null, because this call does not relate to any product) getTaxAdjustments tries to get all necessary TaxAuthorityRateProduct to calc the tax,

*List lookupList = delegator.findList("TaxAuthorityRateProduct", mainCondition, null, orderList, null, false);* * List filteredList = EntityUtil.filterByDate(lookupList, true);* * * * if (filteredList.size() == 0) {* * Debug.logWarning("In TaxAuthority Product Rate no records were found for condition:" + mainCondition.toString(), module);* * return adjustments;* * }*

but in the case of the product == null, the following is used productCategoryCond = EntityCondition.makeCondition("productCategoryId", EntityOperator.EQUALS, null);

and that I do not understand. It tries to find TaxAuthorityRateProduct to calc the tax , which are not assigned on any product category. Could you help me to understand the idea of this calculation? Why the ordering shipping amount depends on TaxAuthorityRateProduct . To have a TaxAuthorityRateProduct without Category specified is illegal and it is not possible to add it do via UI.

Thank you.

Thank you for your assistance. I'm looking forward for any new step or idea.

On Tue, Jan 25, 2011 at 11:16 AM, Jacques Le Roux [via OFBiz] < ml-node+3235@n4.nabble.com<ml-n@n4.nabble.com>

wrote:

I wil have a look when I will get a chance...

Thanks

Jacques

From: "biletnikov" <[hidden
email]<http://user/SendEmail.jtp?type=node&node=3235733&i=0>>

The method is called ok, and passes the validation. Just remind you, the shipping cost is added, but without VAT.... that is the problem.

On Tue, Jan 25, 2011 at 12:55 AM, Sergei Biletnikov <[hidden
email]<http://user/SendEmail.jtp?type=node&node=3235733&i=1>>wrote:

I have read mails.

In my case, I use "admin" login as OFBiz administrator to make an order,

and a customer login is created by me and has Origin and Destination addresses. I'll try to debug *"public void calcAndAddTax(GenericValue shipAddress) throws* *GeneralException"* * * method.* *

On Tue, Jan 25, 2011 at 12:30 AM, Jacques Le Roux [via OFBiz] < [hidden email] <http://user/SendEmail.jtp?type=node&node=3235733&i=2><[hidden

email] <http://user/SendEmail.jtp?type=node&node=3235733&i=3>>

wrote:

Did you look at http://ofbiz.markmail.org/search/shipping+vat ?

This could help, maybe you are in a special case. Are you using admin for testing? Have you a shipping address for the login you use for testing?

Jacques

biletnikov wrote:

OFBiz 9.04 (last stable release)

On Tue, Jan 25, 2011 at 12:23 AM, Jacques Le Roux [via OFBiz] < [hidden email] <http://user/SendEmail.jtp?type=node&node=3235084&i=0><[hidden

email] <http://user/SendEmail.jtp?type=node&node=3235084&i=1>>

wrote:

Which version are you using?

Jacques

From: "biletnikov" <[hidden email]< http://user/SendEmail.jtp?type=node&node=3235075&i=0>>

Hello all, we need to apply VAT 19% to order items and shipping price. VAT is successfully applied to the order item prices, but not for the shipment.

Example:

Items SubTotal €63.74

Total Other Order Adjustments €0.00

Total Shipping and Handling €5.00

Total Sales Tax €12.11

Total Due €80.85

------------------------------------------------------- Shipping cost is 5 euro, but it must be 5 * 1.19 = 5.95 euro.

The order is created via OFBiz (Order entry), we do not use e-commerce.

We have a TaxAuthority, which is bundled with Tax Authority Product

Rates

(for each product category), Tax Shipping = 'Y'

A product has Charge Shipping = 'Y', Taxable = 'Y'. However, the VAT is calculated, but not for the shipment.

Why it is so? Where is the problem? As I understand, it should be possible to

have

VAT

for

the shipment.

Thanks.

-- View this message in context:

http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3234699.html<http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3234699.html?by-user=t> < http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3234699.html?by-user=t<http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3234699.html?by-user=t&by-user=t>>

<

http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3234699.html?by-user=t<http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3234699.html?by-user=t&by-user=t> < http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3234699.html?by-user=t&by-user=t<http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3234699.html?by-user=t&by-user=t&by-user=t>>>

Sent from the OFBiz - User mailing list archive at Nabble.com.

------------------------------ If you reply to this email, your message will be added to the discussion below:

http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3235075.html<http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3235075.html?by-user=t> < http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3235075.html?by-user=t<http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3235075.html?by-user=t&by-user=t>>

To unsubscribe from VAT is not applied for the shipping, click here<

http://ofbiz.135035.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3234699&code=YmlsZXRuaWtvdkBnbWFpbC5jb218MzIzNDY5OXwyMDcwNzk3NDQ4<http://ofbiz.135035.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3234699&code=YmlsZXRuaWtvdkBnbWFpbC5jb218MzIzNDY5OXwyMDcwNzk3NDQ4&by-user=t> < http://ofbiz.135035.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3234699&code=YmlsZXRuaWtvdkBnbWFpbC5jb218MzIzNDY5OXwyMDcwNzk3NDQ4&by-user=t<http://ofbiz.135035.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3234699&code=YmlsZXRuaWtvdkBnbWFpbC5jb218MzIzNDY5OXwyMDcwNzk3NDQ4&by-user=t&by-user=t>>>.

------------------------------ If you reply to this email, your message will be added to the discussion below:

http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3235084.html<http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3235084.html?by-user=t>

To unsubscribe from VAT is not applied for the shipping, click here<

http://ofbiz.135035.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3234699&code=YmlsZXRuaWtvdkBnbWFpbC5jb218MzIzNDY5OXwyMDcwNzk3NDQ4<http://ofbiz.135035.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3234699&code=YmlsZXRuaWtvdkBnbWFpbC5jb218MzIzNDY5OXwyMDcwNzk3NDQ4&by-user=t>>.

-- Best regards, Sergei Biletnikov

-- View this message in context: http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3235150.html<http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3235150.html?by-user=t>

Sent from the OFBiz - User mailing list archive at Nabble.com.

------------------------------ If you reply to this email, your message will be added to the discussion below:

http://ofbiz.135035.n4.nabble.com/VAT-is-not-applied-for-the-shipping-tp3234699p3235733.html To unsubscribe from VAT is not applied for the shipping, click here<http://ofbiz.135035.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3234699&code=YmlsZXRuaWtvdkBnbWFpbC5jb218MzIzNDY5OXwyMDcwNzk3NDQ4>.