//php print_r($this); ?>
The Agreement Template is a PDF file that gives you the ability to "map" the customer, payment, membership and/or service information into the Agreement so it can be saved and printed.
Configuring an Agreement Template
Since this is where the document Mapping occurs, the original Agreement document must already be converted to a PDF file to configure an Agreement Template.
To Create an Agreement Template:
- From the Launch Pad, click System Configuration in the left navigation panel.
- In the Inventory, Activities & Related Settings section, select Agreement Templates.
- Click Add. The Agreement Template form displays.
- Enter a name for the template in the Name text box (required).
- Enter a description of the template in the Description text box (optional).
- If this Agreement Template will be immediately activated, select the Active check box.
- To upload the PDF file (REQUIRED to proceed), click the file browser to the right of the PDF Template field to search and upload the correct PDF file from your hard drive.
- Click the Process Template button. The field information and mapping links will display in the right panel.
- Complete the field mapping (see below).
- Click the Save button.
- To preview the Agreement Template, enter the Agreement ID (numerical) in the Agreement ID for Testing text box and click the Preview button.
Mapping is the process of identifying the required data from the application that will be passed into the actual Template file i.e. the required fields from the converted Agreement are identified and then mapped to those fields in the Agreement Template.
The field mapping section (right) is divided into two (2) sections:
- Text Fields - This section maps the available text, numeric, phone, and any other special fields in the Agreement.
- Signature Fields - This maps any fields where the Signature Capture device will be used or initials are required.
Each section includes information for:
- The Page of the Agreement where that data will be mapped.
- The Field Name.
- The Progress Indicators are the "check marks" to the right of each mapping element.
- Though they look like radio buttons, they are not dynamic button.
- Once an element is mapped and saved, the check mark will turn from gray to green.
- In the Signature Fields section are the Prompt configurations which give you the ability to display not only what you configured for your device interface, but additional information that can be conveyed, or even shown directly, to the Member. This also enables you to have prompts for Signature Capture devices that do not have screens.
- Device Prompt - This configures the message text that displays on the screen of the device. This is the default and the same as the previous functionality.
- Screen Prompt - This is where you can configure any additional information that prompts you during the transaction e.g. Terms & Conditions, restricted times, etc.
Mapping Data Fields
To Map the Data Fields:
- In the right panel, click the Edit link of the data element you want to pass into the Template. The Instructions for Mapping Agreement Template Fields pop-up displays.
- The basic instructions display at the top of the left panel with the name of the field you selected highlighted in the text.
- There is a tree view in the right panel with the data elements that can be mapped (Definition of the Agreement Object).
- Click Save and repeat the process for all of the fields you wish to map to the Template. If you edit an existing Agreement Template, none of the previous mapping is overridden. However, if you select a new PDF under that same template name, all of the mapping will be eliminated.
To add the Member's Last Name:
The type of code above is required when there are multiple records in the data set for a particular entity e.g. if there are multiple people (names) on an agreement. The records are stored in an array, which is in essence a "data store" for the rows in a particular database or subset of records. In the examples previous and following examples:
- "Agreement" = Entity
- "Members" = Property (of the Entity of data type Array)
- "FirstName" = Element (of the Array and also a data type String)
- "ContractNumber" = Property (of the Entity and data type Integer)
The array code is identified with brackets and the row number you want to pull "" from the database i.e this pulls the first row in the array,  would pull the second row etc. This coding is ONLY required if there are multiple options for selection. If there is only a single option available, e.g. Contract Number, which is just a property of Agreements, there will be no subset displayed on the tree view in the right panel.
This feature gives you the ability to copy the mapped fields of an existing template into another, already saved, template.
To Copy Mapped Fields to Another Template:
- In the Agreement Templates listing, select (click) the template TO which you want to copy the mapped fields.
- Click the Copy Fields button in the toolbar. The Copy field mappings pop-up window displays.
- Select the template you want to copy in the Copy from Agreement Template drop-down list. Notice that the template you are copying TO is not in the list.
- Click the Next button. A list of the mapped fields in the template you are copying FROM displays in the Field to be copied column.
- In the Copy to this field column, double click in the row of the mapped field you want to copy from left column. This activates a drop-down list of the available fields in the destination template i.e the template TO which you are copying the mapped field.
- Select a mapped field from the drop-down list. Repeat the process for any additional mapped fields you wish to copy. Not all of the field are required!
- Click the Save button. A pop-up displays letting you know that the fields were successfully mapped.
These field names may vary based on the PDF file for each template based on your naming convention. Therefore the copied field mapping names may NOT match exactly e.g. In the template you are copying from, the field may be labeled "Date of Birth" but in the template you are copying to, the destination field may be labeled "DOB" or some other derivative.
- Field to be Copied - A list of the mapped fields from the template you are copying ("MG Agreement").
- Copy to this field - A list of the destination fields for the copied fields ("Signature Agreement").
- Return the Member's Name:
- return agreement.Members.FirstName + ' ' + agreement.Members.LastName;
- Return All Members, One Per Line:
- var r = '';
- for(var i = 0, l = agreement.Members.Count; i < l; ++i)
- r += agreement.Members[i].FirstName + ' ' + agreement.Members[i].LastName + '\r\n';
- return r;
- Formatting Dates:
See this link  for complete information on how to format dates and times:
- return agreement.ContractDateTime.ToString('MMMM-d-y');
- Using the String Helper:
The string helper object can be accessed via the variable helper. It has the following methods:
Capitalize the First Letter of a String:
- return helper.ToFirstCharacterUpperCase(agreement.Members.FirstName);
Capitalize Each First Word in a Sentence:
- return helper.ToSentenceCapitalize(agreement.Invoice.Comments);
And remember to set your Screen Security when you get to the next page!
|Inventory, Activities & Related Settings|
Rentals Configuration | Enterprise & Location Setup | Inventory, Activities & Related Settings | Data Management | Financial | Sales & Prospecting | Workstations & Devices | Employees & Staff | Tax | Scheduler | Childcare Configuration & Settings | System Maintenance |