Invoice Tab
A PDF invoice consisting of one or more pages, which includes the billing address, shipping address, a list of the order items and the total order value, can be generated automatically for all orders. The shopper receives an e-mail notification when the order is shipped, with a link to the order details page where the invoice can be downloaded via a link in the top right corner. The invoice is available when all the order items have been shipped.
Figure 7.65: A default invoice layout (A4)
|
|
1 Header (with rounded corners) 2 Order items table 3 Totals |
On the Invoice tab you can specify whether you want invoices to be generated or not, and whether the default invoice format is to be used or a customized format:
Generate Invoice
•Never: No invoices are generated.
•When billable to user: An invoice is only generated if the user actually has to pay for the order, not the user’s company.
•Always: An invoice is generated for all orders.
PDF Invoice Layout
•A4 Size Default Layout: A4 size invoices are generated based on a default template that uses your logo and the color scheme you specified for your storefront; you can fine-tune some of the default settings .
•Letter Size Default Layout: The same as the previous option but with Letter paper size.
•Custom Layout: the pages of the invoice are generated based on your PDF Form templates; these PDF Form documents use variables that retrieve the necessary information from the system in order to create the invoice.
Select an option to display the layout settings that you can set for the invoice.
Click the Invoice Preview button to see a sample invoice.
Text Form Fields
Choose a font family for all the text on the invoice. Special fonts are added for the languages Japan, Korean, Chinese-Simplified and Chinese-Traditional:
•Japanese fonts: HeiseiMin-W3, HeiseiKakuGo-W5 and KozMinPro-Regular
•Korean fonts: HYGoThic-Medium, HYSMyeongJo-Medium and HYSMyeongJoStd-Medium
•Chinese-Simplified fonts: STSong-Light and STSongStd-Light
•Chinese-Traditional fonts: MHei-Medium, MSung-Light and MSungStd-Light
Frame Form Fields
Switch rounded corners on/off for all table borders; set the border width for the header table and order items table.
Date
Choose a Short, Medium or Long date format for the invoice date.
Table Layout
Format the header, order items table and totals.
PDF Form Templates
(Only for Custom Layout) Select PDF Form documents that you want to use as templates for your invoice:
•First Page: This template is used for the first page of your invoice. The same template is used for continuing pages (e.g. if the list of order items is long) if no template has been selected for Additional Pages.
•Additional Pages: This template is used for continuing pages.
•Last Page: Use if your invoice needs to include additional information, e.g. Terms and Conditions
NOTE: Each PDF must be maximum 1 page.
How to create a Custom PDF Invoice
Custom PDF invoices are based on PDF Forms that you need to create and upload to the system. PDF Forms are interactive PDF documents that include fields that can be filled with variable data. These fields are filled automatically with data which is retrieved from the
StoreFront system. Sample documents can be found in the
StoreFront Starter Kit which you can download from
ApogeeNetwork.
Figure 7.66: PDF Form with StoreFront variables
|
Step 1: Create the invoice layout
Create the layout of your invoice in your favorite design software, e.g. Adobe InDesign, with all the static elements such as the company logo, colored panels, etc. The document will typically consist of 3 pages: the first page, the second page for all continuing pages (to accommodate long lists of order items), and the last page for static text such as the Terms & Conditions. You can use the sample documents in the Starter Kit to get started.
Step 2: Add text fields
Add form text fields for all the variable content that needs to be retrieved from the system. In InDesign, choose Window > Interactive > Buttons and Forms. Leave the text fields empty but use the
StoreFront variable codes for the text field name. This controls how the content is retrieved: for example, invoice no., invoice date, order items etc. See
“StoreFront Variables for Custom Invoices” for a list of the variables that you can use.
NOTE: You can also add the form text fields to your layout in Acrobat Pro.
Step 3: Export individual pages
When you are happy with your invoice layout, export each page of the document as individual PDFs. In InDesign, make sure you select Adobe PDF (Interactive) as file type to retain the interactive functionality of a PDF Form.
Step 4: Fine-tune the PDF Form
If any of the variables need to be right-aligned, open your PDFs in Acrobat Pro. With the Forms tool open, select the text frame that you want to right-align and set the Alignment option in the Options tab to Right. Save your PDFs.
Step 5: Upload the PDF Forms in StoreCenter
In StoreCenter, go to Stores > Invoice and select Custom Layout. In the PDF Form Templates panel, browse to your PDF Form documents to upload them to the system.
StoreFront Variables for Custom Invoices
The following variables can be used for PDF Form fields.
Variable name | Description | example |
---|
Variables on Store level |
ASF_STORE_NAME | Store Name | SunDiver |
ASF_STORE_LOGO | Store Logo - The logo will be scaled proportionally to fit in the frame. Note: see further down for modifiers | |
Page specific variables |
ASF_PAGENR | Page number of the current page | 2 |
ASF_PAGENR_NRPAGES | Combination of page number and the number of pages in the invoice | 2-7 |
General variables on Invoice level |
ASF_INVOICE_TITLE | Label | Invoice |
ASF_INVOICE_NR_TITLE | Title of Order ID | Invoice Number |
ASF_INVOICE_NR | Invoice ID | 00003 |
ASF_INVOICE_DATE_TITLE | | Invoice Date |
ASF_INVOICE_DATE | Date on which the invoice has been made. | |
ASF_CUSTOMER_REFERENCE_TITLE | Label | Customer Ref. |
ASF_CUSTOMER_REFERENCE | Reference as given by the customer | |
Variables on Billing Entity |
ASF_BILLING_TITLE | Label | Billing Address |
ASF_BILLING_COMPANY_NAME | Company Name (if applicable) | |
ASF_BILLING_ADDRESSLINE1 | | |
ASF_BILLING_ADDRESSLINE2 | | |
ASF_BILLING_ADDRESSLINES | Combines both address lines in a single variable to avoid empty lines | |
ASF_BILLING_COUNTRY | | |
ASF_BILLING_CITY | | |
ASF_BILLING_POSTALCODE | | |
ASF_BILLING_COMPANY_VAT_TITLE | Label | VAT Number |
ASF_BILLING_COMPANY_VAT | VAT Number | |
ASF_BILING_COMPANY_MIS_ID | MIS Id of Company to be billed | |
ASF_COMPANY_MIS_ID | Idem as ASF_BILING_COMPANY_MIS_ID | |
ASF_BILLING_NAME | Name of the person to be billed | |
ASF_BILLING_NAMES | Company Name, Tax Number and Person Name combined | |
ASF_BILLING_ADDRESS | Address of the person to be billed (including address, zip + city, country) | |
ASF_BILLING_NAMES_ADDRESS | Names, Tax Number and Address combined | |
ASF_BILLING_NAMES_ADDRESS_METHOD | Names, Tax Number, Address and Payment Method combined | |
ASF_BILLING_COORDINATES | Coordinates of the person to be billed (can including phone, e-mail) | |
ASF_BILLING_METHOD | Line that describes the billing method | Via PayPal |
ASF_BILLING_DATA | All of the above (similar to HTML) | |
Variables on Shipment Entity |
ASF_SHIPMENT_TITLE | Label | Shipment Address |
ASF_SHIPMENT_COMPANY_NAME | Company Name | |
ASF_SHIPMENT_ADDRESSLINE1 | | |
ASF_SHIPMENT_ADDRESSLINE2 | | |
ASF_SHIPMENT_ADDRESSLINES | Combines both address lines in a single variable to avoid empty lines | |
ASF_SHIPMENT_COUNTRY | | |
ASF_SHIPMENT_CITY | | |
ASF_SHIPMENT_POSTALCODE | | |
ASF_SHIPMENT_NAME | Name of the person used for shipment | |
ASF_SHIPMENT_NAMES | Company Name and Person Name combined | |
ASF_SHIPMENT_ADDRESS | Shipment Address (including address, zip + city, country) | |
ASF_SHIPMENT_NAMES_ADDRESS | Names and Address combined | |
ASF_SHIPMENT_NAMES_ADDRESS_METHOD | Names, Address and Method | |
ASF_SHIPMENT_COORDINATES | Coordinates of the person used for shipment (can including. phone, e-mail) | |
ASF_SHIPMENT_METHOD | Line that describes the shipment method | |
ASF_SHIPMENT_DATA | All of the above (similar to HTML) | |
Extra variables on Shipment and Billing level* |
ASF_DATA1_TITLE | Label | |
ASF_DATA1 | ASF_BILLING_DATA or ASF_SHIPMENT_DATA or empty | |
ASF_DATA1_NAMES_ADDRESS | Names and Address | |
ASF_DATA1_NAMES_ADDRESS_METHOD | Names, Address and Method | |
ASF_DATA1_METHOD | Method | |
ASF_DATA2_TITLE | Label | |
ASF_DATA2 | ASF_BILLING_DATA or empty | |
ASF_DATA2_NAMES_ADDRESS | Names and Address | |
ASF_DATA2_NAMES_ADDRESS_METHOD | Names, Address and Method | |
ASF_DATA2_METHOD | Method | |
ASF_SHIPMENT_COMPANY_VAT_TITLE | Label | |
ASF_SHIPMENT_COMPANY_VAT | Tax value Delivery Address | |
Variables on Order level |
ASF_ORDER_NR | Order ID | 256897 |
ASF_ORDER_NR_TITLE | Order title ID | 256897 |
ASF_ORDER_STATUS_TITLE | Label | Order Status |
ASF_ORDER_STATUS | Status of the order | Shipped |
ASF_ORDER_USER_NAME_TITLE | Label | Ordered by |
ASF_ORDER_USER_NAME | Name of the person that submitted the order | |
ASF_ORDER_USER_EMAIL_TITLE | Label | E-mail Address |
ASF_ORDER_USER_EMAIL | E-mail of the person that submitted the order | |
ASF_ORDER_USER_PHONE_TITLE | Label | Phone |
ASF_ORDER_USER_PHONE | Phone number of the person that submitted the order | |
ASF_ORDER_USER_FAX_TITLE | Label | Fax |
ASF_ORDER_USER_FAX | Fax number of the person that submitted the order | |
ASF_ORDER_USER_MIS_ID | MIS ID of the user | |
ASF_ USER_MIS_ID | Idem as ASF_ORDER_USER_MIS_ID | |
ASF_ORDER_DATE_TITLE | Label | Ordered on |
ASF_ORDER_DATE | Date on which the order has been submitted | |
Variable for Invoice Lines** |
ASF_ORDER_ITEMS | Frame that contains the Order Header (if configured in StoreCenter) and the Order Lines. Note: there can only be one such field per page (if there are more, the first container encountered will be used | |
* If both Shipment and Billing data are available for the invoice, they each can be put in a separate entry (in our standard template, the Shipment Data are typically put on the left side whereas the Billing Data are put on the right side). If, for some reason, the Shipment Data are not available (because no shipment has been specified), one might want to put the BillingData in the box of the Shipment Data and leave the box that was normally used for the Billing Data blank. This functionality can be realized by using the ASF_DATA1 and ASF_DATA2 variables. ASF_DATA1 will refer to the Shipment Data if they are available, otherwise it will refer to the Billing Data. ASF_DATA2 will refer to the Billing Data (if the Shipment Data are available), otherwise they will be blank.
** The ASF_ORDER_ITEMS frames will be used for outputting the invoice lines. How this will be done exactly, can be parameterized by a number of extra formatting parameters (to be completed). These include:
•Setting to generate Order Header: can be switched off. In this case, the invoice template designer can choose to put this information in other frames (see ASF_ORDER_... fields)
•Enable/disable columns and indicate spacing (in percentages)
•Use frames (boxes) for Order Items
•Use frames (boxing) for Order Totals
•Font family/point size to be used...
Text field modifiers that can be used in a custom invoice
All text form fields take over the properties as defined in the PDF forms (such as color, point size, multi-line, alignment etc.). The font selection, however, are overruled by StoreFront. In StoreCenter, it is possible to choose a font family. By default, the font to be used is the normal or regular font of the font family. To use the bold, bold-italic or italic font, you need to apply a modifier to the variable name. Here are a few examples:
•ASF_SHIPMENT_METHOD:BOLD
•ASF_SHIPMENT_METHOD:ITALIC
•ASF_SHIPMENT_METHOD:BOLDITALIC
If you do not want to use the fonts specified by the font family, you can revert to the original font by using the “ORIGINAL” modifier. Example:
ASF_SHIPMENT_METHOD:ORIGINAL
Date field modifiers that can be used in a custom invoice
The variables denoting dates (such as ASF_ORDER_DATE and ASF_INVOICE_DATE) can have special modifiers:
Modifier | Description | Example |
---|
+[integer] | Indicates an offset in days that will be added to the date. Used to calculate a date on which the invoice must be paid | ASF_INVOICE_DATE:+60 |
SHORT | Short date formatting | |
MEDIUM | Medium date formatting | |
LONG | Long date formatting | |
Image field modifiers that can be used in a custom invoice
Currently only applicable for ASF_STORE_LOGO
Images are always scaled so that either the width or the height takes the full available space. In addition to this rule, the image will be further aligned according to the following modifiers:
Modifier | Description | Example |
---|
TOP | Align image to the top. This is the default setting. | |
MIDV | Center the image vertically | |
BOTTOM | Align the image to the top | |
LEFT | Align the image to the left. This is the default setting. | |
MIDH | Center the image horizontally | |
RIGHT | Align image to the right | |
Use one of TOP/MIDV/BOTTOM only; use one of LEFT/MIDH/RIGHT only. Example: ASF_STORE_LOGO:MIDH:MIDV will center the image.
Frame fields and frame field modifiers that can be used in a custom invoice
It is possible to draw rectangles around frames with the same formatting as specified in StoreCenter.
Variable | Description | Remark |
---|
ASF_FRAME | | |
ASF_BILLING_FRAME | Similar as ASF_FRAME | Will only be shown if there is billing information |
ASF_SHIPMENT_FRAME | Similar as ASF_FRAME | Will only be shown if there is shipping information |
ASF_DATA1_FRAME | Similar as ASF_FRAME | Will only be shown if there is DATA1 information (see higher for the meaning of DATA1 |
ASF_DATA2_FRAME | Similar as ASF_FRAME | Will only be shown if there is DATA2 information (see higher for the meaning of DATA2) |
The following modifiers are available:
Modifier | Description | Example |
ROUNDED | Use rounded corners | |
RECTANGULAR | Use rectangular corners | |
THICK | Use the thick lines (thickness specified in StoreCenter variable) | |
THIN | Use thin lines | |
COLOR | Use the primary color instead of black | |
BLACK | Use black for the frame | |
Examples:
ASF_FRAME:THICK:ROUNDED:COLOR
ASF_FRAME:ROUNDED
Special fields that can be used in a custom invoice
Field | Description | Remark |
---|
ASF_VALUE[a-zA-Z0-9] | Displays the default value in the PDF template (that is: the value is not replaced!) | The font that is used before is determined as with the other form fields (if text modifiers are used, it is possible to change the font). |
ASF_CUSTOM[0-9]_TITLE | Custom field title, e.g. ASF_CUSTOM2_TITLE | Not yet supported server-side |
ASF_CUSTOM[0-9] | Custom field, e.g. ASF_CUSTOM2 | Not yet supported server-side |
ASF_MACRO[a-zA-Z0-9] | Similar to ASF_VALUE* above, but the default value can contain variables that will be expanded. The variables must be enclosed by # characters. | Examples: “#ASF_BILLING_NAMES#” or “#ASF_BILLING_ADDRESS#” |
NOTE: The date and page numbering variables are not supported in the ASF_MACRO fields.
Table 7.2 Form text field with ASF_MACRO combining ASF_BILLING_NAMES and ASF_BILLING_ADDRESS
|