Change to 'UpdateUnitPrice' Function in Sales Line Table

headley27headley27 Member Posts: 188
In Table 37 (Sales Line), I am looking to make a change but I just want to make sure that it will not cause any adverse effects.

In Function 'UpdateUnitPrice(CalledByFieldNo : Integer)' the following code exists (I believe that it is standard Navision code):
PriceCalcMgt.FindSalesLineLineDisc(SalesHeader,Rec);
PriceCalcMgt.FindSalesLinePrice(SalesHeader,Rec,CalledByFieldNo);

I would like to change it to:
IF Quantity = 0 THEN BEGIN
  "Unit Price" := 0;
END ELSE BEGIN
  PriceCalcMgt.FindSalesLineLineDisc(SalesHeader,Rec);
  PriceCalcMgt.FindSalesLinePrice(SalesHeader,Rec,CalledByFieldNo);
END;

Essentially, I would like no price to be calculated for Sales Lines until a quantity is entered.

Any comments would be greatly appreciated.

Thank you.

Comments

  • ritesh.singhritesh.singh Member Posts: 123
    Make sure you call "No."-Validate from "Qty."-Validate
    Thanks,
    Ritesh K Singh
  • headley27headley27 Member Posts: 188
    Make sure you call "No."-Validate from "Qty."-Validate

    Thank you.

    Why is that?
  • ritesh.singhritesh.singh Member Posts: 123
    So that the originality of the code remains same.
    Thanks,
    Ritesh K Singh
Sign In or Register to comment.