MGCLatticePurchaseOrderPostingService.postPurchasePrepaymentInvoice
Posts a vendor prepayment invoice for a purchase order, the way Purchase order > Purchase > Prepayment and Invoice > Prepayment invoice do: an order without a prepayment gets the one the request describes (a percentage of the order total or a fixed amount, posted with a procurement category; PurchPrepayTable), and the prepayment amount still available to invoice is posted as a vendor invoice of type VendorAdvance under the vendor's invoice number. The prepayment and the invoice are created and posted in one transaction, so a failed posting leaves neither behind.
- HTTP method:
POST - Route:
/api/services/MGCLatticeAccountsPayableServiceGroup/MGCLatticePurchaseOrderPostingService/postPurchasePrepaymentInvoice - Service class:
MGCLatticePurchaseOrderPostingService
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
_request | MGCLatticePurchasePrepaymentInvoiceRequestContract | No | The request containing PurchaseOrderId (or PurchaseOrderIdExternalKey), VendorInvoiceNumber, PrepaymentPercent or PrepaymentAmount and PrepaymentCategoryName (for an order without a prepayment), optional PrepaymentCategoryHierarchyName, PrepaymentDescription, InvoiceDate and PostingDate, and standard header fields. |
Returns
MGCLatticeOrderOperationResponseContract
An MGCLatticeOrderOperationResponseContract: DocumentId is the purchase order and PostedDocumentId the voucher of the posted prepayment invoice (VendInvoiceJour.LedgerVoucher); the message names the invoice number and amount.
Security
- Requires privilege
MGCLatticeAccountsPayableServiceMaintain