Issue with the unit_price on the SO screen
We have a custom logic which is attached to the PRICING ATTRIBUTE. The custom logic calls pricing engine to calculate the price and returns the price as the output. When we enter the SO line with the item where the item category is mapped to the formula using the attribute , the moment we enter quantity and tab it shows price but on saving the price becomes 0 .
The issue is because the pricing engine is being called twice . when I hardcode a value within the function referred in the PRICING ATTRIBUTE , the unit_price gets populated and on saving the price remains as it is . I have used PRAGMA AUTONOMOUS TRANSACTION in my code to keep the session separate else 2 call to the pricing engine is giving error.