Hi Team,
The user is facing an issue while creating a sales order. The sales order is created with **calculate_price_flag = 'P'**. However, the manual discount is being applied twice at the line level.
We reviewed the price adjustments and found that the discount entries are marked with **automatic_flag = 'N'**, indicating that they were applied as manual discounts.
We attempted to replicate the issue in the lower instance, but we were unable to reproduce it. The issue does not occur in the lower environment.
To further investigate, we added debug statements and traced the pricing flow. However, we could not identify where the duplicate discount is being applied. We are unsure whether a child process, background program, workflow, or any custom logic is triggering the discount again.
Has anyone encountered a similar issue before or have any suggestions on how to identify the source of the duplicate discount? Any guidance would be greatly appreciated.
Thanks !