Modify field in Purchase Order

mjcjyk
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.
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.
0
Best Answer
-
Vendor Invoice No is supposed to record the actual invoice number. What if your vendor invoices arrive in different order?
If you don't care about the real vendor invoice numbers just untick Ext. Doc. No Mandatory in Purchase & Payables Setup, and don't put anyting in it.
SlawekSlawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-036
Answers
-
Vendor Invoice No is supposed to record the actual invoice number. What if your vendor invoices arrive in different order?
If you don't care about the real vendor invoice numbers just untick Ext. Doc. No Mandatory in Purchase & Payables Setup, and don't put anyting in it.
SlawekSlawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-036 -
Agreed with Slawek0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions