Methods: PurchaseInvoice

ConfirmLineInvoice

Driver Type: SASI

Use this method to confirm one or more purchase invoice lines. If no line numbers are specified in the payload, the entire invoice, including all lines, is confirmed.

PurchaseInvoiceReference is mandatory. If the PurchaseInvoiceLine section is included in the payload, it must contain UserLineNumber or PurchaseInvoiceLineNumber. If both are provided, UserLineNumber is used.

CreateOrAmend

Driver Type: SASI

Use this method to create or amend one or more purchase invoices. A purchase invoice is created if it does not exist and amends it if it does.

Remarque: If amending a purchase invoice, PurchaseInvoiceReference must be provided. If PurchaseInvoiceReference is specified in the payload, but there is no existing invoice with this reference, then a new invoice is created. However, the new invoice may have a different transaction reference, depending on the transaction type used, i.e. if the associated transaction reference format does not contain any items for a user to specify, then the purchase invoice reference will be system generated, and the existing payload values are not used.

CreateOrAmendAndConfirm

Driver Type: SASI

Use this method to create or amend, and confirm, one or more purchase invoices. A purchase invoice is created if it does not exist and amended it if it does. It then confirms the invoice.

Remarque: If amending a purchase invoice, PurchaseInvoiceReference must be provided. If PurchaseInvoiceReference is specified in the payload, but there is no existing invoice with this reference, then a new invoice is created. However, the new invoice may have a different transaction reference, depending on the transaction type used, i.e. if the associated transaction reference format does not contain any items for a user to specify, then the purchase invoice reference will be system generated, and the existing payload values are not used.

DeleteLineInvoice

Driver Type: SASI

Use this method to delete one or more purchase invoice lines. If no line numbers are specified in the payload, the entire invoice including all lines is deleted.

PurchaseInvoiceReference is mandatory. If the PurchaseInvoiceLine section is included in the payload, it must contain UserLineNumber or PurchaseInvoiceLineNumber. If both are provided, UserLineNumber is used.

DeleteLines

Driver Type: SASI

Use this method to delete specific lines from a purchase invoice.

PurchaseInvoiceReference is mandatory and either UserLineNumber or PurchaseInvoiceLineNumber must be specified. If both are provided, UserLineNumber is used.

DeleteWholeInvoice

Driver Type: SASI

Use this method to delete a purchase invoice and all lines.

PurchaseInvoiceReference is mandatory.

HoldLineInvoice

Driver Type: SASI

Use this method to hold one or more purchase invoice lines. If no line numbers are specified in the payload, the entire invoice including all lines is held.

PurchaseInvoiceReference is mandatory. If the PurchaseInvoiceLine section is included in the payload, it must contain UserLineNumber or PurchaseInvoiceLineNumber. If both are provided, UserLineNumber is used.

Query

Driver Type: Export

Use this method to obtain purchase invoice details or to extract purchase invoice data from SunSystems.

ReleaseLineInvoice

Driver Type: SASI

Use this method to release one or more purchase invoice lines. If no line numbers are specified in the payload, the entire invoice including all lines is released.

PurchaseInvoiceReference is mandatory. If the PurchaseInvoiceLine section is included in the payload, it must contain UserLineNumber or PurchaseInvoiceLineNumber. If both are provided, UserLineNumber is used.

GenerateAndMatch

Driver Type: SASI

Use this method to generate purchase invoices per suppliers. It then matches invoices back to purchase orders.

If you want to create a purchase invoice for one purchase order, you need to set POReferenceFrom and POReferenceTo to the order reference. If the From/To values are not supplied, it will be interpreted as the first/last order reference satisfying the other selection criteria. This might cause failures if the order range goes across different supplier codes.

An order range can be specified, in which case all of the orders in the range go to one purchase invoice. This order range must be for the same supplier code.

One payload can contain orders for multiple suppliers. The selection criteria for each supplier must be within a new <Input> node.

The following example shows a simple version of this part of the payload:

<SSC>
		<SunSystemsContext>
				<BusinessUnit></BusinessUnit>
		</SunSystemsContext>
		<Payload>
				<Input>
						<POReferenceFrom></POReferenceFrom>
						<POReferenceTo></POReferenceTo>
						<PurchaseTransactionType></PurchaseTransactionType>
						<SupplierCode></SupplierCode>
				</Input>
				<Input>
						<POReferenceFrom></POReferenceFrom>
						<POReferenceTo></POReferenceTo>
						<PurchaseTransactionType></PurchaseTransactionType>
						<SupplierCode></SupplierCode>
				</Input>
		</Payload>
</SSC>
Remarque: The match action happens at the order level; not line level.