setting up TAX in ofbiz

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

Re: setting up TAX in ofbiz

Rajesh Mallah
thanks Jacques , i used it just now.

On Wed, Aug 30, 2017 at 9:57 PM, Jacques Le Roux <
[hidden email]> wrote:

> Yes, look in webtools for export
>
> Jacques
>
>
>
> Le 30/08/2017 à 18:02, Rajesh Mallah a écrit :
>
>> Hi Rishi ,
>>
>> I am doing almost all functions using the UI only
>> Is it possible to export selected entities created
>> using Web-UI to xml ?
>>
>> I am going to create a new product now and see how it
>> does.
>>
>>
>> regds
>> mallah.
>>
>>
>>
>>
>> On Wed, Aug 30, 2017 at 9:14 PM, Rishi Solanki <[hidden email]>
>> wrote:
>>
>> Rajesh,
>>>
>>> IMO, what Deepak is suggesting seems correct, please try with different
>>> product or share the xml data setup you did for the product you are
>>> trying
>>> to add tax.
>>>
>>> May some extra setup/price override the behavior or incorrect setup for
>>> tax. Data will help us to diagnose and reply.
>>>
>>>
>>>
>>> Rishi Solanki
>>> Sr Manager, Enterprise Software Development
>>> HotWax Systems Pvt. Ltd.
>>> Direct: +91-9893287847
>>> http://www.hotwaxsystems.com
>>> www.hotwax.co
>>>
>>> On Wed, Aug 30, 2017 at 8:26 PM, Rajesh Mallah <[hidden email]>
>>> wrote:
>>>
>>> Hi Rajesh,
>>>>>
>>>>> I think you try with a different product also. It is possible that
>>>>> ProductPrice data is not correct/sufficient for the selected product
>>>>>
>>>> and
>>>
>>>> system is not picking the correct price.
>>>>>
>>>>
>>>> Hi Deepak ,
>>>>
>>>> I saw a currency related issue. I added a price with USD currency the
>>>>
>>> price
>>>
>>>> was being picked correctly  and so were the taxes being calculated.
>>>>
>>>> regds
>>>> mallah.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Aug 30, 2017 at 6:10 PM, Deepak Nigam <
>>>> [hidden email]> wrote:
>>>>
>>>> Hi Rajesh,
>>>>>
>>>>> I think you try with a different product also. It is possible that
>>>>> ProductPrice data is not correct/sufficient for the selected product
>>>>>
>>>> and
>>>
>>>> system is not picking the correct price.
>>>>>
>>>>> Thanks & Regards
>>>>> --
>>>>> Deepak Nigam
>>>>> Technical Consultant/Team Lead
>>>>> HotWax Systems
>>>>> www.hotwaxsystems.com
>>>>>
>>>>> On Wed, Aug 30, 2017 at 4:46 PM, Rajesh Mallah <
>>>>>
>>>> [hidden email]>
>>>
>>>> wrote:
>>>>>
>>>>> Some more progress:
>>>>>>
>>>>>> I was able to apply taxes to demo products using new tax
>>>>>> authority .  The incremental steps i did were:
>>>>>>
>>>>>> (1) setup "Categories" , "Association" , "Product Rates" for the new
>>>>>>       tax authority in  Accounting --> Tax Auth .
>>>>>>
>>>>>> Rite now the problem is when i add "Items" in invoice using product
>>>>>>
>>>>> id
>>>
>>>> the added items do not pick the correct price. As a result (i feel)
>>>>>>
>>>>> "Add
>>>>
>>>>> taxes" is
>>>>>> also calculating taxes on 0 .(=0)
>>>>>>
>>>>>>
>>>>>> regds
>>>>>> mallah.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Aug 30, 2017 at 2:34 PM, Deepak Nigam <
>>>>>> [hidden email]> wrote:
>>>>>>
>>>>>> Hi Rajesh,
>>>>>>>
>>>>>>> Most of the mentioned requirements can be fulfilled by setting up
>>>>>>>
>>>>>> data
>>>>
>>>>> in
>>>>>
>>>>>> entities like TaxAuthorityCategory and TaxAuthorityRateProduct, as
>>>>>>>
>>>>>> the
>>>>
>>>>> OFBiz tax engine internally uses data from these entities to
>>>>>>>
>>>>>> perform
>>>
>>>> tax
>>>>>
>>>>>> calculations.
>>>>>>>
>>>>>>> Please refer to the following set of demo data. It can help you.
>>>>>>>
>>>>>>> <Party partyId="IGST" partyTypeId="PARTY_GROUP"/>
>>>>>>> <PartyGroup partyId="IGST" groupName="Integrated Goods and Services
>>>>>>>
>>>>>> Tax"/>
>>>>>>
>>>>>>> <PartyRole partyId="IGST" roleTypeId="TAX_AUTHORITY"/>
>>>>>>>
>>>>>>> <TaxAuthority taxAuthGeoId="_NA_" taxAuthPartyId="IGST"
>>>>>>> taxIdFormatPattern="\d{2}[A-Z]{5}\d{4}[A-Z]\d[A-z]\d"/>
>>>>>>>
>>>>>>> <ProductCategory productCategoryId="TAX_SLAB_1"
>>>>>>> productCategoryTypeId="TAX_CATEGORY" description="5.00 %"
>>>>>>> categoryName="5.00 %"/><TaxAuthorityCategory taxAuthGeoId="_NA_"
>>>>>>> taxAuthPartyId="IGST" productCategoryId="TAX_SLAB_1"/>
>>>>>>>
>>>>>>> <ProductCategory productCategoryId="TAX_SLAB_2"
>>>>>>> productCategoryTypeId="TAX_CATEGORY" description="10.00 %"
>>>>>>> categoryName="10.00 %"/><TaxAuthorityCategory taxAuthGeoId="_NA_"
>>>>>>> taxAuthPartyId="IGST" productCategoryId="TAX_SLAB_2"/>
>>>>>>>
>>>>>>> <Product productId="ACE_PARA_TAB" primaryProductCategoryId="
>>>>>>>
>>>>>> ANALGESIC"
>>>>
>>>>> productTypeId="FINISHED_GOOD" productName="Aceclofenac Tab"
>>>>>>> internalName="Aceclofenac + Paracetamol (100 mg + 325mg) Tab"
>>>>>>> weightUomId="WT_kg" productWeight="0.01" description="Aceclofenac +
>>>>>>> Paracetamol (100 mg + 325mg) Tab" isVirtual="N" isVariant="N"
>>>>>>> billOfMaterialLevel="0" quantityIncluded="10"
>>>>>>> introductionDate="2001-01-01 12:00:00.000"/>
>>>>>>> <ProductCategoryMember productCategoryId="TAX_SLAB_1"
>>>>>>> productId="ACE_PARA_TAB" fromDate="2001-01-01 12:00:00.000"/>
>>>>>>>
>>>>>>> <Product productId="ACE_PARA_TAB2"
>>>>>>> primaryProductCategoryId="ANALGESIC" productTypeId="FINISHED_GOOD"
>>>>>>> productName="Aceclofenac Tab 2" internalName="Aceclofenac +
>>>>>>> Paracetamol (100 mg + 325mg) Tab 2" weightUomId="WT_kg"
>>>>>>> productWeight="0.01" description="Aceclofenac + Paracetamol (100
>>>>>>>
>>>>>> mg +
>>>
>>>> 325mg) Tab 2" isVirtual="N" isVariant="N" billOfMaterialLevel="0"
>>>>>>> quantityIncluded="10" introductionDate="2001-01-01 12:00:00.000"/>
>>>>>>> <ProductCategoryMember productCategoryId="TAX_SLAB_2"
>>>>>>> productId="ACE_PARA_TAB2" fromDate="2001-01-01 12:00:00.000"/>
>>>>>>>
>>>>>>> <TaxAuthorityRateProduct taxAuthorityRateSeqId="9001"
>>>>>>>
>>>>>> fromDate="2017-06-01
>>>>>>
>>>>>>> 00:00:00.000" productCategoryId="TAX_SLAB_1" taxAuthGeoId="_NA_"
>>>>>>> taxAuthPartyId="IGST" taxAuthorityRateTypeId="IGST"
>>>>>>>
>>>>>> taxPercentage="5.00"
>>>>>
>>>>>> taxPromotions="N" taxShipping="N" description="IGST - Integrated
>>>>>>>
>>>>>> Goods
>>>>
>>>>> and
>>>>>>
>>>>>>> Services Tax"/>
>>>>>>> <TaxAuthorityRateProduct taxAuthorityRateSeqId="9002"
>>>>>>>
>>>>>> fromDate="2017-06-01
>>>>>>
>>>>>>> 00:00:00.000" productCategoryId="TAX_SLAB_2" taxAuthGeoId="_NA_"
>>>>>>> taxAuthPartyId="IGST" taxAuthorityRateTypeId="IGST"
>>>>>>>
>>>>>> taxPercentage="10.00"
>>>>>
>>>>>> taxPromotions="N" taxShipping="N" description="IGST - Integrated
>>>>>>>
>>>>>> Goods
>>>>
>>>>> and
>>>>>>
>>>>>>> Services Tax"/>
>>>>>>>
>>>>>>>
>>>>>>> Please revert in case of any doubt.
>>>>>>>
>>>>>>> HTH!
>>>>>>>
>>>>>>>
>>>>>>> Thanks & Regards
>>>>>>> --
>>>>>>> Deepak Nigam
>>>>>>> Technical Consultant/Team Lead
>>>>>>> HotWax Systems
>>>>>>> www.hotwaxsystems.com
>>>>>>>
>>>>>>> On Wed, Aug 30, 2017 at 2:02 PM, Rajesh Mallah <
>>>>>>>
>>>>>> [hidden email]>
>>>>>
>>>>>> wrote:
>>>>>>>
>>>>>>> Thanks ,  Paul's reply did help , and I saw taxes getting
>>>>>>>> automatically added  after the product was  included  in
>>>>>>>> a extra category of type *Tax* . I named to the category
>>>>>>>> as "Taxable Products" for time being (as suggested).
>>>>>>>>
>>>>>>>> regds
>>>>>>>> mallah.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Aug 30, 2017 at 1:56 PM, Jacques Le Roux <
>>>>>>>> [hidden email]> wrote:
>>>>>>>>
>>>>>>>> You are doing very well comparing to some others ;)
>>>>>>>>>
>>>>>>>>> Jacques
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Le 30/08/2017 à 09:36, Rajesh Mallah a écrit :
>>>>>>>>>
>>>>>>>>> thanks.
>>>>>>>>>>
>>>>>>>>>> I hope i finally reach the mundane state soon.
>>>>>>>>>>
>>>>>>>>>> regds
>>>>>>>>>> mallah.
>>>>>>>>>>
>>>>>>>>>> On Wed, Aug 30, 2017 at 1:03 PM, Jacques Le Roux <
>>>>>>>>>> [hidden email]> wrote:
>>>>>>>>>>
>>>>>>>>>> This http://markmail.org/message/esl5ou2zo4x2lt3l :D
>>>>>>>>>>
>>>>>>>>>>> You should do more research in the ML archives ;)
>>>>>>>>>>>
>>>>>>>>>>> Jacques
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Le 30/08/2017 à 08:22, Rajesh Mallah a écrit :
>>>>>>>>>>>
>>>>>>>>>>> Hi ,
>>>>>>>>>>>
>>>>>>>>>>>> Can someone point me to a useful documentation on setting up
>>>>>>>>>>>>
>>>>>>>>>>> taxation.
>>>>>>>
>>>>>>>> Expectations :
>>>>>>>>>>>>
>>>>>>>>>>>> (1) tax % should be allowed to be specified at a product /
>>>>>>>>>>>>
>>>>>>>>>>> product
>>>>>
>>>>>>         category level and indicate  the tax authority
>>>>>>>>>>>>
>>>>>>>>>>>> (2) There can be multiple kind of taxes having various
>>>>>>>>>>>>
>>>>>>>>>>> rates .
>>>
>>>> (3) When we order the product from eCommerce storefront then
>>>>>>>>>>>>
>>>>>>>>>>> the
>>>>
>>>>>          end user is shown the total price including the tax.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> (4) when we create an invoice for an internally created
>>>>>>>>>>>>
>>>>>>>>>>> order
>>>
>>>> (non-eCommerce)
>>>>>>>>>>>>          the tax amount should automatically get added to
>>>>>>>>>>>>
>>>>>>>>>>> invoice.
>>>>>
>>>>>> Kindly indicate the best documentation that may help in
>>>>>>>>>>>>
>>>>>>>>>>> setting
>>>>
>>>>> the
>>>>>>
>>>>>>> above.
>>>>>>>>>>>>
>>>>>>>>>>>> regds
>>>>>>>>>>>> mallah.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: setting up TAX in ofbiz

Rajesh Mallah
@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.
Reply | Threaded
Open this post in threaded view
|

Re: setting up TAX in ofbiz

Rajesh Mallah
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.
>
Reply | Threaded
Open this post in threaded view
|

Re: setting up TAX in ofbiz

Arun Patidar-2
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.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: setting up TAX in ofbiz

Rajesh Mallah
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.
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: setting up TAX in ofbiz

Rajesh Mallah
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.
>> > >
>> >
>>
>
>
12