[jira] Created: (OFBIZ-113) Showing VAT/Sales tax in Shopping cart before checkout

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-113) Showing VAT/Sales tax in Shopping cart before checkout

Nicolas Malin (Jira)
Showing VAT/Sales tax in Shopping cart before checkout
------------------------------------------------------

                 Key: OFBIZ-113
                 URL: http://issues.apache.org/jira/browse/OFBIZ-113
             Project: OFBiz (The Open for Business Project)
          Issue Type: Improvement
          Components: ecommerce, order
    Affects Versions: SVN trunk
            Reporter: Eriks Dobelis


VAT/Sales tax is currently calculated only after initiating Checkout. Even if the price in ecommerce catalog includes tax, shopping cart shows price without tax. It would be nice if Shopping cart showed the same price as in ecommerce catalog and instantly calculated total tax when a new product is added to Shopping cart.

I tried to look into source code and seems this has to be changed in ShoppingCart.java, but it also seems quite complex issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-113) Showing VAT/Sales tax in Shopping cart before checkout

Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-113?page=comments#action_12423661 ]
           
Jacques Le Roux commented on OFBIZ-113:
---------------------------------------

I agree and I vote for

> Showing VAT/Sales tax in Shopping cart before checkout
> ------------------------------------------------------
>
>                 Key: OFBIZ-113
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-113
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Eriks Dobelis
>
> VAT/Sales tax is currently calculated only after initiating Checkout. Even if the price in ecommerce catalog includes tax, shopping cart shows price without tax. It would be nice if Shopping cart showed the same price as in ecommerce catalog and instantly calculated total tax when a new product is added to Shopping cart.
> I tried to look into source code and seems this has to be changed in ShoppingCart.java, but it also seems quite complex issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-113) Showing VAT/Sales tax in Shopping cart before checkout

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-113?page=comments#action_12428247 ]
           
Eriks Dobelis commented on OFBIZ-113:
-------------------------------------

This patch shows line items in Cart with VAT, but the total is still without VAT before shipping address is assigned.

Index: applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
===================================================================
--- applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java  (revision 431541)
+++ applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java  (working copy)
@@ -877,6 +877,7 @@
                     priceContext.put("webSiteId", cart.getWebSiteId());
                     priceContext.put("productStoreId", cart.getProductStoreId());
                     priceContext.put("agreementId", cart.getAgreementId());
+                    priceContext.put("checkIncludeVat", "Y");
                     Map priceResult = dispatcher.runSync("calculateProductPrice", priceContext);
                     if (ServiceUtil.isError(priceResult)) {
                         throw new CartItemModifyException("There was an error while calculating the price: " + ServiceUtil.getErrorMessage(priceResult));


> Showing VAT/Sales tax in Shopping cart before checkout
> ------------------------------------------------------
>
>                 Key: OFBIZ-113
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-113
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Eriks Dobelis
>
> VAT/Sales tax is currently calculated only after initiating Checkout. Even if the price in ecommerce catalog includes tax, shopping cart shows price without tax. It would be nice if Shopping cart showed the same price as in ecommerce catalog and instantly calculated total tax when a new product is added to Shopping cart.
> I tried to look into source code and seems this has to be changed in ShoppingCart.java, but it also seems quite complex issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-113) Showing VAT/Sales tax in Shopping cart before checkout

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-113?page=comments#action_12428557 ]
           
David E. Jones commented on OFBIZ-113:
--------------------------------------

Interesting... It looks like this part of ShoppingCartItem was updated to use the new displayPrice and such, but didn't go the last step to setting the flag to get the VAT added into the display price (and left out of the base price so that in the final order it will be split appropriately).

The big trick with this, related to what you're saying about the shipping address and such, is that the actualy tax adjustment is added in once we know the address and not before, just in case it will go outside of the VAT jurisdiction or other taxes might be involved or whatever.

It should be possible though to make a change to the shopping cart page to show the total with tax included, ie have it be based on the display price and not on the base price. Of course, then we need to make sure that when the tax adjustment is put in place that it is not added in twice.

Okay, this ShoppingCartItem change is now in SVN, rev 432121.


> Showing VAT/Sales tax in Shopping cart before checkout
> ------------------------------------------------------
>
>                 Key: OFBIZ-113
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-113
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Eriks Dobelis
>
> VAT/Sales tax is currently calculated only after initiating Checkout. Even if the price in ecommerce catalog includes tax, shopping cart shows price without tax. It would be nice if Shopping cart showed the same price as in ecommerce catalog and instantly calculated total tax when a new product is added to Shopping cart.
> I tried to look into source code and seems this has to be changed in ShoppingCart.java, but it also seems quite complex issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-113) Showing VAT/Sales tax in Shopping cart before checkout

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-113?page=all ]

Eriks Dobelis updated OFBIZ-113:
--------------------------------

    Attachment: cart.diff

> Showing VAT/Sales tax in Shopping cart before checkout
> ------------------------------------------------------
>
>                 Key: OFBIZ-113
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-113
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Eriks Dobelis
>         Attachments: cart.diff
>
>
> VAT/Sales tax is currently calculated only after initiating Checkout. Even if the price in ecommerce catalog includes tax, shopping cart shows price without tax. It would be nice if Shopping cart showed the same price as in ecommerce catalog and instantly calculated total tax when a new product is added to Shopping cart.
> I tried to look into source code and seems this has to be changed in ShoppingCart.java, but it also seems quite complex issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-113) Showing VAT/Sales tax in Shopping cart before checkout

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-113?page=comments#action_12428780 ]
           
Eriks Dobelis commented on OFBIZ-113:
-------------------------------------

Attached diff fixes totals in shopping cart by including VAT even if shipping is not supplied. Looks somewhat strange because depending on existence of shipping VAT is either shown separately or not. Probably would be better if it was shown all the time.

Is it correct way to check existence of shipping?

I am not sure whether it works correctly in case there are adjustments, but in simple cases it works.

> Showing VAT/Sales tax in Shopping cart before checkout
> ------------------------------------------------------
>
>                 Key: OFBIZ-113
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-113
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Eriks Dobelis
>         Attachments: cart.diff
>
>
> VAT/Sales tax is currently calculated only after initiating Checkout. Even if the price in ecommerce catalog includes tax, shopping cart shows price without tax. It would be nice if Shopping cart showed the same price as in ecommerce catalog and instantly calculated total tax when a new product is added to Shopping cart.
> I tried to look into source code and seems this has to be changed in ShoppingCart.java, but it also seems quite complex issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-113) Showing VAT/Sales tax in Shopping cart before checkout

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-113?page=comments#action_12428930 ]
           
Eriks Dobelis commented on OFBIZ-113:
-------------------------------------

Just a note that this should be applied together with patch from OFBIZ-164 as otherwise VAT calculation is incorrect.

> Showing VAT/Sales tax in Shopping cart before checkout
> ------------------------------------------------------
>
>                 Key: OFBIZ-113
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-113
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Eriks Dobelis
>         Attachments: cart.diff
>
>
> VAT/Sales tax is currently calculated only after initiating Checkout. Even if the price in ecommerce catalog includes tax, shopping cart shows price without tax. It would be nice if Shopping cart showed the same price as in ecommerce catalog and instantly calculated total tax when a new product is added to Shopping cart.
> I tried to look into source code and seems this has to be changed in ShoppingCart.java, but it also seems quite complex issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-113) Showing VAT/Sales tax in Shopping cart before checkout

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-113?page=all ]

David E. Jones reassigned OFBIZ-113:
------------------------------------

    Assignee: David E. Jones

> Showing VAT/Sales tax in Shopping cart before checkout
> ------------------------------------------------------
>
>                 Key: OFBIZ-113
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-113
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Eriks Dobelis
>         Assigned To: David E. Jones
>         Attachments: cart.diff
>
>
> VAT/Sales tax is currently calculated only after initiating Checkout. Even if the price in ecommerce catalog includes tax, shopping cart shows price without tax. It would be nice if Shopping cart showed the same price as in ecommerce catalog and instantly calculated total tax when a new product is added to Shopping cart.
> I tried to look into source code and seems this has to be changed in ShoppingCart.java, but it also seems quite complex issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-113) Showing VAT/Sales tax in Shopping cart before checkout

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-113?page=all ]

David E. Jones closed OFBIZ-113.
--------------------------------

    Fix Version/s: SVN trunk
       Resolution: Fixed

Thanks for your work on this Eriks. The changes for OFBIZ-113 and OFBIZ-164 plus a couple of small changes are in SVN rev 437453. You can see the commit log for details.

> Showing VAT/Sales tax in Shopping cart before checkout
> ------------------------------------------------------
>
>                 Key: OFBIZ-113
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-113
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Eriks Dobelis
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: cart.diff
>
>
> VAT/Sales tax is currently calculated only after initiating Checkout. Even if the price in ecommerce catalog includes tax, shopping cart shows price without tax. It would be nice if Shopping cart showed the same price as in ecommerce catalog and instantly calculated total tax when a new product is added to Shopping cart.
> I tried to look into source code and seems this has to be changed in ShoppingCart.java, but it also seems quite complex issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-113) Showing VAT/Sales tax in Shopping cart before checkout

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-113?page=comments#action_12431318 ]
           
Eriks Dobelis commented on OFBIZ-113:
-------------------------------------

There is a problem when checkout is started (shipping address is entered), but not finished, then VAT is not calculated. Suggestions? Should normal VAT calculation be forced as soon as shipping address is entered or display price be used until the checkout is finalized?

> Showing VAT/Sales tax in Shopping cart before checkout
> ------------------------------------------------------
>
>                 Key: OFBIZ-113
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-113
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Eriks Dobelis
>         Assigned To: David E. Jones
>             Fix For: SVN trunk
>
>         Attachments: cart.diff
>
>
> VAT/Sales tax is currently calculated only after initiating Checkout. Even if the price in ecommerce catalog includes tax, shopping cart shows price without tax. It would be nice if Shopping cart showed the same price as in ecommerce catalog and instantly calculated total tax when a new product is added to Shopping cart.
> I tried to look into source code and seems this has to be changed in ShoppingCart.java, but it also seems quite complex issue.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira