I create Invoice by call graph, I want my invoice does not apply discount. Do we have tips to do that by code?
Thank everyone.
usually we call base method for UI but not for import, please look at the next approach
public class SOOrderEntryExtension : PXGraphExtension<SOOrderEntry>
{
[PXOverride]
public virtual void RecalculateDiscounts(PXCache sender, SOLine line, Action<PXCache, SOLine> del)
{
if (!Base.IsImport) del(sender, line);
}
}
TRY [Not tested]
The following code in your extension will help you to disable the discount feature for the invoice screen.