Develop > Controller layer > Application developer > Business relationship assets
Set the invoice format
The format of invoices is defined in an optional business policy called InvoiceFormat, enforced by the Invoice task command.
To set the format for generated invoices, import the account XML from a file, using the AccountImport command.
The InvoiceFormat policy can be used to specify the layout of invoices to be e-mailed to a buyer contact by using the viewName property. The viewName property specifies the name of the view in the struts configuration which specifies the JSP page used to generate the content of the e-mail. A sample Invoice.jsp file is located in the WebSphere Commerce development environment toolkit, in the WCDE_INSTALL/samples/web/Payment directory.
To use this sample JSP, copy it from the preceding listed directory to the JSP root directory, WCDE_INSTALL/workspace/Stores/WebContent directory. The InvoiceView is registered for the site by default to refer to this JSP file.
A default viewName of InvoiceView is specified for the invoice MessageType in the MSGTYPES table. In the absence of an InvoiceFormat policy in the account's invoice terms and conditions, this default viewName is used to locate the JSP and generate the invoice.
A default InvoiceFormat policy is also included for the default store group with a Store Entity ID of -1. This default policy also specifies the viewName=InvoiceView in the properties field. You can change this field to specify any view that you have created in the struts configuration.