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 <[hidden email]> 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 <[hidden email]> > 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 < >> [hidden email]> 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 <[hidden email]> >>> 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 < >>> [hidden email]> >>> > 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. >>> > > >>> > >>> >> >> > |
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 <[hidden email]> 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 <[hidden email]> > 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 <[hidden email] > > > > 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 < > >> [hidden email]> 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 < > [hidden email]> > >>> 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 < > >>> [hidden email]> > >>> > 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. > >>> > > > >>> > > >>> > >> > >> > > > |
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 < [hidden email]> 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 <[hidden email]> > 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 <[hidden email] > > > > 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 < > [hidden email] > > > > > > 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 < > > >> [hidden email]> 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 < > > [hidden email]> > > >>> 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 < > > >>> [hidden email]> > > >>> > 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. > > >>> > > > > >>> > > > >>> > > >> > > >> > > > > > > |
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 <[hidden email]> 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 < > [hidden email]> 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 <[hidden email]> > > 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 < > [hidden email] > > > > > > 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 < > > [hidden email] > > > > > > > > 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 < > > > >> [hidden email]> 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 < > > > [hidden email]> > > > >>> 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 < > > > >>> [hidden email]> > > > >>> > 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. > > > >>> > > > > > >>> > > > > >>> > > > >> > > > >> > > > > > > > > > > |
In reply to this post by Rajesh Mallah
Changes to the general.properties files were not getting picked . As mentioned in past email The value in the rdbms were remaining the same . I do not know about the proper usage Of that file. An end user will definitely Be confounded by this. The idea of changing the file came from searching ml archives. May be some of those info is outdated. RegdsMallah Sent from my Samsung Galaxy smartphone. -------- Original message --------From: Arun Patidar <[hidden email]> Date: 9/1/17 10:36 (GMT+05:30) To: [hidden email] Cc: [hidden email] Subject: Re: setting up TAX in ofbiz [ SOLVED ] 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 <[hidden email]> 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 < > [hidden email]> 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 <[hidden email]> > > 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 < > [hidden email] > > > > > > 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 < > > [hidden email] > > > > > > > > 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 < > > > >> [hidden email]> 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 < > > > [hidden email]> > > > >>> 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 < > > > >>> [hidden email]> > > > >>> > 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. > > > >>> > > > > > >>> > > > > >>> > > > >> > > > >> > > > > > > > > > > |
Hello Rajesh,
I think you misunderstood 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. System configuration file will not change SystemProperty value. Values in SystemProperty entity overrides file system configuration settings. For Example, CurrencyUomId in configuration file is USD & SystemProperty entity is IN. It will pick IN as current setting. Thanks and Regards, *Aditya Sharma* | Enterprise Software Engineer HotWax Systems <http://www.hotwaxsystems.com/> <https://www.linkedin.com/in/aditya-sharma-78291810a/> On Fri, Sep 1, 2017 at 11:38 AM, mallah.rajesh <[hidden email]> wrote: > > Changes to the general.properties files were not getting picked . As > mentioned in past email The value in the rdbms were remaining the same . > I do not know about the proper usage Of that file. An end user will > definitely Be confounded by this. > The idea of changing the file came from searching ml archives. May be some > of those info is outdated. > RegdsMallah > > > > > Sent from my Samsung Galaxy smartphone. > -------- Original message --------From: Arun Patidar < > [hidden email]> Date: 9/1/17 10:36 (GMT+05:30) To: > [hidden email] Cc: [hidden email] Subject: Re: setting up > TAX in ofbiz [ SOLVED ] > 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 <[hidden email]> > 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 < > > [hidden email]> 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 < > [hidden email]> > > > 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 < > > [hidden email] > > > > > > > > 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 < > > > [hidden email] > > > > > > > > > > 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 < > > > > >> [hidden email]> 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 < > > > > [hidden email]> > > > > >>> 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 < > > > > >>> [hidden email]> > > > > >>> > 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. > > > > >>> > > > > > > >>> > > > > > >>> > > > > >> > > > > >> > > > > > > > > > > > > > > > |
Administrator
|
In reply to this post by Rajesh Mallah
Rajesh,
Did you empty the value in system property? * If yes, this could be related with https://issues.apache.org/jira/browse/OFBIZ-7754 which is still debated (see related Jiras) In few words, when you set an empty system property it prevails over a non empty file property. * If not, then this value also prevails and you need to delete it to read it from the file or *easier change it*. By default it's indeed USD: https://s.apache.org/R46u I can't see any other reasons, HTH Jacques Le 01/09/2017 à 08:08, mallah.rajesh a écrit : > Changes to the general.properties files were not getting picked . As mentioned in past email The value in the rdbms were remaining the same . > I do not know about the proper usage Of that file. An end user will definitely Be confounded by this. > The idea of changing the file came from searching ml archives. May be some of those info is outdated. > RegdsMallah > > > > > Sent from my Samsung Galaxy smartphone. > -------- Original message --------From: Arun Patidar <[hidden email]> Date: 9/1/17 10:36 (GMT+05:30) To: [hidden email] Cc: [hidden email] Subject: Re: setting up TAX in ofbiz [ SOLVED ] > 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. > > > |
Administrator
|
In reply to this post by Aditya Sharma
Yep, that's also what Arun explained http://markmail.org/message/o6ar3xz2oc6kdurr :)
Thanks Aditya Jacques Le 01/09/2017 à 08:46, Aditya Sharma a écrit : > Hello Rajesh, > > I think you misunderstood 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. > System configuration file will not change SystemProperty value. > > Values in SystemProperty entity overrides file system configuration > settings. > > For Example, CurrencyUomId in configuration file is USD & SystemProperty > entity is IN. It will pick IN as current setting. > > Thanks and Regards, > > *Aditya Sharma* | Enterprise Software Engineer > HotWax Systems <http://www.hotwaxsystems.com/> > <https://www.linkedin.com/in/aditya-sharma-78291810a/> > > On Fri, Sep 1, 2017 at 11:38 AM, mallah.rajesh <[hidden email]> > wrote: > >> Changes to the general.properties files were not getting picked . As >> mentioned in past email The value in the rdbms were remaining the same . >> I do not know about the proper usage Of that file. An end user will >> definitely Be confounded by this. >> The idea of changing the file came from searching ml archives. May be some >> of those info is outdated. >> RegdsMallah >> >> >> >> >> Sent from my Samsung Galaxy smartphone. >> -------- Original message --------From: Arun Patidar < >> [hidden email]> Date: 9/1/17 10:36 (GMT+05:30) To: >> [hidden email] Cc: [hidden email] Subject: Re: setting up >> TAX in ofbiz [ SOLVED ] >> 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 <[hidden email]> >> 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 < >>> [hidden email]> 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 < >> [hidden email]> >>>> 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 < >>> [hidden email] >>>>> 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 < >>>> [hidden email] >>>>>> 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 < >>>>>>> [hidden email]> 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 < >>>>> [hidden email]> >>>>>>>> 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 < >>>>>>>> [hidden email]> >>>>>>>>> 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. >>>>>>>>>> >>>>>>> |
In reply to this post by Aditya Sharma
Hi Aditya ,
Suppose the seed,seed-initial,demo data is already loaded. Question is under current stable version , what options does an end user have if he/she has to change a property value like currency.uom.id.default ? regds mallah. On Fri, Sep 1, 2017 at 12:16 PM, Aditya Sharma < [hidden email]> wrote: > Hello Rajesh, > > I think you misunderstood 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. > > System configuration file will not change SystemProperty value. > > Values in SystemProperty entity overrides file system configuration > settings. > > For Example, CurrencyUomId in configuration file is USD & SystemProperty > entity is IN. It will pick IN as current setting. > > Thanks and Regards, > > *Aditya Sharma* | Enterprise Software Engineer > HotWax Systems <http://www.hotwaxsystems.com/> > <https://www.linkedin.com/in/aditya-sharma-78291810a/> > > On Fri, Sep 1, 2017 at 11:38 AM, mallah.rajesh <[hidden email]> > wrote: > > > > > Changes to the general.properties files were not getting picked . As > > mentioned in past email The value in the rdbms were remaining the same . > > I do not know about the proper usage Of that file. An end user will > > definitely Be confounded by this. > > The idea of changing the file came from searching ml archives. May be > some > > of those info is outdated. > > RegdsMallah > > > > > > > > > > Sent from my Samsung Galaxy smartphone. > > -------- Original message --------From: Arun Patidar < > > [hidden email]> Date: 9/1/17 10:36 (GMT+05:30) To: > > [hidden email] Cc: [hidden email] Subject: Re: setting up > > TAX in ofbiz [ SOLVED ] > > 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 <[hidden email]> > > 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 < > > > [hidden email]> 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 < > > [hidden email]> > > > > 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 < > > > [hidden email] > > > > > > > > > > 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 < > > > > [hidden email] > > > > > > > > > > > > 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 < > > > > > >> [hidden email]> 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 < > > > > > [hidden email]> > > > > > >>> 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 < > > > > > >>> [hidden email]> > > > > > >>> > 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. > > > > > >>> > > > > > > > >>> > > > > > > >>> > > > > > >> > > > > > >> > > > > > > > > > > > > > > > > > > > > > |
Administrator
|
Either edit the DB value or remove it from DB and change it in the property file. If the data is only emptied in DB it still prevails the property in
file. Jacques Le 01/09/2017 à 09:52, Rajesh Mallah a écrit : > Hi Aditya , > > Suppose the seed,seed-initial,demo data is already loaded. > > Question is under current stable version , what options does an > end user have if he/she has to change a property value > like currency.uom.id.default ? > > > regds > mallah. > > > > > > > > > > > > On Fri, Sep 1, 2017 at 12:16 PM, Aditya Sharma < > [hidden email]> wrote: > >> Hello Rajesh, >> >> I think you misunderstood 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. >> System configuration file will not change SystemProperty value. >> >> Values in SystemProperty entity overrides file system configuration >> settings. >> >> For Example, CurrencyUomId in configuration file is USD & SystemProperty >> entity is IN. It will pick IN as current setting. >> >> Thanks and Regards, >> >> *Aditya Sharma* | Enterprise Software Engineer >> HotWax Systems <http://www.hotwaxsystems.com/> >> <https://www.linkedin.com/in/aditya-sharma-78291810a/> >> >> On Fri, Sep 1, 2017 at 11:38 AM, mallah.rajesh <[hidden email]> >> wrote: >> >>> Changes to the general.properties files were not getting picked . As >>> mentioned in past email The value in the rdbms were remaining the same . >>> I do not know about the proper usage Of that file. An end user will >>> definitely Be confounded by this. >>> The idea of changing the file came from searching ml archives. May be >> some >>> of those info is outdated. >>> RegdsMallah >>> >>> >>> >>> >>> Sent from my Samsung Galaxy smartphone. >>> -------- Original message --------From: Arun Patidar < >>> [hidden email]> Date: 9/1/17 10:36 (GMT+05:30) To: >>> [hidden email] Cc: [hidden email] Subject: Re: setting up >>> TAX in ofbiz [ SOLVED ] >>> 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 <[hidden email]> >>> 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 < >>>> [hidden email]> 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 < >>> [hidden email]> >>>>> 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 < >>>> [hidden email] >>>>>> 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 < >>>>> [hidden email] >>>>>>> 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 < >>>>>>>> [hidden email]> 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 < >>>>>> [hidden email]> >>>>>>>>> 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 < >>>>>>>>> [hidden email]> >>>>>>>>>> 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. >>>>>>>>>>> >>>>>>>> |
property file you mean : general.properties ?
regds mallah. On Fri, Sep 1, 2017 at 1:30 PM, Jacques Le Roux < [hidden email]> wrote: > Either edit the DB value or remove it from DB and change it in the > property file. If the data is only emptied in DB it still prevails the > property in file. > > Jacques > > > > Le 01/09/2017 à 09:52, Rajesh Mallah a écrit : > >> Hi Aditya , >> >> Suppose the seed,seed-initial,demo data is already loaded. >> >> Question is under current stable version , what options does an >> end user have if he/she has to change a property value >> like currency.uom.id.default ? >> >> >> regds >> mallah. >> >> >> >> >> >> >> >> >> >> >> >> On Fri, Sep 1, 2017 at 12:16 PM, Aditya Sharma < >> [hidden email]> wrote: >> >> Hello Rajesh, >>> >>> I think you misunderstood 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. >>>> >>> System configuration file will not change SystemProperty value. >>> >>> Values in SystemProperty entity overrides file system configuration >>> settings. >>> >>> For Example, CurrencyUomId in configuration file is USD & SystemProperty >>> entity is IN. It will pick IN as current setting. >>> >>> Thanks and Regards, >>> >>> *Aditya Sharma* | Enterprise Software Engineer >>> HotWax Systems <http://www.hotwaxsystems.com/> >>> <https://www.linkedin.com/in/aditya-sharma-78291810a/> >>> >>> On Fri, Sep 1, 2017 at 11:38 AM, mallah.rajesh <[hidden email]> >>> wrote: >>> >>> Changes to the general.properties files were not getting picked . As >>>> mentioned in past email The value in the rdbms were remaining the same >>>> . >>>> I do not know about the proper usage Of that file. An end user will >>>> definitely Be confounded by this. >>>> The idea of changing the file came from searching ml archives. May be >>>> >>> some >>> >>>> of those info is outdated. >>>> RegdsMallah >>>> >>>> >>>> >>>> >>>> Sent from my Samsung Galaxy smartphone. >>>> -------- Original message --------From: Arun Patidar < >>>> [hidden email]> Date: 9/1/17 10:36 (GMT+05:30) To: >>>> [hidden email] Cc: [hidden email] Subject: Re: setting >>>> up >>>> TAX in ofbiz [ SOLVED ] >>>> 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 <[hidden email] >>>> > >>>> 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 < >>>>> [hidden email]> 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 < >>>>>> >>>>> [hidden email]> >>>> >>>>> 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 < >>>>>>> >>>>>> [hidden email] >>>>> >>>>>> 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 < >>>>>>>> >>>>>>> [hidden email] >>>>>> >>>>>>> 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 < >>>>>>>>> [hidden email]> 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 < >>>>>>>>>> >>>>>>>>> [hidden email]> >>>>>>> >>>>>>>> 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 < >>>>>>>>>>> >>>>>>>>>> [hidden email]> >>>>>>>>>> >>>>>>>>>>> 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. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>> > |
In reply to this post by Jacques Le Roux
Hi Rajesh,
2 ways to do that 1. Just like Jacques mentioned, you can change the DB values directly using entity engine https://demo-trunk.ofbiz.apache.org/webtools/control/FindGeneric?entityName=SystemProperty 2. You can prepare the data(if more than 1 value) just like it is done in data files & import it here https://demo-trunk.ofbiz.apache.org/webtools/control/EntityImport Thanks and Regards, *Aditya Sharma* | Enterprise Software Engineer HotWax Systems <http://www.hotwaxsystems.com/> <https://www.linkedin.com/in/aditya-sharma-78291810a/> On Fri, Sep 1, 2017 at 1:30 PM, Jacques Le Roux < [hidden email]> wrote: > Either edit the DB value or remove it from DB and change it in the > property file. If the data is only emptied in DB it still prevails the > property in file. > > Jacques > > > > Le 01/09/2017 à 09:52, Rajesh Mallah a écrit : > >> Hi Aditya , >> >> Suppose the seed,seed-initial,demo data is already loaded. >> >> Question is under current stable version , what options does an >> end user have if he/she has to change a property value >> like currency.uom.id.default ? >> >> >> regds >> mallah. >> >> >> >> >> >> >> >> >> >> >> >> On Fri, Sep 1, 2017 at 12:16 PM, Aditya Sharma < >> [hidden email]> wrote: >> >> Hello Rajesh, >>> >>> I think you misunderstood 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. >>>> >>> System configuration file will not change SystemProperty value. >>> >>> Values in SystemProperty entity overrides file system configuration >>> settings. >>> >>> For Example, CurrencyUomId in configuration file is USD & SystemProperty >>> entity is IN. It will pick IN as current setting. >>> >>> Thanks and Regards, >>> >>> *Aditya Sharma* | Enterprise Software Engineer >>> HotWax Systems <http://www.hotwaxsystems.com/> >>> <https://www.linkedin.com/in/aditya-sharma-78291810a/> >>> >>> On Fri, Sep 1, 2017 at 11:38 AM, mallah.rajesh <[hidden email]> >>> wrote: >>> >>> Changes to the general.properties files were not getting picked . As >>>> mentioned in past email The value in the rdbms were remaining the same >>>> . >>>> I do not know about the proper usage Of that file. An end user will >>>> definitely Be confounded by this. >>>> The idea of changing the file came from searching ml archives. May be >>>> >>> some >>> >>>> of those info is outdated. >>>> RegdsMallah >>>> >>>> >>>> >>>> >>>> Sent from my Samsung Galaxy smartphone. >>>> -------- Original message --------From: Arun Patidar < >>>> [hidden email]> Date: 9/1/17 10:36 (GMT+05:30) To: >>>> [hidden email] Cc: [hidden email] Subject: Re: setting >>>> up >>>> TAX in ofbiz [ SOLVED ] >>>> 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 <[hidden email] >>>> > >>>> 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 < >>>>> [hidden email]> 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 < >>>>>> >>>>> [hidden email]> >>>> >>>>> 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 < >>>>>>> >>>>>> [hidden email] >>>>> >>>>>> 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 < >>>>>>>> >>>>>>> [hidden email] >>>>>> >>>>>>> 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 < >>>>>>>>> [hidden email]> 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 < >>>>>>>>>> >>>>>>>>> [hidden email]> >>>>>>> >>>>>>>> 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 < >>>>>>>>>>> >>>>>>>>>> [hidden email]> >>>>>>>>>> >>>>>>>>>>> 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. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>> > |
Ok Aditya/Jacques , thanks for the clarifications .
On Fri, Sep 1, 2017 at 1:40 PM, Aditya Sharma < [hidden email]> wrote: > Hi Rajesh, > > 2 ways to do that > > 1. Just like Jacques mentioned, you can change the DB values directly using > entity engine > https://demo-trunk.ofbiz.apache.org/webtools/control/ > FindGeneric?entityName=SystemProperty > > 2. You can prepare the data(if more than 1 value) just like it is done in > data files & import it here > https://demo-trunk.ofbiz.apache.org/webtools/control/EntityImport > > Thanks and Regards, > > *Aditya Sharma* | Enterprise Software Engineer > HotWax Systems <http://www.hotwaxsystems.com/> > <https://www.linkedin.com/in/aditya-sharma-78291810a/> > > On Fri, Sep 1, 2017 at 1:30 PM, Jacques Le Roux < > [hidden email]> wrote: > > > Either edit the DB value or remove it from DB and change it in the > > property file. If the data is only emptied in DB it still prevails the > > property in file. > > > > Jacques > > > > > > > > Le 01/09/2017 à 09:52, Rajesh Mallah a écrit : > > > >> Hi Aditya , > >> > >> Suppose the seed,seed-initial,demo data is already loaded. > >> > >> Question is under current stable version , what options does an > >> end user have if he/she has to change a property value > >> like currency.uom.id.default ? > >> > >> > >> regds > >> mallah. > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> On Fri, Sep 1, 2017 at 12:16 PM, Aditya Sharma < > >> [hidden email]> wrote: > >> > >> Hello Rajesh, > >>> > >>> I think you misunderstood 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. > >>>> > >>> System configuration file will not change SystemProperty value. > >>> > >>> Values in SystemProperty entity overrides file system configuration > >>> settings. > >>> > >>> For Example, CurrencyUomId in configuration file is USD & > SystemProperty > >>> entity is IN. It will pick IN as current setting. > >>> > >>> Thanks and Regards, > >>> > >>> *Aditya Sharma* | Enterprise Software Engineer > >>> HotWax Systems <http://www.hotwaxsystems.com/> > >>> <https://www.linkedin.com/in/aditya-sharma-78291810a/> > >>> > >>> On Fri, Sep 1, 2017 at 11:38 AM, mallah.rajesh < > [hidden email]> > >>> wrote: > >>> > >>> Changes to the general.properties files were not getting picked . As > >>>> mentioned in past email The value in the rdbms were remaining the > same > >>>> . > >>>> I do not know about the proper usage Of that file. An end user will > >>>> definitely Be confounded by this. > >>>> The idea of changing the file came from searching ml archives. May be > >>>> > >>> some > >>> > >>>> of those info is outdated. > >>>> RegdsMallah > >>>> > >>>> > >>>> > >>>> > >>>> Sent from my Samsung Galaxy smartphone. > >>>> -------- Original message --------From: Arun Patidar < > >>>> [hidden email]> Date: 9/1/17 10:36 (GMT+05:30) To: > >>>> [hidden email] Cc: [hidden email] Subject: Re: setting > >>>> up > >>>> TAX in ofbiz [ SOLVED ] > >>>> 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 < > [hidden email] > >>>> > > >>>> 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 < > >>>>> [hidden email]> 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 < > >>>>>> > >>>>> [hidden email]> > >>>> > >>>>> 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 < > >>>>>>> > >>>>>> [hidden email] > >>>>> > >>>>>> 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 < > >>>>>>>> > >>>>>>> [hidden email] > >>>>>> > >>>>>>> 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 < > >>>>>>>>> [hidden email]> 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 < > >>>>>>>>>> > >>>>>>>>> [hidden email]> > >>>>>>> > >>>>>>>> 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 < > >>>>>>>>>>> > >>>>>>>>>> [hidden email]> > >>>>>>>>>> > >>>>>>>>>>> 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. > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>> > > > |
Administrator
|
In reply to this post by Rajesh Mallah
Any property in any property file related to a system property in DB
Jacques Le 01/09/2017 à 10:01, Rajesh Mallah a écrit : > property file you mean : general.properties ? > > > regds > mallah. > > On Fri, Sep 1, 2017 at 1:30 PM, Jacques Le Roux < > [hidden email]> wrote: > >> Either edit the DB value or remove it from DB and change it in the >> property file. If the data is only emptied in DB it still prevails the >> property in file. >> >> Jacques >> >> >> >> Le 01/09/2017 à 09:52, Rajesh Mallah a écrit : >> >>> Hi Aditya , >>> >>> Suppose the seed,seed-initial,demo data is already loaded. >>> >>> Question is under current stable version , what options does an >>> end user have if he/she has to change a property value >>> like currency.uom.id.default ? >>> >>> >>> regds >>> mallah. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Fri, Sep 1, 2017 at 12:16 PM, Aditya Sharma < >>> [hidden email]> wrote: >>> >>> Hello Rajesh, >>>> I think you misunderstood 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. >>>>> >>>> System configuration file will not change SystemProperty value. >>>> >>>> Values in SystemProperty entity overrides file system configuration >>>> settings. >>>> >>>> For Example, CurrencyUomId in configuration file is USD & SystemProperty >>>> entity is IN. It will pick IN as current setting. >>>> >>>> Thanks and Regards, >>>> >>>> *Aditya Sharma* | Enterprise Software Engineer >>>> HotWax Systems <http://www.hotwaxsystems.com/> >>>> <https://www.linkedin.com/in/aditya-sharma-78291810a/> >>>> >>>> On Fri, Sep 1, 2017 at 11:38 AM, mallah.rajesh <[hidden email]> >>>> wrote: >>>> >>>> Changes to the general.properties files were not getting picked . As >>>>> mentioned in past email The value in the rdbms were remaining the same >>>>> . >>>>> I do not know about the proper usage Of that file. An end user will >>>>> definitely Be confounded by this. >>>>> The idea of changing the file came from searching ml archives. May be >>>>> >>>> some >>>> >>>>> of those info is outdated. >>>>> RegdsMallah >>>>> >>>>> >>>>> >>>>> >>>>> Sent from my Samsung Galaxy smartphone. >>>>> -------- Original message --------From: Arun Patidar < >>>>> [hidden email]> Date: 9/1/17 10:36 (GMT+05:30) To: >>>>> [hidden email] Cc: [hidden email] Subject: Re: setting >>>>> up >>>>> TAX in ofbiz [ SOLVED ] >>>>> 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 <[hidden email] >>>>> 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 < >>>>>> [hidden email]> 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 < >>>>>>> >>>>>> [hidden email]> >>>>>> 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 < >>>>>>>> >>>>>>> [hidden email] >>>>>>> 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 < >>>>>>>>> >>>>>>>> [hidden email] >>>>>>>> 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 < >>>>>>>>>> [hidden email]> 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 < >>>>>>>>>>> >>>>>>>>>> [hidden email]> >>>>>>>>> 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 < >>>>>>>>>>>> >>>>>>>>>>> [hidden email]> >>>>>>>>>>> >>>>>>>>>>>> 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. >>>>>>>>>>>>> >>>>>>>>>>>>> |
Free forum by Nabble | Edit this page |