[jira] Created: (OFBIZ-1086) Show prices incl. VAT in shoppingcart Total and miniproductsummary

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

[jira] Created: (OFBIZ-1086) Show prices incl. VAT in shoppingcart Total and miniproductsummary

Nicolas Malin (Jira)
Show prices incl. VAT in shoppingcart Total and miniproductsummary
------------------------------------------------------------------

                 Key: OFBIZ-1086
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1086
             Project: OFBiz
          Issue Type: Improvement
          Components: ecommerce, order
    Affects Versions: SVN trunk
            Reporter: Thomas Herzog
             Fix For: SVN trunk


In current implementation of VAT displays a mixture of incl. and excl. prices in some ecommerce screens. This patch shows prices incl. VAT for Mini Shopping Cart Total, Micro Shopping Cart Total (displayed in the Header), Last Products Minibox and Quick Reorder... Minibox.
It also solves issuses left open in OFBIZ-113.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1086) Show prices incl. VAT in shoppingcart Total and miniproductsummary

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Herzog updated OFBIZ-1086:
---------------------------------

    Attachment: carttotal_miniproductsummary_prices__incl_VAT.diff

> Show prices incl. VAT in shoppingcart Total and miniproductsummary
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1086
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1086
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Thomas Herzog
>             Fix For: SVN trunk
>
>         Attachments: carttotal_miniproductsummary_prices__incl_VAT.diff
>
>
> In current implementation of VAT displays a mixture of incl. and excl. prices in some ecommerce screens. This patch shows prices incl. VAT for Mini Shopping Cart Total, Micro Shopping Cart Total (displayed in the Header), Last Products Minibox and Quick Reorder... Minibox.
> It also solves issuses left open in OFBIZ-113.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1086) Show prices incl. VAT in shoppingcart Total and miniproductsummary

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508141 ]

Christian Seeberger commented on OFBIZ-1086:
--------------------------------------------

Hi Thomas,

question:

what's the goal of changing in miniproductsummary.bsh

    priceParams = UtilMisc.toMap("product", miniProduct,
        "prodCatalogId", prodCatalogId, "webSiteId", webSiteId,
        "currencyUomId", cart.getCurrency(),
        "autoUserLogin", session.getAttribute("autoUserLogin"),
        "checkIncludeVat", "Y");

your solution works also without "checkIncludeVat=Y", but only as long, as no tax calculation was performed.

That means, if you proceed with your checkout to the order verification screen and then go back to the store instead of submitting the order,
sum amounts of minicart and cartscreen are not correctly calculated. (previous amount plus tax, which means tax is applied twice)

For the shop I develop (Germany, EU), there is actually no need to sell without any taxes, so I am helping me out with this code (e.g. minicart):


<#if (shoppingCart.getTotalSalesTax() > 0.0)>
        <#assign shoppingCartGrandTotal = shoppingCart.getGrandTotal()>
        <#else>
        <#assign shoppingCartGrandTotal = shoppingCart.getDisplayGrandTotal()>
</#if>
     
....

<@ofbizCurrency amount=shoppingCartGrandTotal isoCode=shoppingCart.getCurrency()/>


 

> Show prices incl. VAT in shoppingcart Total and miniproductsummary
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1086
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1086
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Thomas Herzog
>             Fix For: SVN trunk
>
>         Attachments: carttotal_miniproductsummary_prices__incl_VAT.diff
>
>
> In current implementation of VAT displays a mixture of incl. and excl. prices in some ecommerce screens. This patch shows prices incl. VAT for Mini Shopping Cart Total, Micro Shopping Cart Total (displayed in the Header), Last Products Minibox and Quick Reorder... Minibox.
> It also solves issuses left open in OFBIZ-113.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1086) Show prices incl. VAT in shoppingcart Total and miniproductsummary

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527695 ]

Jacopo Cappellato commented on OFBIZ-1086:
------------------------------------------

Thomas, thank you for the patch; Christian, thank you for the review and comment.
In my opinion Christian is right: we cannot include this patch as is now; the solution proposed by Christian is interesting but maybe the best solution is to include the logic inside of the ShoppingCart.getDisplayGrandTotal() method. And instead of testing for (shoppingCart.getTotalSalesTax() > 0.0) we should look at the ProductStore.showPricesWithVatTax (or a similar flag).

I mean something like this (in pseudocode):

public double getDisplayGrandTotal() {
    if (ProductStore.showPricesWithVatTax equals to Y) {
        return this.getDisplaySubTotal() + this.getTotalShipping() + this.getTotalSalesTax() + this.getOrderOtherAdjustmentTotal();
    } else {
        return getGrandTotal();
    }
}

And then in the ecommerce we could simply use the ShoppingCart.getDisplayGrandTotal() method everywhere.



> Show prices incl. VAT in shoppingcart Total and miniproductsummary
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1086
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1086
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Thomas Herzog
>             Fix For: SVN trunk
>
>         Attachments: carttotal_miniproductsummary_prices__incl_VAT.diff
>
>
> In current implementation of VAT displays a mixture of incl. and excl. prices in some ecommerce screens. This patch shows prices incl. VAT for Mini Shopping Cart Total, Micro Shopping Cart Total (displayed in the Header), Last Products Minibox and Quick Reorder... Minibox.
> It also solves issuses left open in OFBIZ-113.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1086) Show prices incl. VAT in shoppingcart Total and miniproductsummary

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527714 ]

Jacques Le Roux commented on OFBIZ-1086:
----------------------------------------

I agree with Jacopo : generalisation is better

> Show prices incl. VAT in shoppingcart Total and miniproductsummary
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1086
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1086
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Thomas Herzog
>             Fix For: SVN trunk
>
>         Attachments: carttotal_miniproductsummary_prices__incl_VAT.diff
>
>
> In current implementation of VAT displays a mixture of incl. and excl. prices in some ecommerce screens. This patch shows prices incl. VAT for Mini Shopping Cart Total, Micro Shopping Cart Total (displayed in the Header), Last Products Minibox and Quick Reorder... Minibox.
> It also solves issuses left open in OFBIZ-113.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1086) Show prices incl. VAT in shoppingcart Total and miniproductsummary

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588924#action_12588924 ]

Anne Jessel commented on OFBIZ-1086:
------------------------------------

I solved the problem with VAT (GST in my case) not being displayed in the Last Products Minibox by altering miniproductsummary.bsh in the way quoted in Christian's comment above (before I checked Jira!). The addition of the checkIncludeVat=Y parameter seemed to be the obvious and correct solution, as the value is then passed to, and used by, the calculateProductPrice service. I do not see the behaviour described by Christian. I have not been able to find anything that saves the result of the calculateProductPrice service call in miniproductsummary.bsh to anywhere that might be used in a subsequent calculation. As best I can see, the result is used only for display.

Also, Christian states the solution works without the checkIncludeVat=Y change (that is,no change to the existing buggy miniproductsummary.bsh), but it certainly doesn't for me, and I don't see from the code how it could ever work.

Could the confusion be because the patch attached to this issue attempts to solve several separate problems (Mini shopping cart, Last Products minibox,...), and the problems Christian discovered with the patch were unrelated to the miniproductsummary.bsh fix for the Last Products Minibox? If so, I can submit a patch that includes only that change. If not, could someone please explain what the problem is with this change to miniproductsummary.bsh so I can try to work out a different solution?

> Show prices incl. VAT in shoppingcart Total and miniproductsummary
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1086
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1086
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Thomas Herzog
>             Fix For: SVN trunk
>
>         Attachments: carttotal_miniproductsummary_prices__incl_VAT.diff
>
>
> In current implementation of VAT displays a mixture of incl. and excl. prices in some ecommerce screens. This patch shows prices incl. VAT for Mini Shopping Cart Total, Micro Shopping Cart Total (displayed in the Header), Last Products Minibox and Quick Reorder... Minibox.
> It also solves issuses left open in OFBIZ-113.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-1086) Show prices incl. VAT in shoppingcart Total and miniproductsummary

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-1086:
--------------------------------------

    Assignee: Jacques Le Roux

> Show prices incl. VAT in shoppingcart Total and miniproductsummary
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1086
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1086
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ecommerce, order
>    Affects Versions: SVN trunk
>            Reporter: Thomas Herzog
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: carttotal_miniproductsummary_prices__incl_VAT.diff
>
>
> In current implementation of VAT displays a mixture of incl. and excl. prices in some ecommerce screens. This patch shows prices incl. VAT for Mini Shopping Cart Total, Micro Shopping Cart Total (displayed in the Header), Last Products Minibox and Quick Reorder... Minibox.
> It also solves issuses left open in OFBIZ-113.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1086) Show prices incl. VAT in shoppingcart Total and miniproductsummary

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1086.
----------------------------------

    Resolution: Fixed

This should be fixed now

> Show prices incl. VAT in shoppingcart Total and miniproductsummary
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1086
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1086
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: order, specialpurpose/ecommerce
>    Affects Versions: SVN trunk
>            Reporter: Thomas Herzog
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: carttotal_miniproductsummary_prices__incl_VAT.diff
>
>
> In current implementation of VAT displays a mixture of incl. and excl. prices in some ecommerce screens. This patch shows prices incl. VAT for Mini Shopping Cart Total, Micro Shopping Cart Total (displayed in the Header), Last Products Minibox and Quick Reorder... Minibox.
> It also solves issuses left open in OFBIZ-113.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.