Kennymen
28th March 2014, 09:33
Hello!

I have been looking for the answer here on the forum, but seems I'm the only one that got this problem.
We tried to compute the price for items on some "special" offers outside of Baan (ERPLN). At the beginning the sales got the price from our "calculator" and had to input the given price manually. Then we tried to insert the right price directly to db line. Everything seemed fine, but we cannot get the "total amount" to work as it should.
When I update the price changes are visible line per line, but the total amount doesn't update with it.
How to execute a "total amount" update, that would correct this field.
I could update this value while updating the line price but I'm not sure if this is right - I'd rather use an integrated update functionality if exists.

Hope I was clear enough, for example:
I have 3 lines:
- Item 1: 34,03 €
- Item 2: 33,07 €
- Item 3: 20,10 €
The total amount was at first 67,10 € because the 3rd item was 0,00 €, then we calculated the price of 3rd item "outside" of Baan which set the Item 3 price (tdsls101.amta) to 20,10 € but the total amount remained the same. I set the price of item 3 back to 0,00 € (via Baan) and the total amount changed to 47,00 €. So I got a complete mess. :)
Any help?

BR, Kenny

bhushanchanda
28th March 2014, 10:28
Hi,

I guess the total amounts wont be updated if you are updating the records using db.* functions. You will need to call a related DLL or use an AFS or if its hanlded by DAL use that to refresh the value.

Kennymen
28th March 2014, 11:17
Hi,

At the beginning the prices were updated outside Baan via db.
I've managed to port the calculation in Baan and use DAL. It works fine, the problem is for about 20-40 offers (made with the "old" method outside baan) that have wrong prices now, because they were "injected".
So I would like to correct those values. If change any value inside the offer the total amount updates, but the amount that was "injected" is not taken in, so the total amount updates just for "changes". Fe. if I had a Item, that had the price of 0.00 (total also 0.00), ran the calculator that changed the price to 20.10 (total remains 0.00), now I change the price manually to 10.10 and the total goes to -10.00. In short, all differences are counting, only the injected value was not and now we got a mess. :)

BR, Kenny

bhushanchanda
28th March 2014, 11:41
Hi,

In that case, it would be good idea to be into Baan and calculate all those total amounts for those orders. Its the best time to do it when you don't have a lot of erroneous orders. You can build a simple utility to that job for you.

Kennymen
28th March 2014, 12:00
Hi,

that's my plan B. :) I was just wondering if there is any "tool" inside Baan that would run "recalculation" and correct the values so I don't have to write it by myself. :)
These are sales offers, that are bugging me and not all of them but only about 20-40 of them, that suffered because of the "external calculator".
I'm gonna write a utility, that check the amounts by tdsls101 and sums them + check the value of corresponding tdsls100, if they are not the same -> update tdsls100 and that's it.
Should I expect any troubles because of "manual" correction of amounts on "higher" levels, like I got now from rows to order?

BR, David

bhushanchanda
28th March 2014, 12:10
Hi,

It will be better if you use a standard DLL to do it. You just need to figure out which DLL is used. That will perform the additional checks during updation and prevent other problems.