I have a customer that would like the estimated margin amount on the sales order to show a value even if the unit cost is zero, i.e. 100%. I have located the formula in the SO/GraphExtensions/SOOrderEntryExt/Margin.cs code file. That code appears to be an override of the existing DAC attributes of the field. Is it possible to override this from a customization project or is there another approach that should be used?
Code from Margin.cs:
[PXMergeAttributes]
[PXFormula(typeof(Switch<
Case<
Where<
SOLine.curyExtCost.IsEqual<decimal0>
.Or<SOLine.behavior.IsEqual<SOBehavior.tR>>
.Or<SOLine.pOCreate.IsEqual<True>.And<SOLine.pOSource.IsIn<INReplenishmentSource.dropShipToOrder, INReplenishmentSource.blanketDropShipToOrder>>>>,
Null,
Case<
Where<
SOLine.curyExtPrice.IsEqual<decimal0>>,
decimal0>>,
SOLine.curyNetSales
.Subtract<SOLine.curyExtCost
.Multiply<int_1.When<SOLine.invtMult.IsEqual<short0>>.Else<SOLine.invtMult>>
.Multiply<int_1>>>))]
[PXUnboundFormula(typeof(int1
.When<SOLine.behavior.IsNotEqual<SOBehavior.tR>
.And<SOLine.curyUnitCost.IsEqual<decimal0>
.Or<SOLine.pOCreate.IsEqual<True>.And<SOLine.pOSource.IsIn<INReplenishmentSource.dropShipToOrder, INReplenishmentSource.blanketDropShipToOrder>>>>>
.Else<int0>), typeof(SumCalc<SOOrder.noMarginLineCntr>))]
protected virtual void _(Events.CacheAttached<SOLine.curyMarginAmt> e) { }