Buying large amounts, selling smaller ones

2019-01-16 Thread Frank Herrman
Hello,

We have some special products that we buy in bulk, but sell in smaller 
portions. For example, we can buy a truck full of sand. We will put this sand 
in smaller portions up for sale (e.g. 5KG, 25KG etc). How can we best handle 
this in Ofbiz?

We could create separate products, but they have the same stock. We just have 
one pile of sand of which we create the smaller portions as soon as one has 
been sold. What if the next truck of sand is more expensive and we want to keep 
track of it using FIFO?

This is just an example, we also have products that are sold per piece or per 
meter to name another example. Any suggestion to the right direction would be 
very much appreciated. Thanks!

Kind regards,

Frank Herrman


Re: Freemarker missing

2018-11-30 Thread Frank Herrman
Hi Aditya,

I am using the latest release: 16.11.05. It did work before with this release, 
so it is probably caused by myself. I'm just wondering what it could have been. 

Kind regards,
 
Frank

Op 29-11-18 06:06 heeft Aditya Sharma  
geschreven:

Hi Frank,

Can you share some more details?

Which release are you using?


Thanks and Regards,

*Aditya Sharma* | Enterprise Software Engineer
HotWax Commerce <http://www.hotwax.co/> by HotWax Systems
<http://www.hotwaxsystems.com/>
[image: https://www.linkedin.com/in/aditya-p-sharma/]
<https://www.linkedin.com/in/aditya-p-sharma/>


On Wed, Nov 28, 2018 at 9:58 PM Frank Herrman  wrote:

> Hi all,
>
> After restarting Ofbiz I suddenly found an error in the logs relating to
> Freemarker. This was the error:
>
> 
/framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java:74:
> error: cannot find symbol
> public static final Version version = Configuration.VERSION_2_3_28;
>
> This suggests Freemarker was not available. I did some recent changes to
> templates, but nothing spectacular and certainly nothing with freemarker
> code or configuration. I’m not sure which modification caused this error
> since you don’t need to restart for template changes.
>
> I ended up downloading and copying freemarker.jar into the /lib/ folder
> which resolved the issue, but that doesn’t feel right. Does anybody have
> any idea what went wrong here?
>
> Kind regards,
>
> Frank
>




Freemarker missing

2018-11-28 Thread Frank Herrman
Hi all,

After restarting Ofbiz I suddenly found an error in the logs relating to 
Freemarker. This was the error:

/framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java:74:
 error: cannot find symbol
public static final Version version = Configuration.VERSION_2_3_28;

This suggests Freemarker was not available. I did some recent changes to 
templates, but nothing spectacular and certainly nothing with freemarker code 
or configuration. I’m not sure which modification caused this error since you 
don’t need to restart for template changes.

I ended up downloading and copying freemarker.jar into the /lib/ folder which 
resolved the issue, but that doesn’t feel right. Does anybody have any idea 
what went wrong here?

Kind regards,

Frank


Re: Webpos and sales tax

2018-11-19 Thread 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  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  
Gesendet: Mittwoch, 14. November 2018 09:13
An: user@ofbiz.apache.org
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



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  
Gesendet: Montag, 29. Oktober 2018 16:56
An: user@ofbiz.apache.org
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







Re: Webpos and sales tax

2018-11-14 Thread 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



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  
Gesendet: Montag, 29. Oktober 2018 16:56
An: user@ofbiz.apache.org
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





Webpos and sales tax

2018-10-29 Thread 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



Re: Inventory management in Apache

2018-09-14 Thread Frank Herrman
Hi Mohan,

You might also be interested in the 'requirements' functionality. You can find 
this in the order manager application. Everytime the critical minimum limit of 
stock is reached when an order has been placed in the system, it will create a 
requirement for that product. From the suppliers tab in this requirements 
functionality you can create a purchase order with all requirements for 
products connected to that supplier.

Kind regards,
 
Frank

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

Hi Mohan,

Welcome to the OFBiz community.

You can find inventory mgt functions in the 'facility' web-app of the
product component. In the demo instance:
https://demo-trunk.ofbiz.apache.org/facility/control/main

Also each product sheet - in the 'catalog' web-app of the product component
- has (some) inventory management features. See

https://demo-trunk.ofbiz.apache.org/catalog/control/EditProductInventoryItems?productId=GZ-2644=Y


Best regards,

Pierre Smits

*Apache Trafodion , Vice President*
*Apache Directory , PMC Member*
Apache Incubator , committer
*Apache OFBiz , contributor (without privileges)
since 2008*
Apache Steve , committer

On Fri, Sep 14, 2018 at 10:22 AM, Mohan R 
wrote:

> Dear Team
>
> I tried using the demo application but I am unable to find the critical
> inventory management feature.
>
> I used the below link
>
> https://demo-stable.ofbiz.apache.org/ordermgr/control/
> main?USERNAME=admin=ofbiz=Y <
> https://demo-stable.ofbiz.apache.org/ordermgr/control/
> main?USERNAME=admin=ofbiz=Y>
>
>
> Can you please help to get access to inventory module?
>
>
> Cheers!!!
> Mohan Ramaseshan
> Founder Director
> Leadge Business Services P Ltd
> CFO Services. Financial Strategy. Consulting
> M:+9198202 57139
> linkedin.com/in/mohan-ramaseshan-327722a  ramaseshan-327722a>
>




Re: Purchase order minimum and packing units

2018-09-04 Thread Frank Herrman
Hi Rishi,

Thank you for your reply. I see there are two fields: 'units included' and 
'order qty increments', should I use the latter in my case? It is not that we 
order 1 product which contain 6 products, but that we are required to purchase 
them per 6. So the costprice of the product is the price of 1 product, not a 
box of 6.

The minimum order quantity is set on the product level, but I want to set it on 
the supplier level.  Furthermore I would like to have a minimum order _amount_. 
I am not required to order a minimum number of one specific product from a 
supplier, but I do need to have a minimum order amount which can be spread over 
multiple products.

Kind regards,
 
Frank

Op 04-09-18 07:26 heeft Rishi Solanki  geschreven:

Hi Frank,
For packing units and minimum purchase please refer to SupplierProduct
entity fields minimumOrderQuantity and unitsIncluded. This modeling
supportive for purchasing from supplier. It works for all possible business
use cases including yours.
For sales minimum amount/quantity you may need to setup the ProductPrice
for that product of type MINIMUM_ORDER_PRICE. Once setup the customer won't
be able to purchase that product below that amount. On the basis of
requirement you can decide the price to match the minimum amout/quantity.

All this support OOTB available. HTH!

--
Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co


On Tue, Sep 4, 2018 at 1:10 AM Frank Herrman  wrote:

> Hi there,
>
> I am currently looking into the purchase orders within Ofbiz. I would like
> to define two things:
>
> Packing units
> Many products are packaged in boxes in sets of multiple items. The
> supplier delivers them per 6, we sell them per 1. Now there is an option
> per product per supplier to enter the minimum order quantity. This does 
not
> seem to ensure I will buy the product in this example per 6. I can also
> order 7 in that case. I want the system to let me only order 6, 12, 18 
etc.
> What is the best way to go there?
>
> Order minimum
> Many suppliers require me to place orders of a minimum amount and
> sometimes a minimum quantity (usually it’s amount). Where can I set this
> up? This is also something that does not seem to work well with the
> requirements module. Every order that makes my QoH go below my minimum
> quantity a requirement is created. I can make a purchase order out of it,
> but that will only contain that specific product. When I order with a
> supplier I want to be able to select from all the products he provides 
that
> are below the QoH, and not in separate purchase orders. Is this possible 
as
> well?
>
> Thank you in advance again.
>
> Kind regards,
>
> Frank
>
>




Purchase order minimum and packing units

2018-09-03 Thread Frank Herrman
Hi there,

I am currently looking into the purchase orders within Ofbiz. I would like to 
define two things:

Packing units
Many products are packaged in boxes in sets of multiple items. The supplier 
delivers them per 6, we sell them per 1. Now there is an option per product per 
supplier to enter the minimum order quantity. This does not seem to ensure I 
will buy the product in this example per 6. I can also order 7 in that case. I 
want the system to let me only order 6, 12, 18 etc. What is the best way to go 
there?

Order minimum
Many suppliers require me to place orders of a minimum amount and sometimes a 
minimum quantity (usually it’s amount). Where can I set this up? This is also 
something that does not seem to work well with the requirements module. Every 
order that makes my QoH go below my minimum quantity a requirement is created. 
I can make a purchase order out of it, but that will only contain that specific 
product. When I order with a supplier I want to be able to select from all the 
products he provides that are below the QoH, and not in separate purchase 
orders. Is this possible as well?

Thank you in advance again.

Kind regards,

Frank



Re: Webpos session timeout

2018-08-29 Thread Frank Herrman
It seems I got it to work somehow, but not in the right way. I installed ofbiz 
without the full demo data (which caused me many more issues, so I wouldn't 
recommend doing that...), in that case you need to manually create the 
terminals yourself in the database. That was not the issue though, I already 
did that. But if someone has this issue as well, make sure you have done that.

I did notice in the logs an error saying posTerminalId was empty. Where this 
happens I'm not sure, but therefore I altered the code 
(specialpurpose/webpos/src/main/java/org/apache/ofbiz/webpos/WebPosEvents.java).
 In getWebPosSession() I added a check if posTerminalId is not empty:

if(UtilValidate.isEmpty(posTerminalId)) {
posTerminalId = request.getParameter("posTerminalId");
}
This is still somehow acceptable. However, this did not resolve the exception I 
was experiencing. This was raised in the same file in the posLogin method. I 
simply added a try/catch there:

try {
GenericValue userLoginNew = 
(GenericValue)session.getAttribute("userLogin");
if (userLoginNew != null && 
UtilValidate.isNotEmpty(posTerminalId)) {
webPosSession.setUserLogin(userLoginNew);
}
} catch(Exception e) {

}

Which is a really nasty solution. I'm sharing this since I hope someone can 
tell me why I needed to add this code and if I can solve it in another way 
without messing around with the code. Since I don't want to leave this code in 
there if not necessary. Furthermore, after logging in I still need to manually 
go to /main , so the function does not seem to return 'success', so I'm not 
there yet.

Anyway, any advice would be appreciated. Thanks!

Best regards,
Frank

Op 10-08-18 11:55 heeft Frank Herrman  geschreven:

Hi there,



Haven't got much response to this issue, is this something only happening 
to me? It just feels the webpos is much too basic right now. Does anyone know 
the status of it?



Met vriendelijke groet / kind regards,

 

Frank Herrman

Solutions Architect

 

Typify B.V.

Regulusweg 11

2516 AC Den Haag

Tel.+31 70 780 11 55

Mob. +31 62 806 52 79

E-mailf.herr...@typify.com

Web   www.typify.com



Op 31-07-18 12:34 heeft Frank Herrman  geschreven:



Hi there,



Another question from me. It seems that on different environments we 
experience issues with the webpos component. We are not able to login because 
the session expires immideatly. If we remove the cookies we can get in, but in 
the next step we are being logged out again. We experience this behaviour in 
Chrome, Firefox and Safari on multiple computers. The exact error:





The Following Errors Occurred: Error calling event: 
org.apache.ofbiz.webapp.event.EventHandlerException: Problems processing event: 
java.lang.IllegalStateException: getAttribute: Session already invalidated 
(getAttribute: Session already invalidated)

Is there something we can do about this to prevent it from happening? 
Thanks again!



kind regards,



Frank










Re: Webpos session timeout

2018-08-10 Thread Frank Herrman
Hi there,



Haven't got much response to this issue, is this something only happening to 
me? It just feels the webpos is much too basic right now. Does anyone know the 
status of it?



Met vriendelijke groet / kind regards,

 

Frank Herrman

Solutions Architect

 

Typify B.V.

Regulusweg 11

2516 AC Den Haag

Tel.+31 70 780 11 55

Mob. +31 62 806 52 79

E-mailf.herr...@typify.com

Web   www.typify.com



Op 31-07-18 12:34 heeft Frank Herrman  geschreven:



Hi there,



Another question from me. It seems that on different environments we 
experience issues with the webpos component. We are not able to login because 
the session expires immideatly. If we remove the cookies we can get in, but in 
the next step we are being logged out again. We experience this behaviour in 
Chrome, Firefox and Safari on multiple computers. The exact error:





The Following Errors Occurred: Error calling event: 
org.apache.ofbiz.webapp.event.EventHandlerException: Problems processing event: 
java.lang.IllegalStateException: getAttribute: Session already invalidated 
(getAttribute: Session already invalidated)

Is there something we can do about this to prevent it from happening? 
Thanks again!



kind regards,



Frank








Re: Tax exemptions / price including tax

2018-07-31 Thread Frank Herrman
Hi Sharan,



Ok thanks, I have created the issue and linked back to this discussion for now:



https://issues.apache.org/jira/browse/OFBIZ-10500



kind regards,

 

Frank



Op 31-07-18 12:37 heeft Sharan Foga  geschreven:



(re-sending this message as my first response didn't get through again :-)



Hi Frank



I'm caught up with some other tasks at the moment so don't have time to 
respond fully. I think that the best next step would be to create a JIRA ticket 
on our issue tracker. You can add all the main details and examples from this 
discussion and also any attachments. This will help us understand the issue 
using some real data and fix it properly.




https://issues.apache.org/jira/projects/OFBIZ?selectedItem=com.atlassian.jira.jira-projects-plugin%3Asummary-page



We can continue the discussion in the ticket itself or on the dev mailing 
list if fixing it is going to have a significant impact.



Thanks

Sharan



On 2018/07/31 10:02:41, Frank Herrman  wrote: 

> In adition to my last e-mail I just found out that it still is not 
working as expected, even when I use prices excl. taxes. I dived into the code 
and found in applications/order/groovyScripts/entry/OrderReadHelper.java the 
function that gets the price on line 2401 (public static BigDecimal 
getOrderItemSubTotal(GenericValue orderItem, List adjustments, 
boolean forTax, boolean forShipping))

> 

> 

> 

> The first line gets the unit price from an order item 
(orderItem.getBigDecimal("unitPrice");), which always includes taxes. Now I 
believe the real issue is that it should store the price excl. taxes in the 
line item as well. But this affects probably a lot of sections of the system. 
To test it I tried to divide the unitPrice by 1.21 in that function. This did 
return the right price and right total, but the tax exempt was of course still 
calculated based on the price of 20 euro excl. taxes (which is 4.20 euros 
instead of 3.47 euros).

> 

> 

> 

> Anyway, maybe not the right discussion for the user list, but there 
really is something wrong here. It doesn't seem to be a configuration error.

> 

> 

> 

> Kind regards,

> 

>  

> 

> Frank

> 

> 

> 

> Op 30-07-18 11:35 heeft Frank Herrman  geschreven:

> 

> 

> 

> Hi Sharan & others,

> 

> 

> 

> 

> 

> 

> 

> I have set it up like this now:

> 

> 

> 

> 

> 

> 

> 

> * All product prices are connected to the Dutch tax authority, no tax 
rate set. Tax included = Y

> 

> 

> 

> * I have created 2 tax authorities for The Netherlands and Belgium, 
connected to the same party ('belastingdienst', dutch authority)

> 

> 

> 

> * The Dutch tax authority has the tax set up to 21% sales tax for 
both countries

> 

> 

> 

> * The Belgium customer is set up to have a tax exempt for BE and 
'belastingdienst'

> 

> 

> 

> 

> 

> 

> 

> When I look in the prices table of the database I see this:

> 

> 

> 

> https://ibb.co/kgf8R8 (don't know if images get stripped out, so just 
pasted a link)

> 

> 

> 

> 

> 

> 

> 

> This is correct for price without tax and the tax amount.

> 

> 

> 

> 

> 

> 

> 

> When I create an order within Ofbiz I still get this:

> 

> 

> 

> https://ibb.co/h77BeT 

> 

> 

> 

> 

> 

> 

> 

> Which is incorrect (tax exempt is correct, but the amount of 4.20 and 
the final price of 20 is not). It seems the system keeps using the 'price' 
column in the database instead of the calculated prices and adds tax to it. 
Other then that it seems the tax exempt functionality is working as expected 
now.

> 

> 

> 

> 

> 

> 

> 

> I just created a script that checks all prices if some of them are 
set to Tax included = Y. If that is the case it will set it to 'N' and set the 
price field to the price excl. VAT. It is not a nice solution, but this makes 
it easier to maintain and solves my issues for now.

> 

> 

> 

> 

> 

> 

> 

> Kind regards,

> 

> 

> 

>  

> 

> 

>

Webpos session timeout

2018-07-31 Thread Frank Herrman
Hi there,

Another question from me. It seems that on different environments we experience 
issues with the webpos component. We are not able to login because the session 
expires immideatly. If we remove the cookies we can get in, but in the next 
step we are being logged out again. We experience this behaviour in Chrome, 
Firefox and Safari on multiple computers. The exact error:


The Following Errors Occurred: Error calling event: 
org.apache.ofbiz.webapp.event.EventHandlerException: Problems processing event: 
java.lang.IllegalStateException: getAttribute: Session already invalidated 
(getAttribute: Session already invalidated)
Is there something we can do about this to prevent it from happening? Thanks 
again!

kind regards,

Frank



Re: Tax exemptions / price including tax

2018-07-31 Thread Frank Herrman
In adition to my last e-mail I just found out that it still is not working as 
expected, even when I use prices excl. taxes. I dived into the code and found 
in applications/order/groovyScripts/entry/OrderReadHelper.java the function 
that gets the price on line 2401 (public static BigDecimal 
getOrderItemSubTotal(GenericValue orderItem, List adjustments, 
boolean forTax, boolean forShipping))



The first line gets the unit price from an order item 
(orderItem.getBigDecimal("unitPrice");), which always includes taxes. Now I 
believe the real issue is that it should store the price excl. taxes in the 
line item as well. But this affects probably a lot of sections of the system. 
To test it I tried to divide the unitPrice by 1.21 in that function. This did 
return the right price and right total, but the tax exempt was of course still 
calculated based on the price of 20 euro excl. taxes (which is 4.20 euros 
instead of 3.47 euros).



Anyway, maybe not the right discussion for the user list, but there really is 
something wrong here. It doesn't seem to be a configuration error.



Kind regards,

 

Frank



Op 30-07-18 11:35 heeft Frank Herrman  geschreven:



Hi Sharan & others,







I have set it up like this now:







* All product prices are connected to the Dutch tax authority, no tax rate 
set. Tax included = Y



* I have created 2 tax authorities for The Netherlands and Belgium, 
connected to the same party ('belastingdienst', dutch authority)



* The Dutch tax authority has the tax set up to 21% sales tax for both 
countries



* The Belgium customer is set up to have a tax exempt for BE and 
'belastingdienst'







When I look in the prices table of the database I see this:



https://ibb.co/kgf8R8 (don't know if images get stripped out, so just 
pasted a link)







This is correct for price without tax and the tax amount.







When I create an order within Ofbiz I still get this:



https://ibb.co/h77BeT 







Which is incorrect (tax exempt is correct, but the amount of 4.20 and the 
final price of 20 is not). It seems the system keeps using the 'price' column 
in the database instead of the calculated prices and adds tax to it. Other then 
that it seems the tax exempt functionality is working as expected now.







I just created a script that checks all prices if some of them are set to 
Tax included = Y. If that is the case it will set it to 'N' and set the price 
field to the price excl. VAT. It is not a nice solution, but this makes it 
easier to maintain and solves my issues for now.







Kind regards,



 



Frank







Op 29-07-18 15:57 heeft Sharan Foga  geschreven:







Hi Frank







The options I gave were workarounds for if you needed to get something 
up and running quickly. I agree with you that long term we need to solve it 
properly. 







Analysis Needed



==



Why doesn't the include tax in price flag work properly for Tax 
authority setup?







From my perspective I also see two requirements (so happy to get your 
feedback and anyone else's too :-). 







Requirement 1:



=



Using your example as the use case - we need to be able to flag that a 
Belgian customer is liable for tax in the Netherlands. Note this applies in the 
case where it is B2C because the Belgian customer needs to pay Dutch tax. So 
for a Sales Order from a Belgian customer there needs to be line calculated for 
Dutch tax using the Dutch tax rate.







I think the nexus flag in the Tax Authority parties tab is supposed to 
be used for this but it's not working as such because in OFBiz now the tax 
calculation for the Sales Order is based on the customer delivery address. 







Requirement 2:



=



Again using your example as the use case - we need to be able to flag 
that a Belgian customer is exempt from being taxed by the Dutch Tax Authority. 
Note this applies in the case where it is B2B where the Belgian customer is a 
company/business.  So for a Sales Order from a Belgian customer there needs to 
be a line on the Sales order saying that the order is exempt from Dutch tax and 
the amount that has been exempted.







The exempt flag in the Tax Authority parties tab is supposed to be used 
for this but it's not working as such because in OFBiz now the tax calculation 
for the Sales Order is based on the customer delivery address.







Please feel free to comment or give me any feedback on any of these 
points.








Re: Tax exemptions / price including tax

2018-07-30 Thread Frank Herrman
Hi Sharan & others,



I have set it up like this now:



* All product prices are connected to the Dutch tax authority, no tax rate set. 
Tax included = Y

* I have created 2 tax authorities for The Netherlands and Belgium, connected 
to the same party ('belastingdienst', dutch authority)

* The Dutch tax authority has the tax set up to 21% sales tax for both countries

* The Belgium customer is set up to have a tax exempt for BE and 
'belastingdienst'



When I look in the prices table of the database I see this:

https://ibb.co/kgf8R8 (don't know if images get stripped out, so just pasted a 
link)



This is correct for price without tax and the tax amount.



When I create an order within Ofbiz I still get this:

https://ibb.co/h77BeT 



Which is incorrect (tax exempt is correct, but the amount of 4.20 and the final 
price of 20 is not). It seems the system keeps using the 'price' column in the 
database instead of the calculated prices and adds tax to it. Other then that 
it seems the tax exempt functionality is working as expected now.



I just created a script that checks all prices if some of them are set to Tax 
included = Y. If that is the case it will set it to 'N' and set the price field 
to the price excl. VAT. It is not a nice solution, but this makes it easier to 
maintain and solves my issues for now.



Kind regards,

 

Frank



Op 29-07-18 15:57 heeft Sharan Foga  geschreven:



Hi Frank



The options I gave were workarounds for if you needed to get something up 
and running quickly. I agree with you that long term we need to solve it 
properly. 



Analysis Needed

==

Why doesn't the include tax in price flag work properly for Tax authority 
setup?



From my perspective I also see two requirements (so happy to get your 
feedback and anyone else's too :-). 



Requirement 1:

=

Using your example as the use case - we need to be able to flag that a 
Belgian customer is liable for tax in the Netherlands. Note this applies in the 
case where it is B2C because the Belgian customer needs to pay Dutch tax. So 
for a Sales Order from a Belgian customer there needs to be line calculated for 
Dutch tax using the Dutch tax rate.



I think the nexus flag in the Tax Authority parties tab is supposed to be 
used for this but it's not working as such because in OFBiz now the tax 
calculation for the Sales Order is based on the customer delivery address. 



Requirement 2:

=

Again using your example as the use case - we need to be able to flag that 
a Belgian customer is exempt from being taxed by the Dutch Tax Authority. Note 
this applies in the case where it is B2B where the Belgian customer is a 
company/business.  So for a Sales Order from a Belgian customer there needs to 
be a line on the Sales order saying that the order is exempt from Dutch tax and 
the amount that has been exempted.



The exempt flag in the Tax Authority parties tab is supposed to be used for 
this but it's not working as such because in OFBiz now the tax calculation for 
the Sales Order is based on the customer delivery address.



Please feel free to comment or give me any feedback on any of these points.



Thanks

Sharan



On 2018/07/29 12:51:18, Frank Herrman  wrote: 

> Hi Sharan,

> 

> 

> 

> Thank you very much for your reply, this really helps me. The difficulty 
with entering prices excluding VAT for the store managers is that you want to 
have commercial sales prices. You rather sell your product for 9.95 euro's then 
for 10.13 euro's for example. So if you have to enter prices excluding VAT you 
need to keep your calculator with you. That is not very user-friendly.

> 

> 

> 

> Your second option, defining the tax authority for every product does 
sound like a good solution. I might create a script even to set it 
automatically if the store managers forget about it. From what you are saying 
(and I already was thinking) we don't really need the Belgium tax authority. We 
don't pay taxes in Belgium, just in the Netherlands. We should get the exempt 
working for the B2B customers on the Dutch authority.

> 

> 

> 

> I will be playing around and let you know what solution worked for us. I 
am also willing to provide input for Jira or even in code, just need to find my 
way around the standards first ;-). Thanks again.

> 

> 

> 

> Kind regards,

> 

>  

> 

> Frank

> 

> 

> 

> Op 27-07-18 16:18 heeft Sharan Foga  geschreven:

> 

> 

> 

> Hi Frank

> 

> 

> 

> There are a few things to cover here so I’ll answer what I can.

> 

> 

> 

> * Including VAT in Product Prices *

  

Re: Tax exemptions / price including tax

2018-07-29 Thread Frank Herrman
Hi Sharan,



Thank you very much for your reply, this really helps me. The difficulty with 
entering prices excluding VAT for the store managers is that you want to have 
commercial sales prices. You rather sell your product for 9.95 euro's then for 
10.13 euro's for example. So if you have to enter prices excluding VAT you need 
to keep your calculator with you. That is not very user-friendly.



Your second option, defining the tax authority for every product does sound 
like a good solution. I might create a script even to set it automatically if 
the store managers forget about it. From what you are saying (and I already was 
thinking) we don't really need the Belgium tax authority. We don't pay taxes in 
Belgium, just in the Netherlands. We should get the exempt working for the B2B 
customers on the Dutch authority.



I will be playing around and let you know what solution worked for us. I am 
also willing to provide input for Jira or even in code, just need to find my 
way around the standards first ;-). Thanks again.



Kind regards,

 

Frank



Op 27-07-18 16:18 heeft Sharan Foga  geschreven:



Hi Frank



There are a few things to cover here so I’ll answer what I can.



* Including VAT in Product Prices *



In general for Sales Orders - the tax setup and flow for OFBiz is mainly 
based on the US system where the product pricing does not include sales tax (or 
VAT). The Sales Tax (or VAT) is calculated once you have selected where the 
order will be shipped to. OFBiz uses the shipping address to define which Tax 
Authority to use to calculate the tax.



That being said there are some ways around it.



1.  You can setup your product pricing to exclude VAT. This means that it 
will be added back into the Sales Order when it is created. 



2. You can setup your product price inclusive of VAT then add the tax 
authority at the product pricing level (so in the Price tab for the actual 
Product). Add the Tax Authority, and set the include tax in the price. Don’t 
include a rate at this level because (OFBiz will ignore it!). The tax rate is 
taken from the main Tax Authority setup.



What this will do – is that it will assume that the tax is already included 
in the product price so at Sales Order entry it will separate it out. So if you 
set the product price at 100 Euros and have created the Dutch Tax Authority 
using 21%  then at Sales Order Review you should get an adjustment line showing 
the 17.36 Euros VAT. (Which is 21% VAT on 82.64, and 82.64+17.36 = 100)



What I found was missing was that it doesn’t add the VAT adjustment into 
the VAT Total as part of the Sales Oorder summary. The adjustment message 
actually says VAT not added to totals! (So that is a potential fix that needs 
to be done).



3. We can look for someone to volunteer to do some more analysis on why the 
include tax in price flag on the Tax Authorities are not working.



If you need to get up and running quickly then options 1 and 2 should help.



* Tax Exemptions *



This is interesting because OFBiz has some functionaliy that calculates tax 
exempt amounts based on the flags set for the customer in the Tax Authority 
Parties tab.  For Purchase Order it calculates and displays the exempt tax 
amounts– but for Sales Order it seems to be a bit different.



So what is happening with your setup is that you have created a Dutch Tax 
Authority and a Belgian Tax Authority, so when you create a Sales Order, OFBiz 
is looking at the delivery address and then using the Tax Authority linked to 
the delivery location to calculate the taxes. (I think Belgium has 21% VAT 
too!).  This means that if you have a Belgium customer, OFBiz ignores the Dutch 
Tax Authority and is using the Belgian one on your order. 



The quickest way to stop VAT being calculated on the Belgian customer order 
is to remove the Product Rate from the Belgian Tax Authority and setup the 
Product Pricing to not include VAT.

OFBiz will then simply use the Product Price and if it is already exclusive 
of VAT, it will be fine. (If it is inclusive of VAT then you will have to do a 
customisation  to adjust it).



I've included some responses to your questions below:



On 2018/07/24 08:38:48, Frank Herrman  wrote: 

> Hello there,

> 

> Currently I am trying to find a way to implement tax exemptions. I have 
found multiple discussions about this issue which is common in Europe. We want 
to sell from The Netherlands to Belgium. When we sell to other businesses there 
we do not have to charge the VAT (21%). This post brought me close:

> 

> 
http://ofbiz.135035.n4.nabble.com/German-store-with-vat-selling-to-europe-and-other-countries-without-Vat-tp4642750p4642752.html
 (especially the part after ‘secondly’), but it is still not working. While 
typing this e-mail I reproduced all my ste

Tax exemptions / price including tax

2018-07-24 Thread Frank Herrman
Hello there,

Currently I am trying to find a way to implement tax exemptions. I have found 
multiple discussions about this issue which is common in Europe. We want to 
sell from The Netherlands to Belgium. When we sell to other businesses there we 
do not have to charge the VAT (21%). This post brought me close:

http://ofbiz.135035.n4.nabble.com/German-store-with-vat-selling-to-europe-and-other-countries-without-Vat-tp4642750p4642752.html
 (especially the part after ‘secondly’), but it is still not working. While 
typing this e-mail I reproduced all my steps and even got a bit further ahead.

The things I did so far:


  *   I created two parties, the Dutch and Belgium tax authorities. I went to 
accounting->tax authorities to make them tax authorities within Ofbiz for the 
two beforementioned countries. I have set ‘require tax id for exemption’ to ‘N’ 
for testing purposes (want to make sure this is not the issue).
  *   In the product rates tab for the Dutch authority 
(/accounting/control/EditTaxAuthorityRateProducts?taxAuthPartyId=BELASTINGDIENST=NED)
 I have added Value Added Taxes of 21% for each of my stores.
  *   In the Parties tab (still of the Dutch tax authority) I connected the 
Belgium Party with ‘Is exempt’ set to ‘Y’.

Still no luck, it keeps charging 21% VAT when I create an order within Ofbiz.

Then I tried to connect the party to the Belgium tax authority and set ‘is 
exempt’ to ‘y’ as well. Now when I placed an order I got a really nice overview:
Adjustment: Sales Tax  Jurisdiction: Belgium [BEL] Rate: 21% Customer Tax ID: 
FODFINANCIEN Exempt Amount: 4.2

The grand total was still the original amount including VAT (20 euro’s in this 
case). It should have charged 16,53 euro while the exempt is 3,47 euro. So it 
seems to ignore the fact that the price includes VAT already. That seems to be 
the bigger issue.

So some things I don’t get:

  *   How come that it does something different when I connect the party to the 
Belgium tax authority (exempt=y) then to the Dutch authority (exempt=y)?
  *   In the product pricing I can set the tax authority, tax rate and if 
prices include VAT (set to Y of course). Do I need to set that if I set the VAT 
percentage in the Tax Authority? I tried adding and removing it, didn’t make 
any difference.
  *   How can I make sure prices are including taxes? I checked the store 
settings, but couldn’t find anything usefull there. The stores are connected to 
the Dutch tax authority. ‘Show prices with VAT tax included’ is set to ‘N’ but 
does not make any difference (seems to influence webshop only, but I’m not 
using Ofbiz for that). The only thing I’m not sure about is ‘Prorate Taxes’, I 
don’t know what it means since English is not my native language. Changing it 
did not make any difference though.
  *   The difference between sales taxes and VAT within Ofbiz. Somehow it is 
now showing my VAT tax rules as ‘sales tax’ where it was VAT before. I like 
sales tax better since it is also showing in the grand total (as it should), 
but still I’m not sure why it switched from VAT to Salex tax when I was messing 
around with the tax authorities.

Thank you for reading this far and hopefully someone can shed some light on the 
pricing/VAT system. It seems really powerfull, but I’m a bit lost.

Best regards,

Frank