Webpos and sales tax

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

Webpos and sales tax

Frank Herrman
Hi there,

I’m having trouble with the WebPOS. I noticed the latest update of Ofbiz had some improvements in this module, but still a lot is missing. One of the most important things I can’t seem to get working is the sales tax. For example, I have a product of 18.182 euro’s, 22 euro incl. sales tax. It now shows:


  *   Total: 22.00
  *   Total VAT: 0.00
  *   Total: 22.00
  *   To be paid: 18.182

So the total amount is correct. The amount to be paid suddenly does not include the sales tax. Furthermore, the sales tax shows 0 euro. VAT does work outside the POS (in order management), it just doesn’t work in the POS. When I enter an amount paid by cash or whatever payment method, it expects me to enter 18.182 instead of the 22.00 euro’s the customer needs to pay.

I dived into the code but can’t seem to find it. I ended up in applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java where I found the method getOrderTaxByTaxAuthGeoAndParty() which bases the sales tax on the tax authority. So my feeling is that in a webpos session the right tax authority is not activated. The POS terminal I have chosen is connected to a facility that does have the right tax authority. I’m not sure if there is any other setting that could cause this?


Kind regards,

Frank

Reply | Threaded
Open this post in threaded view
|

AW: Webpos and sales tax

iwolf
Hello Frank,

in order to have WebPOS calculate the tax you have to add the SHIPPING_ORIG_LOCATION to the facility.

1.) Add contact mech to facility
2.) Add FacilityContactMechPurpose

<FacilityContactMechPurpose facilityId="yourFacilityId" contactMechId="yourContactMechId" contactMechPurposeTypeId="SHIP_ORIG_LOCATION"/>

It will then calculate the tax, as the SHIP_ORIG_LOCATION is used for tax calculation in WebPOS. There is still an issue adding the tax to the "Total Due". As I am currently working on getting the WebPOS ready for Austria I am working on a fix right now.

Best regards,
Ingo

-----Ursprüngliche Nachricht-----
Von: Frank Herrman <[hidden email]>
Gesendet: Montag, 29. Oktober 2018 16:56
An: [hidden email]
Betreff: Webpos and sales tax

Hi there,

I’m having trouble with the WebPOS. I noticed the latest update of Ofbiz had some improvements in this module, but still a lot is missing. One of the most important things I can’t seem to get working is the sales tax. For example, I have a product of 18.182 euro’s, 22 euro incl. sales tax. It now shows:


  *   Total: 22.00
  *   Total VAT: 0.00
  *   Total: 22.00
  *   To be paid: 18.182

So the total amount is correct. The amount to be paid suddenly does not include the sales tax. Furthermore, the sales tax shows 0 euro. VAT does work outside the POS (in order management), it just doesn’t work in the POS. When I enter an amount paid by cash or whatever payment method, it expects me to enter 18.182 instead of the 22.00 euro’s the customer needs to pay.

I dived into the code but can’t seem to find it. I ended up in applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java where I found the method getOrderTaxByTaxAuthGeoAndParty() which bases the sales tax on the tax authority. So my feeling is that in a webpos session the right tax authority is not activated. The POS terminal I have chosen is connected to a facility that does have the right tax authority. I’m not sure if there is any other setting that could cause this?


Kind regards,

Frank

Reply | Threaded
Open this post in threaded view
|

Re: Webpos and sales tax

Frank Herrman
Hi Ingo,

Thank you for your suggestion, unfortunately I already had that set for the facility the POS is connected to. I have set it for the other facilities as well, but that did not work out.

I have messed around with the code to get it to work and ended up with something that seems to work. However, if I set 'show pricies including taxes' to my store it adds the tax twice to the due-amount and total (though the sales tax is correct). So it does not feel right yet. I have something like this:

Total: 1 euro
Tax: 0,21 euro
Total: 1,42 euro

Kind regards,
 
Frank

On [DATE], "[NAME]" <[ADDRESS]> wrote:

    Hello Frank,
   
    in order to have WebPOS calculate the tax you have to add the SHIPPING_ORIG_LOCATION to the facility.
   
    1.) Add contact mech to facility
    2.) Add FacilityContactMechPurpose
   
    <FacilityContactMechPurpose facilityId="yourFacilityId" contactMechId="yourContactMechId" contactMechPurposeTypeId="SHIP_ORIG_LOCATION"/>
   
    It will then calculate the tax, as the SHIP_ORIG_LOCATION is used for tax calculation in WebPOS. There is still an issue adding the tax to the "Total Due". As I am currently working on getting the WebPOS ready for Austria I am working on a fix right now.
   
    Best regards,
    Ingo
   
    -----Ursprüngliche Nachricht-----
    Von: Frank Herrman <[hidden email]>
    Gesendet: Montag, 29. Oktober 2018 16:56
    An: [hidden email]
    Betreff: Webpos and sales tax
   
    Hi there,
   
    I’m having trouble with the WebPOS. I noticed the latest update of Ofbiz had some improvements in this module, but still a lot is missing. One of the most important things I can’t seem to get working is the sales tax. For example, I have a product of 18.182 euro’s, 22 euro incl. sales tax. It now shows:
   
   
      *   Total: 22.00
      *   Total VAT: 0.00
      *   Total: 22.00
      *   To be paid: 18.182
   
    So the total amount is correct. The amount to be paid suddenly does not include the sales tax. Furthermore, the sales tax shows 0 euro. VAT does work outside the POS (in order management), it just doesn’t work in the POS. When I enter an amount paid by cash or whatever payment method, it expects me to enter 18.182 instead of the 22.00 euro’s the customer needs to pay.
   
    I dived into the code but can’t seem to find it. I ended up in applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java where I found the method getOrderTaxByTaxAuthGeoAndParty() which bases the sales tax on the tax authority. So my feeling is that in a webpos session the right tax authority is not activated. The POS terminal I have chosen is connected to a facility that does have the right tax authority. I’m not sure if there is any other setting that could cause this?
   
   
    Kind regards,
   
    Frank
   
   

Reply | Threaded
Open this post in threaded view
|

AW: Webpos and sales tax

iwolf
Hi Frank,

that’s because the "getDisplayGrandTotal" method takes the subtotal of the cart line that already has tax included and adds the "totalSalesTax".

return this.getDisplaySubTotal().add(this.getTotalShipping()).add(this.getTotalSalesTax()).add(this.getOrderOtherAdjustmentTotal()).add(this.getOrderGlobalAdjustments());

I have changed it locally to:

GenericValue productStore = ProductStoreWorker.getProductStore(productStoreId, delegator);
if(productStore.get("showPricesWithVatTax").equals("Y")){
        return this.getSubTotal().add(this.getTotalShipping()).add(this.getTotalSalesTax()).add(this.getOrderOtherAdjustmentTotal()).add(this.getOrderGlobalAdjustments());
}else
{
        return this.getDisplaySubTotal().add(this.getTotalShipping()).add(this.getTotalSalesTax()).add(this.getOrderOtherAdjustmentTotal()).add(this.getOrderGlobalAdjustments());
}

I am still testing but it looks promising.

Best regards,
Ingo


-----Ursprüngliche Nachricht-----
Von: Frank Herrman <[hidden email]>
Gesendet: Mittwoch, 14. November 2018 09:13
An: [hidden email]
Betreff: Re: Webpos and sales tax

Hi Ingo,

Thank you for your suggestion, unfortunately I already had that set for the facility the POS is connected to. I have set it for the other facilities as well, but that did not work out.

I have messed around with the code to get it to work and ended up with something that seems to work. However, if I set 'show pricies including taxes' to my store it adds the tax twice to the due-amount and total (though the sales tax is correct). So it does not feel right yet. I have something like this:

Total: 1 euro
Tax: 0,21 euro
Total: 1,42 euro

Kind regards,
 
Frank

On [DATE], "[NAME]" <[ADDRESS]> wrote:

    Hello Frank,
   
    in order to have WebPOS calculate the tax you have to add the SHIPPING_ORIG_LOCATION to the facility.
   
    1.) Add contact mech to facility
    2.) Add FacilityContactMechPurpose
   
    <FacilityContactMechPurpose facilityId="yourFacilityId" contactMechId="yourContactMechId" contactMechPurposeTypeId="SHIP_ORIG_LOCATION"/>
   
    It will then calculate the tax, as the SHIP_ORIG_LOCATION is used for tax calculation in WebPOS. There is still an issue adding the tax to the "Total Due". As I am currently working on getting the WebPOS ready for Austria I am working on a fix right now.
   
    Best regards,
    Ingo
   
    -----Ursprüngliche Nachricht-----
    Von: Frank Herrman <[hidden email]>
    Gesendet: Montag, 29. Oktober 2018 16:56
    An: [hidden email]
    Betreff: Webpos and sales tax
   
    Hi there,
   
    I’m having trouble with the WebPOS. I noticed the latest update of Ofbiz had some improvements in this module, but still a lot is missing. One of the most important things I can’t seem to get working is the sales tax. For example, I have a product of 18.182 euro’s, 22 euro incl. sales tax. It now shows:
   
   
      *   Total: 22.00
      *   Total VAT: 0.00
      *   Total: 22.00
      *   To be paid: 18.182
   
    So the total amount is correct. The amount to be paid suddenly does not include the sales tax. Furthermore, the sales tax shows 0 euro. VAT does work outside the POS (in order management), it just doesn’t work in the POS. When I enter an amount paid by cash or whatever payment method, it expects me to enter 18.182 instead of the 22.00 euro’s the customer needs to pay.
   
    I dived into the code but can’t seem to find it. I ended up in applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java where I found the method getOrderTaxByTaxAuthGeoAndParty() which bases the sales tax on the tax authority. So my feeling is that in a webpos session the right tax authority is not activated. The POS terminal I have chosen is connected to a facility that does have the right tax authority. I’m not sure if there is any other setting that could cause this?
   
   
    Kind regards,
   
    Frank
   
   

Reply | Threaded
Open this post in threaded view
|

Re: Webpos and sales tax

Frank Herrman
Hi Ingo,

This did the trick for me! The only thing that might require some further investigation is that it now shows this list:

* Total: 127,64
* Total promo: 0
* Total VAT: 22,15
* Total: 127,64

The first total you would probably expect the price excl. VAT (105,49 in this example). Not a big deal for me though.

Kind regards,
 
Frank

Op 15-11-18 11:33 heeft Ingo Wolfmayr <[hidden email]> geschreven:

    Hi Frank,
   
    that’s because the "getDisplayGrandTotal" method takes the subtotal of the cart line that already has tax included and adds the "totalSalesTax".
   
    return this.getDisplaySubTotal().add(this.getTotalShipping()).add(this.getTotalSalesTax()).add(this.getOrderOtherAdjustmentTotal()).add(this.getOrderGlobalAdjustments());
   
    I have changed it locally to:
   
    GenericValue productStore = ProductStoreWorker.getProductStore(productStoreId, delegator);
    if(productStore.get("showPricesWithVatTax").equals("Y")){
    return this.getSubTotal().add(this.getTotalShipping()).add(this.getTotalSalesTax()).add(this.getOrderOtherAdjustmentTotal()).add(this.getOrderGlobalAdjustments());
    }else
    {
    return this.getDisplaySubTotal().add(this.getTotalShipping()).add(this.getTotalSalesTax()).add(this.getOrderOtherAdjustmentTotal()).add(this.getOrderGlobalAdjustments());
    }
   
    I am still testing but it looks promising.
   
    Best regards,
    Ingo
   
   
    -----Ursprüngliche Nachricht-----
    Von: Frank Herrman <[hidden email]>
    Gesendet: Mittwoch, 14. November 2018 09:13
    An: [hidden email]
    Betreff: Re: Webpos and sales tax
   
    Hi Ingo,
   
    Thank you for your suggestion, unfortunately I already had that set for the facility the POS is connected to. I have set it for the other facilities as well, but that did not work out.
   
    I have messed around with the code to get it to work and ended up with something that seems to work. However, if I set 'show pricies including taxes' to my store it adds the tax twice to the due-amount and total (though the sales tax is correct). So it does not feel right yet. I have something like this:
   
    Total: 1 euro
    Tax: 0,21 euro
    Total: 1,42 euro
   
    Kind regards,
     
    Frank
   
    On [DATE], "[NAME]" <[ADDRESS]> wrote:
   
        Hello Frank,
       
        in order to have WebPOS calculate the tax you have to add the SHIPPING_ORIG_LOCATION to the facility.
       
        1.) Add contact mech to facility
        2.) Add FacilityContactMechPurpose
       
        <FacilityContactMechPurpose facilityId="yourFacilityId" contactMechId="yourContactMechId" contactMechPurposeTypeId="SHIP_ORIG_LOCATION"/>
       
        It will then calculate the tax, as the SHIP_ORIG_LOCATION is used for tax calculation in WebPOS. There is still an issue adding the tax to the "Total Due". As I am currently working on getting the WebPOS ready for Austria I am working on a fix right now.
       
        Best regards,
        Ingo
       
        -----Ursprüngliche Nachricht-----
        Von: Frank Herrman <[hidden email]>
        Gesendet: Montag, 29. Oktober 2018 16:56
        An: [hidden email]
        Betreff: Webpos and sales tax
       
        Hi there,
       
        I’m having trouble with the WebPOS. I noticed the latest update of Ofbiz had some improvements in this module, but still a lot is missing. One of the most important things I can’t seem to get working is the sales tax. For example, I have a product of 18.182 euro’s, 22 euro incl. sales tax. It now shows:
       
       
          *   Total: 22.00
          *   Total VAT: 0.00
          *   Total: 22.00
          *   To be paid: 18.182
       
        So the total amount is correct. The amount to be paid suddenly does not include the sales tax. Furthermore, the sales tax shows 0 euro. VAT does work outside the POS (in order management), it just doesn’t work in the POS. When I enter an amount paid by cash or whatever payment method, it expects me to enter 18.182 instead of the 22.00 euro’s the customer needs to pay.
       
        I dived into the code but can’t seem to find it. I ended up in applications/order/src/main/java/org/apache/ofbiz/order/order/OrderReadHelper.java where I found the method getOrderTaxByTaxAuthGeoAndParty() which bases the sales tax on the tax authority. So my feeling is that in a webpos session the right tax authority is not activated. The POS terminal I have chosen is connected to a facility that does have the right tax authority. I’m not sure if there is any other setting that could cause this?
       
       
        Kind regards,
       
        Frank