Purch. Invoice Lines control Direct Unit Cost modified.

xenosxenos Posts: 14Member
Hi guys.

I'm trying to figure out, how to NOT reset Direct Unit Cost and Unit Cost on Purch. Lines when I modify "No.".
So we're on Purch. Invoice Subform (55) and we have a line like so:
g3ksc9l2njpj.png
Now when I Change No. the "Direct Unit Cost EXCL. VAT" and "Line Amount Excl. VAT" is blanked out.
I want this to stop and I'm really having a hard time finding out where to change the code.
I've been debugging and debugging but have not found the spot where to change the code.
The only thing I did which had any effect was to comment out Curr.SAVERECORD; from
RedistributeTotalsOnAfterValidate(). But his doesn't seem right - and when doing this I'm unable to update Direct unit cost and Line Amount.

Can anyone tell what to modify so "Description", "Direct Unit Cost EXCL? VAT" and "Line Amount Excl. VAT" is NOT updated when I change "No."?

Best Answers

  • xenosxenos Posts: 14
    Accepted Answer
    Solution: On the Table 39 PurchLine, on the "No." OnValidateTrigger you set fx Description := TempPurchLines.Description and the same for the Direct Unit Cost Excl. VAT.

Answers

  • KishormKishorm Posts: 906Member
    Have a look at the OnValidate() trigger of the "No." field of the "Purchase Line" table
  • xenosxenos Posts: 14Member
    Yes, I've on all relevant Validation triggers.
    As none of them really explains where the update of the description, "Direct Unit Cost EXCL? VAT" and "Line Amount Excl. VAT" happens, I was wondering if anyone knows where this is done.
    If anyone has experience with this please help :D
  • xenosxenos Posts: 14Member
    I've written a solution which works in such a way, that it will update the Price the first time you choose a number. I think the picture you've posted would stop the validation altogether.
    And that works too :D So I will mark that this post answered my question, thx :)
Sign In or Register to comment.