Preface
This article assumes the reader has knowledge of at least the basic principles of both HTML and CSS, and explains the majority of HTML and CSS features that are unique to KashFlow’s PDF Theme Generator. This does not advise on general HTML/ CSS practises.
If you are not devising a PDF Theme entirely from scratch, it is advisable that you specify “Clean” as the Template. The “Classic” PDF Theme has superfluous HTML and CSS with classes, ids and selectors that are used only in conjunction with the unique formatting features found within its interface; as a “Template” only copies the HTML and CSS code, these features are no longer utilised and thus their code is redundant.
How ‘PDF Themes’ Work
First, a HTML document is created based on the HTML and CSS templates you have defined.
We then parse the HTML and CSS to replace specific [VARIABLES].
Some additional CSS is added, mainly to hide sections that are not needed for that specific Document Type.
The HTML document is then converted to a PDF document.
Finally, the ‘Logo’, ‘Background Image’, and ‘Document Footer’ are added along with any margins defined within the “Borders & Margins” tab of the PDF Theme.
Please Note
If you are not devising a PDF Theme entirely from scratch, it is advisable that you specify “Clean” as the Template. The “Classic” PDF Theme has superfluous HTML and CSS with classes, ids and selectors that are used only in conjunction with the unique formatting features found within its interface; as a “Template” only copies the HTML and CSS code, these features are no longer utilised and thus their code is redundant.
Variable Replacement
You should use these variables in your HTML. They’ll then be replaced with the appropriate values.
Variable Name | What it is replace with | |
---|---|---|
[SENDER_ADDRESS_COMPANY] | ‘Company Name’ as defined for the KashFlow Bookkeeping account | |
[SENDER_ADDRESS_LINE1] [SENDER_ADDRESS_LINE2] [SENDER_ADDRESS_LINE3] [SENDER_ADDRESS_LINE4] | ‘Address’ lines 1, 2, 3, 4 as defined for the KashFlow Bookkeeping account | |
[SENDER_ADDRESS_POSTCODE] | ‘Post Code’ as defined for the KashFlow Bookkeeping account | |
[SENDER_ADDRESS_PHONE] | ‘Tel’ as defined for the KashFlow Bookkeeping account | |
[SENDER_ADDRESS_EMAIL] | ‘Email’ as defined for the KashFlow Bookkeeping account | |
[SENDER_ADDRESS_SINGLELINE] | A compilation of the Sender Address values in the format of [SENDER_ADDRESS_COMPANY], [SENDER_ADDRESS_LINE1], [SENDER_ADDRESS_LINE2], [SENDER_ADDRESS_LINE3], [SENDER_ADDRESS_LINE4], [SENDER_ADDRESS_POSTCODE] | |
[SENDER_ADDRESS_MULTILINE] | A compilation of the Sender Address (your) values in the format of [SENDER_ADDRESS_COMPANY] [SENDER_ADDRESS_LINE1] [SENDER_ADDRESS_LINE2] [SENDER_ADDRESS_LINE3] [SENDER_ADDRESS_LINE4] [SENDER_ADDRESS_POSTCODE] | |
[DOCUMENT_TITLE] | The name of the document type the PDF Theme is generating, ie “Invoice”, “Customer Statement” etc. | |
[RECIPIENT_ADDRESS] | A compilation of the Recipient Address in the format of Name Address Line 1 Address Line 2 Address Line 3 Address Line 4 Post Code Country | |
[LOGOFILE] | An URL to the Logo uploaded for the PDF Theme | |
[ADDITIONAL_TEXT] | The text entered within “Misc Options” > “Additional Text” of the respective PDF Theme, for the Document Type as the tab is labelled | |
[STAMP_IMG] | The URL to the default “PAID” and “OVERDUE” stamps of Invoices | |
[PAYONLINE_LINK] | The URL to appropriate Payment Processor gateway for the associated Invoice | |
[PAYONLINE_IMG] | The URL to the “Payment Button” image as specified for the KashFlow Account under ‘Settings’ > ‘Card Options’. When given the if of “#payment-button” the element will only appear on emailed documents | |
[DOC_INFO_BORDER] | If the user has specified to “Include a border on the document details section” then this variable will be replace with the string “docInfoBorder”, otherwise it will be replaced with an empty string | |
[RECIP_ADDR_BORDER] | If the user has specified to Include a border on the customer address then this variable will be replace with the string “recipAddrBorder”, otherwise it will be replaced with an empty string | |
[ADDITIONAL_TEXT_BORDER] | If the user has specified to Include a border on the Additional Text section then this variable will be replace with the string “addTextBorder”, otherwise it will be replaced with an empty string | |
[DOCUMENT_LINES] | The compiled iteration over the “LINES.HTML” template | |
[DOCUMENT_TOTALS] | The compiled iteration over the “LINES_TOTALS.HTML” template | |
[VATNUMINFO] | The VAT Registration “Number” as defined under “Settings” > “Company Details”, with a pre-fix as defined within the “Field Names” tab of the respective PDF Theme | |
[SHORT_NARRATIVE] | Used with Reciept of Payment, and Remittance Advice Document Types. A brief on the Payment Transaction in the format of: Payment of {Payment Value} received on {Transaction Date} Payment Method: {Payment Method} {Transaction Comment} | |
[LONG_NARRATIVE] | Used with Reminder Letters. Consists of all the text specified within the respective Reminder Letters “Edit” field. | |
[COMPANY] | The company “Name” of the recipient | |
[CONTACT] | The “Full Name” of the contact for the recipient company | |
[CUSTREF] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The Purchase Order of the Invoice | |
Quote | The Purchase Order of the Quote | |
Purchase | The Supplier Reference of the associated Purchase | |
Packing Slip | The Purchase Order of the associated Invoice | |
Receipt of Payment | The Purchase Order of the associated Invoice | |
Remittance Advice | The Supplier Reference of the associated Purchase | |
Customer Statement | Not Used | |
Supplier Statement | Not Used | |
[CUSTCODE] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The Customer Code | |
Quote | The Customer Code | |
Purchase | The Supplier Code | |
Packing Slip | The Customer Code | |
Receipt of Payment | The Customer Code | |
Remittance Advice | The Supplier Code | |
Customer Statement | Not Used | |
Supplier Statement | Not Used | |
[PAYMENTTERMS] | An Payment Terms as specified for the respective Customer or Supplier record. This simply returns the number, without a unit of measure | |
[TEL] | The “Telephone” number of the recipient | |
[FAX] | The “Fax” number of the recipient | |
[MOBILE] | The “Mobile” number of the recipient | |
[TOTAL] | The total of the respective document | |
The following refer to the “labels” of the Document Details | ||
[INFO_LABEL_1] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Invoice Number | |
Quote | Quote Number | |
Purchase | PO Ref | |
Packing Slip | Invoice Number | |
Receipt of Payment | Invoice Number | |
Remittance Advice | Our Ref | |
Customer Statement | Company | |
Supplier Statement | Company | |
[INFO_LABEL_2] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Invoice Date | |
Quote | Quote Date | |
Purchase | PO Date | |
Packing Slip | Invoice Date | |
Receipt of Payment | Invoice Date | |
Remittance Advice | Invoice Date | |
Customer Statement | Account | |
Supplier Statement | Account | |
[INFO_LABEL_3] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Due Date | |
Quote | Valid For | |
Purchase | Your Ref | |
Packing Slip | Due Date | |
Receipt of Payment | Due Date | |
Remittance Advice | Due Date | |
Customer Statement | Date | |
Supplier Statement | Date | |
[INFO_LABEL_4] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Account | |
Quote | Account | |
Purchase | Not Used | |
Packing Slip | Account | |
Receipt of Payment | Account | |
Remittance Advice | Account | |
Customer Statement | Not Used | |
Supplier Statement | Not Used | |
[INFO_LABEL_5] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Purchase Order | |
Quote | Quote Ref | |
Purchase | Not Used | |
Packing Slip | Purchase Order | |
Receipt of Payment | Not Used | |
Remittance Advice | Your Ref | |
Customer Statement | Not Used | |
Supplier Statement | Not Used | |
[INFO_LABEL_6] Will not display if you have specified to show Projects per Line Item | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Project | |
Quote | Project | |
Purchase | Project | |
Packing Slip | Project | |
Receipt of Payment | Project | |
Remittance Advice | Project | |
Customer Statement | Not Used | |
Supplier Statement | Not Used | |
[INFO_LABEL_7] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Not Used | |
Quote | Not Used | |
Purchase | Not Used | |
Packing Slip | Not Used | |
Receipt of Payment | Not Used | |
Remittance Advice | Not Used | |
Customer Statement | Not Used | |
Supplier Statement | Not Used | |
Purchase Order | Delivery Date (It will not display when user does not set it) | |
The following refer to the values of the Document Details | ||
[INFO_VALUE_1] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The Number of the Invoice | |
Quote | The Number of the Quote | |
Purchase | The Number of the Purchase | |
Packing Slip | The Number of the associated Invoice | |
Receipt of Payment | The Number of the associated Invoice | |
Remittance Advice | The Number of the associated Purchase | |
Customer Statement | The Customer ‘Name’ | |
Supplier Statement | The Supplier ‘Name’ | |
[INFO_VALUE_2] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The Issue Date of the Invoice | |
Quote | The Issue Date of the Quote | |
Purchase | The Issue Date of the Purchase | |
Packing Slip | The Issue Date of the associated Invoice | |
Receipt of Payment | The Issue Date of the associated Invoice | |
Remittance Advice | The Issue Date of the associated Purchase | |
Customer Statement | The Customer Code | |
Supplier Statement | The Supplier Code | |
[INFO_VALUE_3] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The Due Date of the Invoice | |
Quote | The “Valid for” time in a “* Days” format | |
Purchase | The Supplier Reference of the Purchase | |
Packing Slip | The Due Date of the associated Invoice | |
Receipt of Payment | The Due Date of the associated Invoice | |
Remittance Advice | The Due Date of the associated Purchase | |
Customer Statement | The Statement Date | |
Supplier Statement | The Statement Date | |
[INFO_VALUE_4] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The Customer Code | |
Quote | The Customer Code | |
Purchase | The Supplier Code | |
Packing Slip | The Customer Code | |
Receipt of Payment | The Customer Code | |
Remittance Advice | The Supplier Code | |
Customer Statement | Not Used | |
Supplier Statement | Not Used | |
[INFO_VALUE_5] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The Purchase Order of the Invoice | |
Quote | The Purchase Order of the Quote | |
Purchase | Not Used | |
Packing Slip | The Purchase Order of the associated Invoice | |
Receipt of Payment | The Purchase Order of the associated Invoice | |
Remittance Advice | The Supplier Reference of the associated Purchase | |
Customer Statement | Not Used | |
Supplier Statement | Not Used | |
[INFO_VALUE_6] Will not display if you have specified to show Projects per Line Item | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The Project Number of the Invoice | |
Quote | The Project Number of the Quote | |
Purchase | Not Used | |
Packing Slip | The Project Number of the associated Invoice | |
Receipt of Payment | The Project Number of the associated Invoice | |
Remittance Advice | The Supplier Reference of the associated Purchase | |
Customer Statement | Not Used | |
Supplier Statement | Not Used | |
[INFO_VALUE_7] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Not Used | |
Quote | Not Used | |
Purchase | Not Used | |
Packing Slip | Not Used | |
Receipt of Payment | Not Used | |
Remittance Advice | Not Used | |
Customer Statement | Not Used | |
Supplier Statement | Not Used | |
Purchase Order | The Delivery Date of the Purchase Order (It will not display when user does not set it) | |
The following refer to the headers of Document Lines | ||
[COLA_HEADER] Will not display on Quotes if you have chosen “Remove Qty field from Invoices” from the “Field Names” tab of the PDF Theme | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Qty | |
Quote | Qty | |
Purchase | Qty | |
Packing Slip | Qty | |
Receipt of Payment | (Batch Payment) Not Used (Batch Payment) Invoice Number | |
Remittance Advice | (Batch Payment) Not Used (Batch Payment) Our Ref | |
Customer Statement | Date | |
Supplier Statement | Date | |
[COLB_HEADER] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Description | |
Quote | Description | |
Purchase | Description | |
Packing Slip | Description | |
Receipt of Payment | (Batch Payment) Not Used (Batch Payment) Purchase Order | |
Remittance Advice | (Batch Payment) Not Used (Batch Payment) Your Ref | |
Customer Statement | # | |
Supplier Statement | Receipt # | |
[COLC_HEADER] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Rate | |
Quote | Rate | |
Purchase | Rate | |
Packing Slip | Not Used | |
Receipt of Payment | (Batch Payment) Not Used (Batch Payment) Amount | |
Remittance Advice | (Batch Payment) Not Used (Batch Payment) Amount | |
Customer Statement | Purchase Order | |
Supplier Statement | Ref | |
[COLD_HEADER] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Total | |
Quote | Total | |
Purchase | Total | |
Packing Slip | Not Used | |
Receipt of Payment | (Batch Payment) Not Used (Batch Payment) Not Used | |
Remittance Advice | (Batch Payment) Not Used (Batch Payment) Not Used | |
Customer Statement | Due | |
Supplier Statement | Due | |
[COLE_HEADER] Will not display on Invoices/ Quotes/ Purchases if you are not set-up as to be VAT Registered | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | VAT | |
Quote | VAT | |
Purchase | VAT | |
Packing Slip | Not Used | |
Receipt of Payment | (Batch Payment) Not Used (Batch Payment) Not Used | |
Remittance Advice | (Batch Payment) Not Used (Batch Payment) Not Used | |
Customer Statement | Invoice Issued | |
Supplier Statement | Invoice Received | |
[COLF_HEADER] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Not Used | |
Quote | Not Used | |
Purchase | Not Used | |
Packing Slip | Not Used | |
Receipt of Payment | (Batch Payment) Not Used (Batch Payment) Not Used | |
Remittance Advice | (Batch Payment) Not Used (Batch Payment) Not Used | |
Customer Statement | Payment Received | |
Supplier Statement | Payment Made | |
The following variables are replaced with various class names needed to control display of the columns. Can include a combination of any of the following: smallCol, alignLeft, alignCenter | ||
[COLA_CLASSES] Will not display on Quotes if you have chosen “Remove Qty field from Invoices” from the “Field Names” tab of the PDF Theme | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The value for the quantity of the Line Item | |
Quote | The value for the quantity of the Line Item | |
Purchase | The value for the quantity of the Line Item | |
Packing Slip | The value for the quantity of the Line Item | |
Receipt of Payment | (Single Payment) Not Used (Batch Payment) The Invoice Number | |
Remittance Advice | (Single Payment) Not Used (Batch Payment) The Purchase Number | |
Customer Statement | The Date of the Invoice/ Payment | |
Supplier Statement | The Date of the Purchase/ Payment | |
[COLB_CLASSES] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The value for the Description of the Line Item | |
Quote | The value for the Description of the Line Item | |
Purchase | The value for the Description of the Line Item | |
Packing Slip | The value for the Description of the Line Item | |
Receipt of Payment | (Single Payment) Not Used (Batch Payment) The value for the Purchase Order of the Invoice | |
Remittance Advice | (Single Payment) Not Used (Batch Payment) The value for the Purchase Order of the Purchase | |
Customer Statement | The Invoice Number, or, the Bank Account for Unallocated Payments | |
Supplier Statement | The Purchase Number, or, the Bank Account for Unallocated Payments | |
[COLC_CLASSES] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The value for the Rate of the Line Item | |
Quote | The value for the Rate of the Line Item | |
Purchase | The value for the Rate of the Line Item | |
Packing Slip | Not Used | |
Receipt of Payment | (Single Payment) Not Used (Batch Payment) The amount allocated to the Invoice | |
Remittance Advice | (Single Payment) Not Used (Batch Payment) The amount allocated to the Purchase | |
Customer Statement | Purchase Order value, or, the ‘Comment’ value of Unallocated Payments | |
Supplier Statement | Purchase Order value, or, the ‘Comment’ value of Unallocated Payments | |
[COLD_CLASSES] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The value for the net total of the Line Item | |
Quote | The value for the net total of the Line Item | |
Purchase | The value for the net total of the Line Item | |
Packing Slip | Not Used | |
Receipt of Payment | (Single Payment) Not Used (Batch Payment) Not Used | |
Remittance Advice | (Single Payment) Not Used (Batch Payment) Not Used | |
Customer Statement | The Due Date of the Invoice. Not used for Payments | |
Supplier Statement | The Due Date of the Purchase. Not used for Payments | |
[COLE_CLASSES] Will not display on Invoices/ Quotes/ Purchases if you are not set-up as to be VAT Registered | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | The value for the VAT Amount of the Line Item | |
Quote | The value for the VAT Amount of the Line Item | |
Purchase | The value for the VAT Amount of the Line Item | |
Packing Slip | Not Used | |
Receipt of Payment | (Single Payment) Not Used (Batch Payment) Not Used | |
Remittance Advice | (Single Payment) Not Used (Batch Payment) Not Used | |
Customer Statement | The value of the Invoice Total | |
Supplier Statement | The value of the Purchase Total | |
[COLF_CLASSES] | ||
DOCUMENT | DEFAULT OUTPUT | |
Invoice | Not Used | |
Quote | Not Used | |
Purchase | Not Used | |
Packing Slip | Not Used | |
Receipt of Payment | (Single Payment) Not Used (Batch Payment) Not Used | |
Remittance Advice | (Single Payment) Not Used (Batch Payment) Not Used | |
Customer Statement | Not used for Invoice lines. The value of the Payment | |
Supplier Statement | Not used for Purchase lines. The value of the Payment | |
The following variables are intended for use within the “DOCUMENT.CSS” template | ||
[FONT] | The name of the “Font” family as specified under “The Basics” tab of the respective PDF Theme | |
[FONTSIZE] | The “Font” size (pt) as specified under “The Basics” tab of the respective PDF Theme | |
[FONTCOLOR] | The “Font” colour in hexadecimal as specified under “The Basics” tab of the respective PDF Theme |
Inserted CSS
We append some additional CSS to your template. This is either to hide sections (as the same template is used by all Document Types) or due to various other Settings defined within the KashFlow account. Reviewing the details below along with the HTML used in our “Clean” template should assist you in creating your own templates.
Condition | CSS |
---|---|
INFO_LABEL_4 is empty | #docinfo_4 {display:none;} |
INFO_LABEL_5 is empty | #docinfo_5 {display:none;} |
INFO_LABEL_6 is empty or Projects defined not to be displayed on documents | #docinfo_6 {display:none;} |
[SENDER_ADDRESS_*] is empty (eg, SENDER_ADDRESS_COMPANY, SENDER_ADDRESS_LINE1 etc.) | .sender-address-* {display:none;} (eg, |
User is not VAT registered or set their VAT Number not to show on the documents | #vat-registration-info {display:none;} |
Totals do not need to be shown | #document-totals {display:none;} |
column-* does not need to be shown (eg,column-a, column-f etc.) | .column-* {display:none;} (eg, |
No Document Lines need to be shown (for document types like Remittance Advice, Reminder Letters etc.) | #document-lines {display:none;} |
The Overdue and Paid Stamps are defined to not be displayed, or the Document is not an Overdue or Paid Invoice | #stamp-image {display:none;} |
The Payment Button is not defined to be displayed, or the Document is not an Unpaid Invoice | #payment-button {display:none;} |
The document is not a Reminder Letter | #long-narrative {display:none;} |
The document is not either Remittance Advice, or Receipt of Payment | #short-narrative {display:none;} |
The PDF Theme has no Logo uploaded for it, or it is defined to not be shown | #logo{display:none;visibility:hidden;} |
The user has defined a Left or Right property beneath the PDF Themes “Borders & Margins” tab Note: | #pdfdoc{margin-left:(x)px; margin-right:(y)px;} |
If the font is set to Helvetica, we need to unbold headings (to match legacy settings) | #pdfdoc #document-lines th, #pdfdoc h1{font-weight:normal;} |
Line Templates
As well as the “DOCUMENT.HTML” and “DOCUMENT.CSS” templates there are three additional templates for the Line Items, Line Comments, and Totals of a document. These will rarely ever require editing, though can be.
LINES.HTML
This is repeated for each line of information (eg, an invoice line) in the document.
It’s important to keep the class information for each column as per the “Clean” theme:
<tr>
<td class="[COLA_CLASSES] column-a">[COLA_VALUE]</td>
<td class="[COLB_CLASSES] column-b">[COLB_VALUE]</td>
<td class="[COLC_CLASSES] column-c">[COLC_VALUE]</td>
<td class="[COLD_CLASSES] column-d">[COLD_VALUE]</td>
<td class="[COLE_CLASSES] column-e">[COLE_VALUE]</td>
<td class="[COLF_CLASSES] column-f">[COLF_VALUE]</td>
</tr>
LINES_COMMENT.HTML
This is used instead of lines.html when the line being rendered is a single cell such as a comment line:
<tr>
<td colspan="6" class="alignLeft">[COLB_VALUE]</td>
</tr>
LINES_TOTALS.HTML
This is used to generate the Document Totals beneath the main Document Lines table. It is also used for Receipt of Payments, and Remittance Advice where multiple lines need to be displayed, such as if the Payment was for multiple Invoices or Purchases:
<tr class="[class]">
<td>[label]:</td>
<td>[value]</td>
</tr>
Document spec classes
You may find need to be able to apply a different layout or formatting depending on the Document Type, and the case of Invoices, their status. This is achieved by defining a html tag within the DOCUMENT.HTML template with the class [DOCUMENT_SPECS]. For example:
<html class="[DOCUMENT_SPECS]">
Depending on the document being rendered, the variable will output the following classes:
Invoice: invoice is-paid/is-unpaid/ is-overdue is-creditNote
Packing slip: packingSlip
Quote: quote
Remittance Advice: remittanceAdvice
Payment Receipt: paymentReceipt
Purchase Order: purchaseOrder
Customer Statement: customerStatement
Supplier Statement: supplierStatement
Reminder Letter: reminderLetter
For example, if the document being rendered is an unpaid credit note, the following HTML will be rendered:
<html class="invoice is-creditNote is-unpaid">
A common example of the Document Type class being used is to insert a specialised “Additional Text” element to appear for Customer Statements. This is achieved by first creating an element within the DOCUMENT.HTML sheet within the existing “additional-text” element. For example:
<div id="additional-text" class="[ADDITIONAL_TEXT_BORDER]">
<div class="original_addText">[ADDITIONAL_TEXT]</div>
<div class="custom_addText">Some text to appear on Customer Statements about outstanding balances and Payment Terms
<br>Bank Name: name
<br>Account Number: number
<br>Sort Code: code
<p>A salutation of gratitude for their custom, or some stern warning</p></div>
</div>
Then using the defined classes as selectors within the DOCUMENT.CSS template to define under what circumstances the elements should be displayed:
/*The first selector 'targets' the custom_addText class for all
Document Types, the second 'targets' the original_addText class
for Customer Statements.*/
.custom_addText,
.customerStatement .original_addText {
display: none;
}
/*This displays our custom_addText on Customer Statements
It overrides the above declaration to not display the
custom_text on all Document Types as this is more specific
than the above simple ".custom_addText" selector.*/
.customerStatement .custom_addText {
display: initial;
}
This practise can be applied for other situations across all the Document Types and permits a great means of artistic freedom, permitting almost limitless possibilities.