Setting 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, you must 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 through the viewName property. The viewName property specifies the name of a view in the VIEWREG table which specifies the JSP page used to generate the content of the e-mail. A sample Invoice.jsp file is located in the WC_installdir/samples/web/Payment directory.

To use this sample JSP, you must copy it from the above listed directory to your WebServer document root. 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 VIEWREG table.