You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Rajesh Mallah <ma...@gmail.com> on 2017/08/31 13:11:06 UTC

Re: setting up TAX in ofbiz [ SOLVED ]

Hi List  ,

At last I managed to get my setup pick up the prices specified  in non-USD
currency (i.e INR in my case) .

From what I could understand , the system attempts to get the the
value of "currency of handling" from multiple sources as currency attribute
itself can be specified at multiple places.

[ Source of above info:
./applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java
Lines: 80-567, Func: calculateProductPrice ]

If for whatever reasons  (or set of reasons) the currency could not
be determined

(1)  it attempts to get the value of property  'currency.uom.id.default' in
general resource/category ,
     (1.1)  if that also cannot be got it uses the hard coded default USD [
PriceServices.java:148 ]

 142         String currencyDefaultUomId = (String)
context.get("currencyUomId");
 143         String currencyUomIdTo = (String)
context.get("currencyUomIdTo");
 144         if (UtilValidate.isEmpty(currencyDefaultUomId)) {
 145             if (productStore != null &&
UtilValidate.isNotEmpty(productStore.getString("defaultCurrencyUomId"))) {
 146                 currencyDefaultUomId =
productStore.getString("defaultCurrencyUomId");
 147             } else {
 148                 currencyDefaultUomId =
EntityUtilProperties.getPropertyValue("general", "currency.uom.id.default",
"USD", delegator);
 149             }
 150         }


The reason why it took so long to track it down  is that
the system property 'currency.uom.id.default'  itself can be specified
in 2 places:

(1) ./framework/common/config/general.properties
(2) ./framework/common/data/CommonSystemPropertyData.xml

and the entity table (RDBMS) is : SYSTEM_PROPERTY
which seems to be  loaded from (2) only and not (1)
( at least for the property currency.uom.id.default )

I had been making changes to (1) and expecting the system to
use it. However the system uses the table SYSTEM_PROPERTY
that seems to be getting loaded only from (2).


Although i have marked this thread as solved , I am yet to analyze
why at all the flow control reached to the stage of last resort for
determining the handling currency from system property
currency.uom.id.default

It should have been determined much earlier through information provided
end user using WEB-UI controls.


I would update this thread at a later time when i am able to investigate
that.

regds
mallah.



On Thu, Aug 31, 2017 at 11:39 AM, Rajesh Mallah <ma...@gmail.com>
wrote:

>
>
> I wonder why a query on a table should be run looking for
> rows where the primary key of table is null.
>
> the sole filter on the below query on ProductStore  is:
> WHERE ((PRODUCT_STORE_ID IS NULL))
>
> Note: this query is just run *before* looking in the ProductPrice
> table.
>
> more context here: https://pastebin.com/raw/sSh1sNWb
>
> BTW: what is the way of altering logging config in OfBiz
>            to include Filenames and Line number?
>
> regds
> mallah.
>
>
>
>
> 2017-08-31 10:45:18,180 |http-nio-8080-exec-5
> |GenericDAO                    |T| Ran query in 3 milli-seconds:
> EntityName: ProductStore Sql: SELECT PRODUCT_STORE_ID,
> PRIMARY_STORE_GROUP_ID, STORE_NAME, COMPANY_NAME, TITLE, SUBTITLE,
> PAY_TO_PARTY_ID, DAYS_TO_CANCEL_NON_PAY, MANUAL_AUTH_IS_CAPTURE,
> PRORATE_SHIPPING, PRORATE_TAXES, VIEW_CART_ON_ADD, AUTO_SAVE_CART,
> AUTO_APPROVE_REVIEWS, IS_DEMO_STORE, IS_IMMEDIATELY_FULFILLED,
> INVENTORY_FACILITY_ID, ONE_INVENTORY_FACILITY, CHECK_INVENTORY,
> RESERVE_INVENTORY, RESERVE_ORDER_ENUM_ID, REQUIRE_INVENTORY,
> BALANCE_RES_ON_ORDER_CREATION, REQUIREMENT_METHOD_ENUM_ID,
> ORDER_NUMBER_PREFIX, DEFAULT_LOCALE_STRING, DEFAULT_CURRENCY_UOM_ID,
> DEFAULT_TIME_ZONE_STRING, DEFAULT_SALES_CHANNEL_ENUM_ID, ALLOW_PASSWORD,
> DEFAULT_PASSWORD, EXPLODE_ORDER_ITEMS, CHECK_GC_BALANCE,
> RETRY_FAILED_AUTHS, HEADER_APPROVED_STATUS, ITEM_APPROVED_STATUS,
> DIGITAL_ITEM_APPROVED_STATUS, HEADER_DECLINED_STATUS, ITEM_DECLINED_STATUS,
> HEADER_CANCEL_STATUS, ITEM_CANCEL_STATUS, AUTH_DECLINED_MESSAGE,
> AUTH_FRAUD_MESSAGE, AUTH_ERROR_MESSAGE, VISUAL_THEME_ID,
> STORE_CREDIT_ACCOUNT_ENUM_ID, USE_PRIMARY_EMAIL_USERNAME,
> REQUIRE_CUSTOMER_ROLE, AUTO_INVOICE_DIGITAL_ITEMS,
> REQ_SHIP_ADDR_FOR_DIG_ITEMS, SHOW_CHECKOUT_GIFT_OPTIONS,
> SELECT_PAYMENT_TYPE_PER_ITEM, SHOW_PRICES_WITH_VAT_TAX, SHOW_TAX_IS_EXEMPT,
> VAT_TAX_AUTH_GEO_ID, VAT_TAX_AUTH_PARTY_ID, ENABLE_AUTO_SUGGESTION_LIST,
> ENABLE_DIG_PROD_UPLOAD, PROD_SEARCH_EXCLUDE_VARIANTS,
> DIG_PROD_UPLOAD_CATEGORY_ID, AUTO_ORDER_CC_TRY_EXP,
> AUTO_ORDER_CC_TRY_OTHER_CARDS, AUTO_ORDER_CC_TRY_LATER_NSF,
> AUTO_ORDER_CC_TRY_LATER_MAX, STORE_CREDIT_VALID_DAYS, AUTO_APPROVE_INVOICE,
> AUTO_APPROVE_ORDER, SHIP_IF_CAPTURE_FAILS, SET_OWNER_UPON_ISSUANCE,
> REQ_RETURN_INVENTORY_RECEIVE, ADD_TO_CART_REMOVE_INCOMPAT,
> ADD_TO_CART_REPLACE_UPSELL, SPLIT_PAY_PREF_PER_SHP_GRP, MANAGED_BY_LOT,
> SHOW_OUT_OF_STOCK_PRODUCTS, ORDER_DECIMAL_QUANTITY, ALLOW_COMMENT,
> STYLE_SHEET, HEADER_LOGO, HEADER_MIDDLE_BACKGROUND,
> HEADER_RIGHT_BACKGROUND, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP,
> CREATED_STAMP, CREATED_TX_STAMP FROM ofbiz.PRODUCT_STORE WHERE
> ((PRODUCT_STORE_ID IS NULL)) where clause:[]
>
>
>
> On Thu, Aug 31, 2017 at 11:23 AM, Rajesh Mallah <ma...@gmail.com>
> wrote:
>
>> Hi Arun ,
>>
>> I checked PartyAcctgPreference which was USD and changed it to INR
>> yesterday only. After changes i do logout and login and restart the tomcat
>> to ensure there are no caching issues.
>>
>>
>> ofbiz_redgrape=>  SELECT PTYACCPREF.PARTY_ID,
>> PTYACCPREF.BASE_CURRENCY_UOM_ID, PTYGROUP.GROUP_NAME,
>> PTYROLE.ROLE_TYPE_ID FROM (ofbiz.PARTY_ACCTG_PREFERENCE PTYACCPREF INNER
>> JOIN ofbiz.PARTY_GROUP PTYGROUP ON PTYACCPREF.PARTY_ID = PTYGROUP.PARTY_ID)
>> INNER JOIN ofbiz.PARTY_ROLE PTYROLE ON PTYACCPREF.PARTY_ID =
>> PTYROLE.PARTY_ID WHERE (((PTYROLE.ROLE_TYPE_ID = 'INTERNAL_ORGANIZATIO')));
>>
>> -[ RECORD 1 ]--------+----------------------------------
>> party_id             | Company
>> base_currency_uom_id | INR
>> group_name           | REDGRAPE TECHNOLOGIES PRIVATE LTD
>> role_type_id         | INTERNAL_ORGANIZATIO
>>
>>
>>
>> The relevant field ProductStore is also INR
>>
>> https://pastebin.com/raw/mM2j6kiE
>>
>> ......
>>
>> requirement_method_enum_id    |
>> order_number_prefix           |
>> default_locale_string         | en_US
>> default_currency_uom_id       | INR
>> default_time_zone_string      | Asia/Kolkata
>> default_sales_channel_enum_id |
>> allow_password                | Y
>>
>> .........
>>
>> regds
>> mallah.
>>
>>
>> On Thu, Aug 31, 2017 at 11:05 AM, Arun Patidar <
>> arun.patidar@hotwaxsystems.com> wrote:
>>
>>> Hello Rajesh,
>>>
>>> ProductStore and PartyAcctgPreference entities also have fields to store
>>> currency UOM.
>>>
>>> --
>>> Thanks & Regards
>>> ---
>>> Arun Patidar
>>> Manager, Enterprise Software Development
>>>
>>> HotWax Systems Pvt Ltd.
>>>
>>> www.hotwaxsystems.com
>>>
>>>
>>> On Thu, Aug 31, 2017 at 9:17 AM, Rajesh Mallah <ma...@gmail.com>
>>> wrote:
>>>
>>> > looks like too many messages has already been
>>> > exchanged in past  at various point in time.
>>> >
>>> > http://ofbiz.markmail.org/search/?q=changing+default+
>>> > currency#query:changing%20default%20currency
>>> >
>>> > it will be beneficial to new users  if it is given attention .
>>> >
>>> > regds
>>> > mallah.
>>> >
>>> >
>>> > On Thu, Aug 31, 2017 at 8:01 AM, Rajesh Mallah <
>>> mallah.rajesh@gmail.com>
>>> > wrote:
>>> >
>>> > >
>>> > >
>>> > >
>>> > > @Deepak , @Rishi  / List ,
>>> > >
>>> > > Additional SQL tracing reveals that the ProductPricing
>>> > > entities are being queried with  CURRENCY_UOM_ID=USD
>>> > > and hence the USD pricing is being picked up. I am not sure
>>> > > why USD currency is being picked. I have changed in almost
>>> > > all places including properties file.
>>> > >
>>> > > -- ./framework/common/config/general.properties
>>> > >
>>> > > # -- unique instance id (20 char max)
>>> > > unique.instanceId=ofbiz1
>>> > > # -- the default currency to use for prices, etc
>>> > > currency.uom.id.default=INR
>>> > > # These values override the _NA_ DEFAULT values in user preferences
>>> for
>>> > > the GLOBAL_PREFERENCES userPrefGroupTypeId
>>> > > # -- the default organizationPartyId for used in dropdowns and
>>> reports
>>> > >
>>> > >
>>> > > 2017-08-31 07:52:15,412 |http-nio-8080-exec-9 |GenericDAO
>>> > > |T| Ran query in 1 milli-seconds:  EntityName: ProductPrice
>>> > > Sql: SELECT PRODUCT_ID, PRODUCT_PRICE_TYPE_ID,
>>> PRODUCT_PRICE_PURPOSE_ID,
>>> > >  CURRENCY_UOM_ID, PRODUCT_STORE_GROUP_ID, FROM_DATE, THRU_DATE,
>>> PRICE,
>>> > > TERM_UOM_ID, CUSTOM_PRICE_CALC_SERVICE, PRICE_WITHOUT_TAX,
>>> > PRICE_WITH_TAX,
>>> > > TAX_AMOUNT, TAX_PERCENTAGE, TAX_AUTH_PARTY_ID, TAX_AUTH_GEO_ID,
>>> > TAX_IN_PRICE,
>>> > >  CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE,
>>> > > LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP,
>>> LAST_UPDATED_TX_STAMP,
>>> > > CREATED_STAMP, CREATED_TX_STAMP FROM ofbiz.PRODUCT_PRICE WHERE
>>> > > ((PRODUCT_ID = ? AND (PRODUCT_PRICE_PURPOSE_ID = ? OR
>>> > PRODUCT_PRICE_PURPOSE_ID IS NULL)
>>> > >  AND CURRENCY_UOM_ID = ? AND PRODUCT_STORE_GROUP_ID = ?))
>>> > > ORDER BY FROM_DATE DESC
>>> > >
>>> > >  where clause:[PRODUCT_ID=10000, PRODUCT_PRICE_PURPOSE_ID=PURCHASE,
>>> > > CURRENCY_UOM_ID=USD,PRODUCT_STORE_GROUP_ID=_NA_]
>>> > >
>>> > > Full Log:
>>> > > https://pastebin.com/raw/smdQX84B
>>> > >
>>> > >
>>> > > Looking forward to further comments and
>>> > >  guidance.
>>> > >
>>> > > ​regds
>>> > > mallah.
>>> > >
>>> >
>>>
>>
>>
>

Re: setting up TAX in ofbiz [ SOLVED ]

Posted by Arun Patidar <ar...@hotwaxsystems.com>.
Hi Rajesh,

Both ways are alternative to each other and not auto linked. You may need
to use either file system configuration or SystemProperty data
configuration. Usually, data configuration is essential with multi tenancy
environment.



-- 
Thanks & Regards
---
Arun Patidar
Manager, Enterprise Software Development

HotWax Systems Pvt Ltd.

www.hotwaxsystems.com


On Thu, Aug 31, 2017 at 8:07 PM, Rajesh Mallah <ma...@gmail.com>
wrote:

> Dear Arun ,
>
> Thanks for clarifying that .
>
> (1) I observed that when I changed the file system configuration
> settings the restarted the server the value in SystemProperty
> remained the same. I am not sure if this is the expected behaviour.
>
> In My setup  I use a  remote postgresql server .
>
> I verified (1) just now.
>
> regds
> mallah.
>
>
>
>
>
>
> On Thu, Aug 31, 2017 at 7:46 PM, Arun Patidar <
> arun.patidar@hotwaxsystems.com> wrote:
>
> > Hi Rajesh,
> >
> > SystemProperty entity is used to override file system configuration
> > settings. This also gives flexibility of changing values on runtime
> without
> > restart. System, first checks in the database and then go to file system
> if
> > value not found.
> >
> >
> > --
> > Thanks & Regards
> > ---
> > Arun Patidar
> > Manager, Enterprise Software Development
> >
> > HotWax Systems Pvt Ltd.
> >
> > www.hotwaxsystems.com
> >
> >
> > On Thu, Aug 31, 2017 at 6:41 PM, Rajesh Mallah <ma...@gmail.com>
> > wrote:
> >
> > > Hi List  ,
> > >
> > > At last I managed to get my setup pick up the prices specified  in
> > non-USD
> > > currency (i.e INR in my case) .
> > >
> > > From what I could understand , the system attempts to get the the
> > > value of "currency of handling" from multiple sources as currency
> > attribute
> > > itself can be specified at multiple places.
> > >
> > > [ Source of above info:
> > > ./applications/product/src/main/java/org/apache/ofbiz/
> > > product/price/PriceServices.java
> > > Lines: 80-567, Func: calculateProductPrice ]
> > >
> > > If for whatever reasons  (or set of reasons) the currency could not
> > > be determined
> > >
> > > (1)  it attempts to get the value of property
> 'currency.uom.id.default'
> > in
> > > general resource/category ,
> > >      (1.1)  if that also cannot be got it uses the hard coded default
> > USD [
> > > PriceServices.java:148 ]
> > >
> > >  142         String currencyDefaultUomId = (String)
> > > context.get("currencyUomId");
> > >  143         String currencyUomIdTo = (String)
> > > context.get("currencyUomIdTo");
> > >  144         if (UtilValidate.isEmpty(currencyDefaultUomId)) {
> > >  145             if (productStore != null &&
> > > UtilValidate.isNotEmpty(productStore.getString("
> defaultCurrencyUomId")))
> > {
> > >  146                 currencyDefaultUomId =
> > > productStore.getString("defaultCurrencyUomId");
> > >  147             } else {
> > >  148                 currencyDefaultUomId =
> > > EntityUtilProperties.getPropertyValue("general",
> > > "currency.uom.id.default",
> > > "USD", delegator);
> > >  149             }
> > >  150         }
> > >
> > >
> > > The reason why it took so long to track it down  is that
> > > the system property 'currency.uom.id.default'  itself can be specified
> > > in 2 places:
> > >
> > > (1) ./framework/common/config/general.properties
> > > (2) ./framework/common/data/CommonSystemPropertyData.xml
> > >
> > > and the entity table (RDBMS) is : SYSTEM_PROPERTY
> > > which seems to be  loaded from (2) only and not (1)
> > > ( at least for the property currency.uom.id.default )
> > >
> > > I had been making changes to (1) and expecting the system to
> > > use it. However the system uses the table SYSTEM_PROPERTY
> > > that seems to be getting loaded only from (2).
> > >
> > >
> > > Although i have marked this thread as solved , I am yet to analyze
> > > why at all the flow control reached to the stage of last resort for
> > > determining the handling currency from system property
> > > currency.uom.id.default
> > >
> > > It should have been determined much earlier through information
> provided
> > > end user using WEB-UI controls.
> > >
> > >
> > > I would update this thread at a later time when i am able to
> investigate
> > > that.
> > >
> > > regds
> > > mallah.
> > >
> > >
> > >
> > > On Thu, Aug 31, 2017 at 11:39 AM, Rajesh Mallah <
> mallah.rajesh@gmail.com
> > >
> > > wrote:
> > >
> > > >
> > > >
> > > > I wonder why a query on a table should be run looking for
> > > > rows where the primary key of table is null.
> > > >
> > > > the sole filter on the below query on ProductStore  is:
> > > > WHERE ((PRODUCT_STORE_ID IS NULL))
> > > >
> > > > Note: this query is just run *before* looking in the ProductPrice
> > > > table.
> > > >
> > > > more context here: https://pastebin.com/raw/sSh1sNWb
> > > >
> > > > BTW: what is the way of altering logging config in OfBiz
> > > >            to include Filenames and Line number?
> > > >
> > > > regds
> > > > mallah.
> > > >
> > > >
> > > >
> > > >
> > > > 2017-08-31 10:45:18,180 |http-nio-8080-exec-5
> > > > |GenericDAO                    |T| Ran query in 3 milli-seconds:
> > > > EntityName: ProductStore Sql: SELECT PRODUCT_STORE_ID,
> > > > PRIMARY_STORE_GROUP_ID, STORE_NAME, COMPANY_NAME, TITLE, SUBTITLE,
> > > > PAY_TO_PARTY_ID, DAYS_TO_CANCEL_NON_PAY, MANUAL_AUTH_IS_CAPTURE,
> > > > PRORATE_SHIPPING, PRORATE_TAXES, VIEW_CART_ON_ADD, AUTO_SAVE_CART,
> > > > AUTO_APPROVE_REVIEWS, IS_DEMO_STORE, IS_IMMEDIATELY_FULFILLED,
> > > > INVENTORY_FACILITY_ID, ONE_INVENTORY_FACILITY, CHECK_INVENTORY,
> > > > RESERVE_INVENTORY, RESERVE_ORDER_ENUM_ID, REQUIRE_INVENTORY,
> > > > BALANCE_RES_ON_ORDER_CREATION, REQUIREMENT_METHOD_ENUM_ID,
> > > > ORDER_NUMBER_PREFIX, DEFAULT_LOCALE_STRING, DEFAULT_CURRENCY_UOM_ID,
> > > > DEFAULT_TIME_ZONE_STRING, DEFAULT_SALES_CHANNEL_ENUM_ID,
> > ALLOW_PASSWORD,
> > > > DEFAULT_PASSWORD, EXPLODE_ORDER_ITEMS, CHECK_GC_BALANCE,
> > > > RETRY_FAILED_AUTHS, HEADER_APPROVED_STATUS, ITEM_APPROVED_STATUS,
> > > > DIGITAL_ITEM_APPROVED_STATUS, HEADER_DECLINED_STATUS,
> > > ITEM_DECLINED_STATUS,
> > > > HEADER_CANCEL_STATUS, ITEM_CANCEL_STATUS, AUTH_DECLINED_MESSAGE,
> > > > AUTH_FRAUD_MESSAGE, AUTH_ERROR_MESSAGE, VISUAL_THEME_ID,
> > > > STORE_CREDIT_ACCOUNT_ENUM_ID, USE_PRIMARY_EMAIL_USERNAME,
> > > > REQUIRE_CUSTOMER_ROLE, AUTO_INVOICE_DIGITAL_ITEMS,
> > > > REQ_SHIP_ADDR_FOR_DIG_ITEMS, SHOW_CHECKOUT_GIFT_OPTIONS,
> > > > SELECT_PAYMENT_TYPE_PER_ITEM, SHOW_PRICES_WITH_VAT_TAX,
> > > SHOW_TAX_IS_EXEMPT,
> > > > VAT_TAX_AUTH_GEO_ID, VAT_TAX_AUTH_PARTY_ID,
> > ENABLE_AUTO_SUGGESTION_LIST,
> > > > ENABLE_DIG_PROD_UPLOAD, PROD_SEARCH_EXCLUDE_VARIANTS,
> > > > DIG_PROD_UPLOAD_CATEGORY_ID, AUTO_ORDER_CC_TRY_EXP,
> > > > AUTO_ORDER_CC_TRY_OTHER_CARDS, AUTO_ORDER_CC_TRY_LATER_NSF,
> > > > AUTO_ORDER_CC_TRY_LATER_MAX, STORE_CREDIT_VALID_DAYS,
> > > AUTO_APPROVE_INVOICE,
> > > > AUTO_APPROVE_ORDER, SHIP_IF_CAPTURE_FAILS, SET_OWNER_UPON_ISSUANCE,
> > > > REQ_RETURN_INVENTORY_RECEIVE, ADD_TO_CART_REMOVE_INCOMPAT,
> > > > ADD_TO_CART_REPLACE_UPSELL, SPLIT_PAY_PREF_PER_SHP_GRP,
> MANAGED_BY_LOT,
> > > > SHOW_OUT_OF_STOCK_PRODUCTS, ORDER_DECIMAL_QUANTITY, ALLOW_COMMENT,
> > > > STYLE_SHEET, HEADER_LOGO, HEADER_MIDDLE_BACKGROUND,
> > > > HEADER_RIGHT_BACKGROUND, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP,
> > > > CREATED_STAMP, CREATED_TX_STAMP FROM ofbiz.PRODUCT_STORE WHERE
> > > > ((PRODUCT_STORE_ID IS NULL)) where clause:[]
> > > >
> > > >
> > > >
> > > > On Thu, Aug 31, 2017 at 11:23 AM, Rajesh Mallah <
> > mallah.rajesh@gmail.com
> > > >
> > > > wrote:
> > > >
> > > >> Hi Arun ,
> > > >>
> > > >> I checked PartyAcctgPreference which was USD and changed it to INR
> > > >> yesterday only. After changes i do logout and login and restart the
> > > tomcat
> > > >> to ensure there are no caching issues.
> > > >>
> > > >>
> > > >> ofbiz_redgrape=>  SELECT PTYACCPREF.PARTY_ID,
> > > >> PTYACCPREF.BASE_CURRENCY_UOM_ID, PTYGROUP.GROUP_NAME,
> > > >> PTYROLE.ROLE_TYPE_ID FROM (ofbiz.PARTY_ACCTG_PREFERENCE PTYACCPREF
> > INNER
> > > >> JOIN ofbiz.PARTY_GROUP PTYGROUP ON PTYACCPREF.PARTY_ID =
> > > PTYGROUP.PARTY_ID)
> > > >> INNER JOIN ofbiz.PARTY_ROLE PTYROLE ON PTYACCPREF.PARTY_ID =
> > > >> PTYROLE.PARTY_ID WHERE (((PTYROLE.ROLE_TYPE_ID =
> > > 'INTERNAL_ORGANIZATIO')));
> > > >>
> > > >> -[ RECORD 1 ]--------+----------------------------------
> > > >> party_id             | Company
> > > >> base_currency_uom_id | INR
> > > >> group_name           | REDGRAPE TECHNOLOGIES PRIVATE LTD
> > > >> role_type_id         | INTERNAL_ORGANIZATIO
> > > >>
> > > >>
> > > >>
> > > >> The relevant field ProductStore is also INR
> > > >>
> > > >> https://pastebin.com/raw/mM2j6kiE
> > > >>
> > > >> ......
> > > >>
> > > >> requirement_method_enum_id    |
> > > >> order_number_prefix           |
> > > >> default_locale_string         | en_US
> > > >> default_currency_uom_id       | INR
> > > >> default_time_zone_string      | Asia/Kolkata
> > > >> default_sales_channel_enum_id |
> > > >> allow_password                | Y
> > > >>
> > > >> .........
> > > >>
> > > >> regds
> > > >> mallah.
> > > >>
> > > >>
> > > >> On Thu, Aug 31, 2017 at 11:05 AM, Arun Patidar <
> > > >> arun.patidar@hotwaxsystems.com> wrote:
> > > >>
> > > >>> Hello Rajesh,
> > > >>>
> > > >>> ProductStore and PartyAcctgPreference entities also have fields to
> > > store
> > > >>> currency UOM.
> > > >>>
> > > >>> --
> > > >>> Thanks & Regards
> > > >>> ---
> > > >>> Arun Patidar
> > > >>> Manager, Enterprise Software Development
> > > >>>
> > > >>> HotWax Systems Pvt Ltd.
> > > >>>
> > > >>> www.hotwaxsystems.com
> > > >>>
> > > >>>
> > > >>> On Thu, Aug 31, 2017 at 9:17 AM, Rajesh Mallah <
> > > mallah.rajesh@gmail.com>
> > > >>> wrote:
> > > >>>
> > > >>> > looks like too many messages has already been
> > > >>> > exchanged in past  at various point in time.
> > > >>> >
> > > >>> > http://ofbiz.markmail.org/search/?q=changing+default+
> > > >>> > currency#query:changing%20default%20currency
> > > >>> >
> > > >>> > it will be beneficial to new users  if it is given attention .
> > > >>> >
> > > >>> > regds
> > > >>> > mallah.
> > > >>> >
> > > >>> >
> > > >>> > On Thu, Aug 31, 2017 at 8:01 AM, Rajesh Mallah <
> > > >>> mallah.rajesh@gmail.com>
> > > >>> > wrote:
> > > >>> >
> > > >>> > >
> > > >>> > >
> > > >>> > >
> > > >>> > > @Deepak , @Rishi  / List ,
> > > >>> > >
> > > >>> > > Additional SQL tracing reveals that the ProductPricing
> > > >>> > > entities are being queried with  CURRENCY_UOM_ID=USD
> > > >>> > > and hence the USD pricing is being picked up. I am not sure
> > > >>> > > why USD currency is being picked. I have changed in almost
> > > >>> > > all places including properties file.
> > > >>> > >
> > > >>> > > -- ./framework/common/config/general.properties
> > > >>> > >
> > > >>> > > # -- unique instance id (20 char max)
> > > >>> > > unique.instanceId=ofbiz1
> > > >>> > > # -- the default currency to use for prices, etc
> > > >>> > > currency.uom.id.default=INR
> > > >>> > > # These values override the _NA_ DEFAULT values in user
> > preferences
> > > >>> for
> > > >>> > > the GLOBAL_PREFERENCES userPrefGroupTypeId
> > > >>> > > # -- the default organizationPartyId for used in dropdowns and
> > > >>> reports
> > > >>> > >
> > > >>> > >
> > > >>> > > 2017-08-31 07:52:15,412 |http-nio-8080-exec-9 |GenericDAO
> > > >>> > > |T| Ran query in 1 milli-seconds:  EntityName: ProductPrice
> > > >>> > > Sql: SELECT PRODUCT_ID, PRODUCT_PRICE_TYPE_ID,
> > > >>> PRODUCT_PRICE_PURPOSE_ID,
> > > >>> > >  CURRENCY_UOM_ID, PRODUCT_STORE_GROUP_ID, FROM_DATE, THRU_DATE,
> > > >>> PRICE,
> > > >>> > > TERM_UOM_ID, CUSTOM_PRICE_CALC_SERVICE, PRICE_WITHOUT_TAX,
> > > >>> > PRICE_WITH_TAX,
> > > >>> > > TAX_AMOUNT, TAX_PERCENTAGE, TAX_AUTH_PARTY_ID, TAX_AUTH_GEO_ID,
> > > >>> > TAX_IN_PRICE,
> > > >>> > >  CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE,
> > > >>> > > LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP,
> > > >>> LAST_UPDATED_TX_STAMP,
> > > >>> > > CREATED_STAMP, CREATED_TX_STAMP FROM ofbiz.PRODUCT_PRICE WHERE
> > > >>> > > ((PRODUCT_ID = ? AND (PRODUCT_PRICE_PURPOSE_ID = ? OR
> > > >>> > PRODUCT_PRICE_PURPOSE_ID IS NULL)
> > > >>> > >  AND CURRENCY_UOM_ID = ? AND PRODUCT_STORE_GROUP_ID = ?))
> > > >>> > > ORDER BY FROM_DATE DESC
> > > >>> > >
> > > >>> > >  where clause:[PRODUCT_ID=10000, PRODUCT_PRICE_PURPOSE_ID=
> > > PURCHASE,
> > > >>> > > CURRENCY_UOM_ID=USD,PRODUCT_STORE_GROUP_ID=_NA_]
> > > >>> > >
> > > >>> > > Full Log:
> > > >>> > > https://pastebin.com/raw/smdQX84B
> > > >>> > >
> > > >>> > >
> > > >>> > > Looking forward to further comments and
> > > >>> > >  guidance.
> > > >>> > >
> > > >>> > > ​regds
> > > >>> > > mallah.
> > > >>> > >
> > > >>> >
> > > >>>
> > > >>
> > > >>
> > > >
> > >
> >
>

Re: setting up TAX in ofbiz [ SOLVED ]

Posted by Rajesh Mallah <ma...@gmail.com>.
Dear Arun ,

Thanks for clarifying that .

(1) I observed that when I changed the file system configuration
settings the restarted the server the value in SystemProperty
remained the same. I am not sure if this is the expected behaviour.

In My setup  I use a  remote postgresql server .

I verified (1) just now.

regds
mallah.






On Thu, Aug 31, 2017 at 7:46 PM, Arun Patidar <
arun.patidar@hotwaxsystems.com> wrote:

> Hi Rajesh,
>
> SystemProperty entity is used to override file system configuration
> settings. This also gives flexibility of changing values on runtime without
> restart. System, first checks in the database and then go to file system if
> value not found.
>
>
> --
> Thanks & Regards
> ---
> Arun Patidar
> Manager, Enterprise Software Development
>
> HotWax Systems Pvt Ltd.
>
> www.hotwaxsystems.com
>
>
> On Thu, Aug 31, 2017 at 6:41 PM, Rajesh Mallah <ma...@gmail.com>
> wrote:
>
> > Hi List  ,
> >
> > At last I managed to get my setup pick up the prices specified  in
> non-USD
> > currency (i.e INR in my case) .
> >
> > From what I could understand , the system attempts to get the the
> > value of "currency of handling" from multiple sources as currency
> attribute
> > itself can be specified at multiple places.
> >
> > [ Source of above info:
> > ./applications/product/src/main/java/org/apache/ofbiz/
> > product/price/PriceServices.java
> > Lines: 80-567, Func: calculateProductPrice ]
> >
> > If for whatever reasons  (or set of reasons) the currency could not
> > be determined
> >
> > (1)  it attempts to get the value of property  'currency.uom.id.default'
> in
> > general resource/category ,
> >      (1.1)  if that also cannot be got it uses the hard coded default
> USD [
> > PriceServices.java:148 ]
> >
> >  142         String currencyDefaultUomId = (String)
> > context.get("currencyUomId");
> >  143         String currencyUomIdTo = (String)
> > context.get("currencyUomIdTo");
> >  144         if (UtilValidate.isEmpty(currencyDefaultUomId)) {
> >  145             if (productStore != null &&
> > UtilValidate.isNotEmpty(productStore.getString("defaultCurrencyUomId")))
> {
> >  146                 currencyDefaultUomId =
> > productStore.getString("defaultCurrencyUomId");
> >  147             } else {
> >  148                 currencyDefaultUomId =
> > EntityUtilProperties.getPropertyValue("general",
> > "currency.uom.id.default",
> > "USD", delegator);
> >  149             }
> >  150         }
> >
> >
> > The reason why it took so long to track it down  is that
> > the system property 'currency.uom.id.default'  itself can be specified
> > in 2 places:
> >
> > (1) ./framework/common/config/general.properties
> > (2) ./framework/common/data/CommonSystemPropertyData.xml
> >
> > and the entity table (RDBMS) is : SYSTEM_PROPERTY
> > which seems to be  loaded from (2) only and not (1)
> > ( at least for the property currency.uom.id.default )
> >
> > I had been making changes to (1) and expecting the system to
> > use it. However the system uses the table SYSTEM_PROPERTY
> > that seems to be getting loaded only from (2).
> >
> >
> > Although i have marked this thread as solved , I am yet to analyze
> > why at all the flow control reached to the stage of last resort for
> > determining the handling currency from system property
> > currency.uom.id.default
> >
> > It should have been determined much earlier through information provided
> > end user using WEB-UI controls.
> >
> >
> > I would update this thread at a later time when i am able to investigate
> > that.
> >
> > regds
> > mallah.
> >
> >
> >
> > On Thu, Aug 31, 2017 at 11:39 AM, Rajesh Mallah <mallah.rajesh@gmail.com
> >
> > wrote:
> >
> > >
> > >
> > > I wonder why a query on a table should be run looking for
> > > rows where the primary key of table is null.
> > >
> > > the sole filter on the below query on ProductStore  is:
> > > WHERE ((PRODUCT_STORE_ID IS NULL))
> > >
> > > Note: this query is just run *before* looking in the ProductPrice
> > > table.
> > >
> > > more context here: https://pastebin.com/raw/sSh1sNWb
> > >
> > > BTW: what is the way of altering logging config in OfBiz
> > >            to include Filenames and Line number?
> > >
> > > regds
> > > mallah.
> > >
> > >
> > >
> > >
> > > 2017-08-31 10:45:18,180 |http-nio-8080-exec-5
> > > |GenericDAO                    |T| Ran query in 3 milli-seconds:
> > > EntityName: ProductStore Sql: SELECT PRODUCT_STORE_ID,
> > > PRIMARY_STORE_GROUP_ID, STORE_NAME, COMPANY_NAME, TITLE, SUBTITLE,
> > > PAY_TO_PARTY_ID, DAYS_TO_CANCEL_NON_PAY, MANUAL_AUTH_IS_CAPTURE,
> > > PRORATE_SHIPPING, PRORATE_TAXES, VIEW_CART_ON_ADD, AUTO_SAVE_CART,
> > > AUTO_APPROVE_REVIEWS, IS_DEMO_STORE, IS_IMMEDIATELY_FULFILLED,
> > > INVENTORY_FACILITY_ID, ONE_INVENTORY_FACILITY, CHECK_INVENTORY,
> > > RESERVE_INVENTORY, RESERVE_ORDER_ENUM_ID, REQUIRE_INVENTORY,
> > > BALANCE_RES_ON_ORDER_CREATION, REQUIREMENT_METHOD_ENUM_ID,
> > > ORDER_NUMBER_PREFIX, DEFAULT_LOCALE_STRING, DEFAULT_CURRENCY_UOM_ID,
> > > DEFAULT_TIME_ZONE_STRING, DEFAULT_SALES_CHANNEL_ENUM_ID,
> ALLOW_PASSWORD,
> > > DEFAULT_PASSWORD, EXPLODE_ORDER_ITEMS, CHECK_GC_BALANCE,
> > > RETRY_FAILED_AUTHS, HEADER_APPROVED_STATUS, ITEM_APPROVED_STATUS,
> > > DIGITAL_ITEM_APPROVED_STATUS, HEADER_DECLINED_STATUS,
> > ITEM_DECLINED_STATUS,
> > > HEADER_CANCEL_STATUS, ITEM_CANCEL_STATUS, AUTH_DECLINED_MESSAGE,
> > > AUTH_FRAUD_MESSAGE, AUTH_ERROR_MESSAGE, VISUAL_THEME_ID,
> > > STORE_CREDIT_ACCOUNT_ENUM_ID, USE_PRIMARY_EMAIL_USERNAME,
> > > REQUIRE_CUSTOMER_ROLE, AUTO_INVOICE_DIGITAL_ITEMS,
> > > REQ_SHIP_ADDR_FOR_DIG_ITEMS, SHOW_CHECKOUT_GIFT_OPTIONS,
> > > SELECT_PAYMENT_TYPE_PER_ITEM, SHOW_PRICES_WITH_VAT_TAX,
> > SHOW_TAX_IS_EXEMPT,
> > > VAT_TAX_AUTH_GEO_ID, VAT_TAX_AUTH_PARTY_ID,
> ENABLE_AUTO_SUGGESTION_LIST,
> > > ENABLE_DIG_PROD_UPLOAD, PROD_SEARCH_EXCLUDE_VARIANTS,
> > > DIG_PROD_UPLOAD_CATEGORY_ID, AUTO_ORDER_CC_TRY_EXP,
> > > AUTO_ORDER_CC_TRY_OTHER_CARDS, AUTO_ORDER_CC_TRY_LATER_NSF,
> > > AUTO_ORDER_CC_TRY_LATER_MAX, STORE_CREDIT_VALID_DAYS,
> > AUTO_APPROVE_INVOICE,
> > > AUTO_APPROVE_ORDER, SHIP_IF_CAPTURE_FAILS, SET_OWNER_UPON_ISSUANCE,
> > > REQ_RETURN_INVENTORY_RECEIVE, ADD_TO_CART_REMOVE_INCOMPAT,
> > > ADD_TO_CART_REPLACE_UPSELL, SPLIT_PAY_PREF_PER_SHP_GRP, MANAGED_BY_LOT,
> > > SHOW_OUT_OF_STOCK_PRODUCTS, ORDER_DECIMAL_QUANTITY, ALLOW_COMMENT,
> > > STYLE_SHEET, HEADER_LOGO, HEADER_MIDDLE_BACKGROUND,
> > > HEADER_RIGHT_BACKGROUND, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP,
> > > CREATED_STAMP, CREATED_TX_STAMP FROM ofbiz.PRODUCT_STORE WHERE
> > > ((PRODUCT_STORE_ID IS NULL)) where clause:[]
> > >
> > >
> > >
> > > On Thu, Aug 31, 2017 at 11:23 AM, Rajesh Mallah <
> mallah.rajesh@gmail.com
> > >
> > > wrote:
> > >
> > >> Hi Arun ,
> > >>
> > >> I checked PartyAcctgPreference which was USD and changed it to INR
> > >> yesterday only. After changes i do logout and login and restart the
> > tomcat
> > >> to ensure there are no caching issues.
> > >>
> > >>
> > >> ofbiz_redgrape=>  SELECT PTYACCPREF.PARTY_ID,
> > >> PTYACCPREF.BASE_CURRENCY_UOM_ID, PTYGROUP.GROUP_NAME,
> > >> PTYROLE.ROLE_TYPE_ID FROM (ofbiz.PARTY_ACCTG_PREFERENCE PTYACCPREF
> INNER
> > >> JOIN ofbiz.PARTY_GROUP PTYGROUP ON PTYACCPREF.PARTY_ID =
> > PTYGROUP.PARTY_ID)
> > >> INNER JOIN ofbiz.PARTY_ROLE PTYROLE ON PTYACCPREF.PARTY_ID =
> > >> PTYROLE.PARTY_ID WHERE (((PTYROLE.ROLE_TYPE_ID =
> > 'INTERNAL_ORGANIZATIO')));
> > >>
> > >> -[ RECORD 1 ]--------+----------------------------------
> > >> party_id             | Company
> > >> base_currency_uom_id | INR
> > >> group_name           | REDGRAPE TECHNOLOGIES PRIVATE LTD
> > >> role_type_id         | INTERNAL_ORGANIZATIO
> > >>
> > >>
> > >>
> > >> The relevant field ProductStore is also INR
> > >>
> > >> https://pastebin.com/raw/mM2j6kiE
> > >>
> > >> ......
> > >>
> > >> requirement_method_enum_id    |
> > >> order_number_prefix           |
> > >> default_locale_string         | en_US
> > >> default_currency_uom_id       | INR
> > >> default_time_zone_string      | Asia/Kolkata
> > >> default_sales_channel_enum_id |
> > >> allow_password                | Y
> > >>
> > >> .........
> > >>
> > >> regds
> > >> mallah.
> > >>
> > >>
> > >> On Thu, Aug 31, 2017 at 11:05 AM, Arun Patidar <
> > >> arun.patidar@hotwaxsystems.com> wrote:
> > >>
> > >>> Hello Rajesh,
> > >>>
> > >>> ProductStore and PartyAcctgPreference entities also have fields to
> > store
> > >>> currency UOM.
> > >>>
> > >>> --
> > >>> Thanks & Regards
> > >>> ---
> > >>> Arun Patidar
> > >>> Manager, Enterprise Software Development
> > >>>
> > >>> HotWax Systems Pvt Ltd.
> > >>>
> > >>> www.hotwaxsystems.com
> > >>>
> > >>>
> > >>> On Thu, Aug 31, 2017 at 9:17 AM, Rajesh Mallah <
> > mallah.rajesh@gmail.com>
> > >>> wrote:
> > >>>
> > >>> > looks like too many messages has already been
> > >>> > exchanged in past  at various point in time.
> > >>> >
> > >>> > http://ofbiz.markmail.org/search/?q=changing+default+
> > >>> > currency#query:changing%20default%20currency
> > >>> >
> > >>> > it will be beneficial to new users  if it is given attention .
> > >>> >
> > >>> > regds
> > >>> > mallah.
> > >>> >
> > >>> >
> > >>> > On Thu, Aug 31, 2017 at 8:01 AM, Rajesh Mallah <
> > >>> mallah.rajesh@gmail.com>
> > >>> > wrote:
> > >>> >
> > >>> > >
> > >>> > >
> > >>> > >
> > >>> > > @Deepak , @Rishi  / List ,
> > >>> > >
> > >>> > > Additional SQL tracing reveals that the ProductPricing
> > >>> > > entities are being queried with  CURRENCY_UOM_ID=USD
> > >>> > > and hence the USD pricing is being picked up. I am not sure
> > >>> > > why USD currency is being picked. I have changed in almost
> > >>> > > all places including properties file.
> > >>> > >
> > >>> > > -- ./framework/common/config/general.properties
> > >>> > >
> > >>> > > # -- unique instance id (20 char max)
> > >>> > > unique.instanceId=ofbiz1
> > >>> > > # -- the default currency to use for prices, etc
> > >>> > > currency.uom.id.default=INR
> > >>> > > # These values override the _NA_ DEFAULT values in user
> preferences
> > >>> for
> > >>> > > the GLOBAL_PREFERENCES userPrefGroupTypeId
> > >>> > > # -- the default organizationPartyId for used in dropdowns and
> > >>> reports
> > >>> > >
> > >>> > >
> > >>> > > 2017-08-31 07:52:15,412 |http-nio-8080-exec-9 |GenericDAO
> > >>> > > |T| Ran query in 1 milli-seconds:  EntityName: ProductPrice
> > >>> > > Sql: SELECT PRODUCT_ID, PRODUCT_PRICE_TYPE_ID,
> > >>> PRODUCT_PRICE_PURPOSE_ID,
> > >>> > >  CURRENCY_UOM_ID, PRODUCT_STORE_GROUP_ID, FROM_DATE, THRU_DATE,
> > >>> PRICE,
> > >>> > > TERM_UOM_ID, CUSTOM_PRICE_CALC_SERVICE, PRICE_WITHOUT_TAX,
> > >>> > PRICE_WITH_TAX,
> > >>> > > TAX_AMOUNT, TAX_PERCENTAGE, TAX_AUTH_PARTY_ID, TAX_AUTH_GEO_ID,
> > >>> > TAX_IN_PRICE,
> > >>> > >  CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE,
> > >>> > > LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP,
> > >>> LAST_UPDATED_TX_STAMP,
> > >>> > > CREATED_STAMP, CREATED_TX_STAMP FROM ofbiz.PRODUCT_PRICE WHERE
> > >>> > > ((PRODUCT_ID = ? AND (PRODUCT_PRICE_PURPOSE_ID = ? OR
> > >>> > PRODUCT_PRICE_PURPOSE_ID IS NULL)
> > >>> > >  AND CURRENCY_UOM_ID = ? AND PRODUCT_STORE_GROUP_ID = ?))
> > >>> > > ORDER BY FROM_DATE DESC
> > >>> > >
> > >>> > >  where clause:[PRODUCT_ID=10000, PRODUCT_PRICE_PURPOSE_ID=
> > PURCHASE,
> > >>> > > CURRENCY_UOM_ID=USD,PRODUCT_STORE_GROUP_ID=_NA_]
> > >>> > >
> > >>> > > Full Log:
> > >>> > > https://pastebin.com/raw/smdQX84B
> > >>> > >
> > >>> > >
> > >>> > > Looking forward to further comments and
> > >>> > >  guidance.
> > >>> > >
> > >>> > > ​regds
> > >>> > > mallah.
> > >>> > >
> > >>> >
> > >>>
> > >>
> > >>
> > >
> >
>

Re: setting up TAX in ofbiz [ SOLVED ]

Posted by Arun Patidar <ar...@hotwaxsystems.com>.
Hi Rajesh,

SystemProperty entity is used to override file system configuration
settings. This also gives flexibility of changing values on runtime without
restart. System, first checks in the database and then go to file system if
value not found.


-- 
Thanks & Regards
---
Arun Patidar
Manager, Enterprise Software Development

HotWax Systems Pvt Ltd.

www.hotwaxsystems.com


On Thu, Aug 31, 2017 at 6:41 PM, Rajesh Mallah <ma...@gmail.com>
wrote:

> Hi List  ,
>
> At last I managed to get my setup pick up the prices specified  in non-USD
> currency (i.e INR in my case) .
>
> From what I could understand , the system attempts to get the the
> value of "currency of handling" from multiple sources as currency attribute
> itself can be specified at multiple places.
>
> [ Source of above info:
> ./applications/product/src/main/java/org/apache/ofbiz/
> product/price/PriceServices.java
> Lines: 80-567, Func: calculateProductPrice ]
>
> If for whatever reasons  (or set of reasons) the currency could not
> be determined
>
> (1)  it attempts to get the value of property  'currency.uom.id.default' in
> general resource/category ,
>      (1.1)  if that also cannot be got it uses the hard coded default USD [
> PriceServices.java:148 ]
>
>  142         String currencyDefaultUomId = (String)
> context.get("currencyUomId");
>  143         String currencyUomIdTo = (String)
> context.get("currencyUomIdTo");
>  144         if (UtilValidate.isEmpty(currencyDefaultUomId)) {
>  145             if (productStore != null &&
> UtilValidate.isNotEmpty(productStore.getString("defaultCurrencyUomId"))) {
>  146                 currencyDefaultUomId =
> productStore.getString("defaultCurrencyUomId");
>  147             } else {
>  148                 currencyDefaultUomId =
> EntityUtilProperties.getPropertyValue("general",
> "currency.uom.id.default",
> "USD", delegator);
>  149             }
>  150         }
>
>
> The reason why it took so long to track it down  is that
> the system property 'currency.uom.id.default'  itself can be specified
> in 2 places:
>
> (1) ./framework/common/config/general.properties
> (2) ./framework/common/data/CommonSystemPropertyData.xml
>
> and the entity table (RDBMS) is : SYSTEM_PROPERTY
> which seems to be  loaded from (2) only and not (1)
> ( at least for the property currency.uom.id.default )
>
> I had been making changes to (1) and expecting the system to
> use it. However the system uses the table SYSTEM_PROPERTY
> that seems to be getting loaded only from (2).
>
>
> Although i have marked this thread as solved , I am yet to analyze
> why at all the flow control reached to the stage of last resort for
> determining the handling currency from system property
> currency.uom.id.default
>
> It should have been determined much earlier through information provided
> end user using WEB-UI controls.
>
>
> I would update this thread at a later time when i am able to investigate
> that.
>
> regds
> mallah.
>
>
>
> On Thu, Aug 31, 2017 at 11:39 AM, Rajesh Mallah <ma...@gmail.com>
> wrote:
>
> >
> >
> > I wonder why a query on a table should be run looking for
> > rows where the primary key of table is null.
> >
> > the sole filter on the below query on ProductStore  is:
> > WHERE ((PRODUCT_STORE_ID IS NULL))
> >
> > Note: this query is just run *before* looking in the ProductPrice
> > table.
> >
> > more context here: https://pastebin.com/raw/sSh1sNWb
> >
> > BTW: what is the way of altering logging config in OfBiz
> >            to include Filenames and Line number?
> >
> > regds
> > mallah.
> >
> >
> >
> >
> > 2017-08-31 10:45:18,180 |http-nio-8080-exec-5
> > |GenericDAO                    |T| Ran query in 3 milli-seconds:
> > EntityName: ProductStore Sql: SELECT PRODUCT_STORE_ID,
> > PRIMARY_STORE_GROUP_ID, STORE_NAME, COMPANY_NAME, TITLE, SUBTITLE,
> > PAY_TO_PARTY_ID, DAYS_TO_CANCEL_NON_PAY, MANUAL_AUTH_IS_CAPTURE,
> > PRORATE_SHIPPING, PRORATE_TAXES, VIEW_CART_ON_ADD, AUTO_SAVE_CART,
> > AUTO_APPROVE_REVIEWS, IS_DEMO_STORE, IS_IMMEDIATELY_FULFILLED,
> > INVENTORY_FACILITY_ID, ONE_INVENTORY_FACILITY, CHECK_INVENTORY,
> > RESERVE_INVENTORY, RESERVE_ORDER_ENUM_ID, REQUIRE_INVENTORY,
> > BALANCE_RES_ON_ORDER_CREATION, REQUIREMENT_METHOD_ENUM_ID,
> > ORDER_NUMBER_PREFIX, DEFAULT_LOCALE_STRING, DEFAULT_CURRENCY_UOM_ID,
> > DEFAULT_TIME_ZONE_STRING, DEFAULT_SALES_CHANNEL_ENUM_ID, ALLOW_PASSWORD,
> > DEFAULT_PASSWORD, EXPLODE_ORDER_ITEMS, CHECK_GC_BALANCE,
> > RETRY_FAILED_AUTHS, HEADER_APPROVED_STATUS, ITEM_APPROVED_STATUS,
> > DIGITAL_ITEM_APPROVED_STATUS, HEADER_DECLINED_STATUS,
> ITEM_DECLINED_STATUS,
> > HEADER_CANCEL_STATUS, ITEM_CANCEL_STATUS, AUTH_DECLINED_MESSAGE,
> > AUTH_FRAUD_MESSAGE, AUTH_ERROR_MESSAGE, VISUAL_THEME_ID,
> > STORE_CREDIT_ACCOUNT_ENUM_ID, USE_PRIMARY_EMAIL_USERNAME,
> > REQUIRE_CUSTOMER_ROLE, AUTO_INVOICE_DIGITAL_ITEMS,
> > REQ_SHIP_ADDR_FOR_DIG_ITEMS, SHOW_CHECKOUT_GIFT_OPTIONS,
> > SELECT_PAYMENT_TYPE_PER_ITEM, SHOW_PRICES_WITH_VAT_TAX,
> SHOW_TAX_IS_EXEMPT,
> > VAT_TAX_AUTH_GEO_ID, VAT_TAX_AUTH_PARTY_ID, ENABLE_AUTO_SUGGESTION_LIST,
> > ENABLE_DIG_PROD_UPLOAD, PROD_SEARCH_EXCLUDE_VARIANTS,
> > DIG_PROD_UPLOAD_CATEGORY_ID, AUTO_ORDER_CC_TRY_EXP,
> > AUTO_ORDER_CC_TRY_OTHER_CARDS, AUTO_ORDER_CC_TRY_LATER_NSF,
> > AUTO_ORDER_CC_TRY_LATER_MAX, STORE_CREDIT_VALID_DAYS,
> AUTO_APPROVE_INVOICE,
> > AUTO_APPROVE_ORDER, SHIP_IF_CAPTURE_FAILS, SET_OWNER_UPON_ISSUANCE,
> > REQ_RETURN_INVENTORY_RECEIVE, ADD_TO_CART_REMOVE_INCOMPAT,
> > ADD_TO_CART_REPLACE_UPSELL, SPLIT_PAY_PREF_PER_SHP_GRP, MANAGED_BY_LOT,
> > SHOW_OUT_OF_STOCK_PRODUCTS, ORDER_DECIMAL_QUANTITY, ALLOW_COMMENT,
> > STYLE_SHEET, HEADER_LOGO, HEADER_MIDDLE_BACKGROUND,
> > HEADER_RIGHT_BACKGROUND, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP,
> > CREATED_STAMP, CREATED_TX_STAMP FROM ofbiz.PRODUCT_STORE WHERE
> > ((PRODUCT_STORE_ID IS NULL)) where clause:[]
> >
> >
> >
> > On Thu, Aug 31, 2017 at 11:23 AM, Rajesh Mallah <mallah.rajesh@gmail.com
> >
> > wrote:
> >
> >> Hi Arun ,
> >>
> >> I checked PartyAcctgPreference which was USD and changed it to INR
> >> yesterday only. After changes i do logout and login and restart the
> tomcat
> >> to ensure there are no caching issues.
> >>
> >>
> >> ofbiz_redgrape=>  SELECT PTYACCPREF.PARTY_ID,
> >> PTYACCPREF.BASE_CURRENCY_UOM_ID, PTYGROUP.GROUP_NAME,
> >> PTYROLE.ROLE_TYPE_ID FROM (ofbiz.PARTY_ACCTG_PREFERENCE PTYACCPREF INNER
> >> JOIN ofbiz.PARTY_GROUP PTYGROUP ON PTYACCPREF.PARTY_ID =
> PTYGROUP.PARTY_ID)
> >> INNER JOIN ofbiz.PARTY_ROLE PTYROLE ON PTYACCPREF.PARTY_ID =
> >> PTYROLE.PARTY_ID WHERE (((PTYROLE.ROLE_TYPE_ID =
> 'INTERNAL_ORGANIZATIO')));
> >>
> >> -[ RECORD 1 ]--------+----------------------------------
> >> party_id             | Company
> >> base_currency_uom_id | INR
> >> group_name           | REDGRAPE TECHNOLOGIES PRIVATE LTD
> >> role_type_id         | INTERNAL_ORGANIZATIO
> >>
> >>
> >>
> >> The relevant field ProductStore is also INR
> >>
> >> https://pastebin.com/raw/mM2j6kiE
> >>
> >> ......
> >>
> >> requirement_method_enum_id    |
> >> order_number_prefix           |
> >> default_locale_string         | en_US
> >> default_currency_uom_id       | INR
> >> default_time_zone_string      | Asia/Kolkata
> >> default_sales_channel_enum_id |
> >> allow_password                | Y
> >>
> >> .........
> >>
> >> regds
> >> mallah.
> >>
> >>
> >> On Thu, Aug 31, 2017 at 11:05 AM, Arun Patidar <
> >> arun.patidar@hotwaxsystems.com> wrote:
> >>
> >>> Hello Rajesh,
> >>>
> >>> ProductStore and PartyAcctgPreference entities also have fields to
> store
> >>> currency UOM.
> >>>
> >>> --
> >>> Thanks & Regards
> >>> ---
> >>> Arun Patidar
> >>> Manager, Enterprise Software Development
> >>>
> >>> HotWax Systems Pvt Ltd.
> >>>
> >>> www.hotwaxsystems.com
> >>>
> >>>
> >>> On Thu, Aug 31, 2017 at 9:17 AM, Rajesh Mallah <
> mallah.rajesh@gmail.com>
> >>> wrote:
> >>>
> >>> > looks like too many messages has already been
> >>> > exchanged in past  at various point in time.
> >>> >
> >>> > http://ofbiz.markmail.org/search/?q=changing+default+
> >>> > currency#query:changing%20default%20currency
> >>> >
> >>> > it will be beneficial to new users  if it is given attention .
> >>> >
> >>> > regds
> >>> > mallah.
> >>> >
> >>> >
> >>> > On Thu, Aug 31, 2017 at 8:01 AM, Rajesh Mallah <
> >>> mallah.rajesh@gmail.com>
> >>> > wrote:
> >>> >
> >>> > >
> >>> > >
> >>> > >
> >>> > > @Deepak , @Rishi  / List ,
> >>> > >
> >>> > > Additional SQL tracing reveals that the ProductPricing
> >>> > > entities are being queried with  CURRENCY_UOM_ID=USD
> >>> > > and hence the USD pricing is being picked up. I am not sure
> >>> > > why USD currency is being picked. I have changed in almost
> >>> > > all places including properties file.
> >>> > >
> >>> > > -- ./framework/common/config/general.properties
> >>> > >
> >>> > > # -- unique instance id (20 char max)
> >>> > > unique.instanceId=ofbiz1
> >>> > > # -- the default currency to use for prices, etc
> >>> > > currency.uom.id.default=INR
> >>> > > # These values override the _NA_ DEFAULT values in user preferences
> >>> for
> >>> > > the GLOBAL_PREFERENCES userPrefGroupTypeId
> >>> > > # -- the default organizationPartyId for used in dropdowns and
> >>> reports
> >>> > >
> >>> > >
> >>> > > 2017-08-31 07:52:15,412 |http-nio-8080-exec-9 |GenericDAO
> >>> > > |T| Ran query in 1 milli-seconds:  EntityName: ProductPrice
> >>> > > Sql: SELECT PRODUCT_ID, PRODUCT_PRICE_TYPE_ID,
> >>> PRODUCT_PRICE_PURPOSE_ID,
> >>> > >  CURRENCY_UOM_ID, PRODUCT_STORE_GROUP_ID, FROM_DATE, THRU_DATE,
> >>> PRICE,
> >>> > > TERM_UOM_ID, CUSTOM_PRICE_CALC_SERVICE, PRICE_WITHOUT_TAX,
> >>> > PRICE_WITH_TAX,
> >>> > > TAX_AMOUNT, TAX_PERCENTAGE, TAX_AUTH_PARTY_ID, TAX_AUTH_GEO_ID,
> >>> > TAX_IN_PRICE,
> >>> > >  CREATED_DATE, CREATED_BY_USER_LOGIN, LAST_MODIFIED_DATE,
> >>> > > LAST_MODIFIED_BY_USER_LOGIN, LAST_UPDATED_STAMP,
> >>> LAST_UPDATED_TX_STAMP,
> >>> > > CREATED_STAMP, CREATED_TX_STAMP FROM ofbiz.PRODUCT_PRICE WHERE
> >>> > > ((PRODUCT_ID = ? AND (PRODUCT_PRICE_PURPOSE_ID = ? OR
> >>> > PRODUCT_PRICE_PURPOSE_ID IS NULL)
> >>> > >  AND CURRENCY_UOM_ID = ? AND PRODUCT_STORE_GROUP_ID = ?))
> >>> > > ORDER BY FROM_DATE DESC
> >>> > >
> >>> > >  where clause:[PRODUCT_ID=10000, PRODUCT_PRICE_PURPOSE_ID=
> PURCHASE,
> >>> > > CURRENCY_UOM_ID=USD,PRODUCT_STORE_GROUP_ID=_NA_]
> >>> > >
> >>> > > Full Log:
> >>> > > https://pastebin.com/raw/smdQX84B
> >>> > >
> >>> > >
> >>> > > Looking forward to further comments and
> >>> > >  guidance.
> >>> > >
> >>> > > ​regds
> >>> > > mallah.
> >>> > >
> >>> >
> >>>
> >>
> >>
> >
>