The InvoiceRequest object represents the customer’s request to be billed for a purchase. It implements the PaymentGroup interface and extends atg.commerce.order.PaymentGroupImpl. In addition to the usual payment group fields, InvoiceRequest holds a purchase order number and a billing address, which are mandatory, and can also include the user’s preferred invoice format and delivery mode, the payment due date, and the payment terms.

Use the atg..order.purchase.CreateInvoiceRequestFormHandler class to create an InvoiceRequest payment group. This form handler has only one implemented method, handleNewInvoiceRequest(). It also includes empty preCreateInvoiceRequest() and postCreateInvoiceRequest() methods for you to extend if your sites require.

Property

Description

invoiceRequestType

Indicates the type of PaymentGroup to create.

AddToContainer

Boolean property that determines whether to add the InvoiceRequest to the PaymentGroupMapContainer and make it the default payment group for the invoice.

container

The PaymentGroupMapContainer to which the InvoiceRequest is added.

invoiceRequest

A reference to a new InvoiceRequest. JSP forms can edit its properties directly.

billingAddressPropertyName

The name of the Profile that holds the user’s billing address.

invoiceRequestProperties

Maps InvoiceRequest property names to profile property paths. The form handler determines the values for each profile property and sets them on the given InvoiceRequest property.

HandleNewInvoiceRequest() uses GetBillingAddressPropertyName() to check the user’s profile for a business address. If one is found, it becomes the InvoiceRequest’s billingAddress as well. Then getInvoiceRequestPropertiesMap() copies over the specified information from the user’s contract, if one exists, to the InvoiceRequest. See the Using Requisitions and Contracts chapter for more information on these properties.

The InvoiceRequestInfo object includes the above information and adds references to the Order and PaymentGroup to be used when the invoice is paid.

Invoice validation is done as part of the ValidateForCheckout pipeline chain; see Appendix F, Pipeline Chains for more information on this chain. It ensures that the PaymentGroup contains a valid billing address. Optionally, it verifies that the poNumber property is not empty. This is optional so you can configure your sites to offer payment by invoice without requiring a purchase at the time the invoice is created.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices