I have Nav 4.0. My problem is:
Unit Cost on the item card gets corrupt as a result of unknown effects. To prevent positive adjustments from using the unit cost when it will be adjusted back, I want to add tolerance checking to posting. When Sales Returns or Credit Memos are posted, or Positive cost against Item Standard cost +/_ 10% (just error out and send a message to user to change the unitcost and do not post and roll back). If the cost is outside of tolerance error out.
I figured out that the check for tolerance code needs to be in Code Unit 80 for starters. The problem is where.
0
Answers
The first loop in the OnRun trigger... I don't know if we can be more specific since there might be a part of code for the localization that we don't have...
I followed the CU80 to the first line and got into CU21 Item Jnl.-Check Line processing on Table 83 (this catches all positive adjustments and added it to RunCheck routine). So I checked for entry type # purchase; entrytype = sales and quantity = +; et= positive adj and + quantity and et = transfer and + quantity. I think that covers all necessary cases.
When your calculating your formula simply add:
InvtSetup.GET;
and change your "10" to "Tolerance Percent" in the formula.
This will allow you to adjust the amount in the future if needed without having to go find the code & change it everytime right from the Invsetup form.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Thanks for all your help