This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 59e2a8e4fe0eb0fc57f409c0a60d73a6e983ac2d
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Fri Aug 26 19:28:21 2022 +0200

    Fixed: Tax calculation not considering productStoreGroup (OFBIZ-12686)
    
    For one product I have different prices according to the product store:
    B2C store: taxinPrice = Y
    B2B store: taxinPrice = N
    The tax calc service takes the most current price and ignores the product 
store.
    Therefore it may happen that SALES_TAX is calculated instead of VAT_TAX.
    
    Thanks: Ingo Wolfmayr for the initial patch
    
    Conflicts handled by hand in TaxAuthorityServices.java
---
 .../main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java
 
b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java
index abc0e64a1a..cbc12da540 100644
--- 
a/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java
+++ 
b/applications/accounting/src/main/java/org/apache/ofbiz/accounting/tax/TaxAuthorityServices.java
@@ -664,7 +664,7 @@ public class TaxAuthorityServices {
                         "taxAuthPartyId", taxAuthPartyId,
                         "taxAuthGeoId", taxAuthGeoId,
                         "productPricePurposeId", "PURCHASE",
-                        "productStoreGroupId", 
productStore.get("primaryStoreGroupId"))
+                        "productStoreId", 
productStore.get("primaryStoreGroupId"))
                 .orderBy("-fromDate").filterByDate().queryFirst();
     }
 

Reply via email to