Jeff Dhaene
Active Member
Hi, I am going to give a full explanation of my problem, hopefully someone can help me out, I don’t think it’s going to be a very complicated solution.
I am calling NER in a report which calls the “TaxCalculator” business function (B4001090). I’ve passed in the exact same values in the parameters that is passed in when applications call it. However my tax amount comes back rounded.
I have done lots of digging to find the root cause which I will explain. When im running in debug and I enter in the NER, all numeric variables like mnAmtTax have in values such as String being the actual value, szCurrency being the currency, nCurrencyDecimal etc.
All my variables have szCurrency as blank when I call my report that calls this BF. When I call this BF using an application it seems that my currency is tied to the variables, it says szCurrency=’CAD ‘ and nCurrencyDecimal=2
Am I suppose to call some system or business function so I can get this set? I haven’t had any problems before with this however this specific BF calls CalculateValidateTaxAmounts which will eventuall call an internal function (IDXX00026_GetDecimals) which gets the decimal positions for the currency, and in this case since the currency is blank, it returns 0. This causes my tax to get truncated.
I realize in the BF there is a variable that is called mnUnroundedTaxAmt, but to me that doesn’t seem like it’s the right one to use. Some how my BF needs to get visibility that the currency code is ‘CAD’ which is our default currency.
Ive thought about adding a blank currency with decimals = 2 but for one, this isn’t more of a work around and for two, I can’t add blank currency.
I thought about just using the mnUnroundedTaxAmt but then that’s not rounded properly and is once again more of a work around.
I hope someone can tell me the proper solution to get this to work, Ive been testing calling my NER in a report but in the end It will be called via INTEROP and is crucial to get our pricing working properly.
Anyone have any thoughts? I can provide any information you would like that you might find useful to help me out. I have done a fair amount of programming in JDE and have a very good understanding for the most part how everything woks, however this one im clued out on.
Thanks for your help
Jeff
I am calling NER in a report which calls the “TaxCalculator” business function (B4001090). I’ve passed in the exact same values in the parameters that is passed in when applications call it. However my tax amount comes back rounded.
I have done lots of digging to find the root cause which I will explain. When im running in debug and I enter in the NER, all numeric variables like mnAmtTax have in values such as String being the actual value, szCurrency being the currency, nCurrencyDecimal etc.
All my variables have szCurrency as blank when I call my report that calls this BF. When I call this BF using an application it seems that my currency is tied to the variables, it says szCurrency=’CAD ‘ and nCurrencyDecimal=2
Am I suppose to call some system or business function so I can get this set? I haven’t had any problems before with this however this specific BF calls CalculateValidateTaxAmounts which will eventuall call an internal function (IDXX00026_GetDecimals) which gets the decimal positions for the currency, and in this case since the currency is blank, it returns 0. This causes my tax to get truncated.
I realize in the BF there is a variable that is called mnUnroundedTaxAmt, but to me that doesn’t seem like it’s the right one to use. Some how my BF needs to get visibility that the currency code is ‘CAD’ which is our default currency.
Ive thought about adding a blank currency with decimals = 2 but for one, this isn’t more of a work around and for two, I can’t add blank currency.
I thought about just using the mnUnroundedTaxAmt but then that’s not rounded properly and is once again more of a work around.
I hope someone can tell me the proper solution to get this to work, Ive been testing calling my NER in a report but in the end It will be called via INTEROP and is crucial to get our pricing working properly.
Anyone have any thoughts? I can provide any information you would like that you might find useful to help me out. I have done a fair amount of programming in JDE and have a very good understanding for the most part how everything woks, however this one im clued out on.
Thanks for your help
Jeff