Modify field in Purchase Order

mjcjykmjcjyk Member Posts: 2
We have a lot of old purchase orders that we need to invoice. They have all been received in. Each time you go and invoice the PO it requires a Vendor Invoice No.. I am trying to create a report that we can run and have it add the vendor invoice no into each PO and auto increment the no. I was able to get it to add a vendor invoice no but can't get to increment the number for each new PO that we need to invoice. Is there a way to do this? I have set an integer (VendInvNo)


VendInvNo := 10000;
IF ("Vendor Invoice No." = '') THEN BEGIN
PurchHdr.RESET;
PurchHdr.SETRANGE("No.","Vendor Invoice No.");
IF PurchHdr.FINDFIRST THEN BEGIN
"Vendor Invoice No." := PurchHdr."Vendor Invoice No.";
VendInvNo := VendInvNo + 1;
MODIFY;

END;

END;

Thank you in advance.

Best Answer

Answers

  • vivek4121vivek4121 Member Posts: 165
    Agreed with Slawek
Sign In or Register to comment.