Purch. Invoice Lines control Direct Unit Cost modified.

xenosxenos Member Posts: 16
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 Member Posts: 16
    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 Member Posts: 921
    Have a look at the OnValidate() trigger of the "No." field of the "Purchase Line" table
  • xenosxenos Member Posts: 16
    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 Member Posts: 16
    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.
  • xenosxenos Member Posts: 16
    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.