SCM API Developer's Reference
|
scmc.AccountPayableVouchersServiceglobal with sharing class AccountPayableVouchersService A service to provide accounts payable voucher functionality. Methods
matchglobal static void match(Set<Id> accountPayableVoucherIds) This service updates the accounts payable voucher status to "Matched" and if all of the line items on the purchase order have been received, the purchase order status is updated to "Closed". For internal purchase orders the received quantity and amount vouchered are updated as appropriate during the match process. The received quantity and amount vouchered is not updated on drop ship purchase orders. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only, it is not intended for //use in a production environment, is not guaranteed against defects or errors and //is in no way optimized or streamlined. Set<Id> accountPayableVoucherIds = new Set<Id>{'a069E0000004NBO'}; AccountPayableVouchersService.match(accountPayableVoucherIds); receiveglobal static void receive(Set<Id> accountPayableVoucherIds) The receive method is only valid for drop ship purchase orders that are associated with a sales order. Drop ship orders are not delivered to the warehouse but are instead be delivered to a customer or a supplier site and therefore cannot have a receipt issued. This method updates the accounts payable voucher status to "Received" and if all of the line items on the purchase order have been received, the purchase order status is updated to "Closed". The sales order associated with the purchase order is also adjusted as appropriate, for instance if new lines are added to the AP voucher that were not on the original purchase order, then these lines will be added to the sales order. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only, it is not intended for //use in a production environment, is not guaranteed against defects or errors and //is in no way optimized or streamlined. Set<Id> accountPayableVoucherIds = new Set<Id>{'a069E0000004NBO'}; AccountPayableVouchersService.receive(accountPayableVoucherIds); |