Please follow series of screenshots of source code with explanation:
Source code explanation: (1.1)
- Initialization of table buffers.
- Get purchase order table.
- Get purchase order lines.
- Get vendor table.
Source code explanation: (1.2)
- Insert data in VendInvoiceInfoTable table.
- This table contains the vendor invoices for one or more purchase orders.
- Assignment of values.
Source code explanation: (1.3)
- Insert data in VendInvoiceInfoSubTable table.
- This table contains the associations between the vendor invoices and the purchase orders.
- Assignment of values.
Source code explanation: (1.4)
- Insert data in VendInvoiceInfoLine table.
- This table contains vendor invoice lines for a specific purchase order.
- Assignment of values.
Source code explanation: (1.5)
- Insert data in VendInvoiceInfoSubLine table.
- This table contains associations between the vendor invoice lines and the posted vendor packing slips.
- Assignment of values.
That is all you need to do for creating pending vendor invoice through X++ code.

Like
Report




*This post is locked for comments