Scenario
There are instances when the sum of two Custom Columns needs to be printed on an Invoice using Basic Transaction PDF Layout. This article shows how to achieve this using a Saved Search and Transaction Body Field. In this scenario, the two columns are named Commission Amount and Net Amount.
Solution
- Create a Saved Search
- Navigate to Lists > Search > Saved Searches > New
- Click Transaction
- Search Title: Enter Total Commission Amount Search
- Click Criteria
- Click Standard
- Filter:
Note: Always click Set and Add once Field is selected and adjusted as needed. - Select Type
- Type: Select Invoice
- Click Results
- Click Columns
- Field:
Note: Always click Add once Field is selected and adjusted as needed. - Select Commission Amount
- Summary Type: Select Sum
- Click Available Filters
- Click Filter
- Filter:
- Select Internal ID
- Click Add
- Click Save
- Create a Saved Search
- Navigate to Lists > Search > Saved Searches > New
- Click Transaction
- Search Title: Enter Total Net Amount Search
- Click Criteria
- Click Standard
- Filter:
Note: Always click Set and Add once Field is selected and adjusted as needed. - Select Type
- Type: Select Invoice
- Click Results
- Click Columns
- Field:
Note: Always click Add once Field is selected and adjusted as needed. - Select Net Amount
- Summary Type: Select Sum
- Click Available Filters
- Click Filter
- Filter:
- Select Internal ID
- Click Add
- Click Save
- Create a Transaction Body Field
- Navigate to Customization > Lists, Records, & Fields > Transaction Body Fields > New
- Label: Enter Total Commission Amount
- Type: Select Currency
- Store Value: Remove Checkmark
- Click Applies To
- Sales: Enter Checkmark
- Click Validation & Defaulting
- Search: Select Total Commission Amount Search
- Click Save
- Create a Transaction Body Field
- Navigate to Customization > Lists, Records, & Fields > Transaction Body Fields > New
- Label: Enter Total Net Amount
- Type: Select Currency
- Store Value: Remove Checkmark
- Click Applies To
- Sale: Enter Checkmark
- Click Validation & Defaulting
- Search: Select Total Net Amount Search
- Click Save
- Edit the Transaction Form PDF Layout
- Navigate to Customization > Forms > Transaction Form PDF Layout
- Preferred Invoice PDF Layout: Click Edit
- Click Add Custom Element
- Choose Element(s): Select Total Commission Amount
- Click OK
- Click Add Custom Element
- Choose Element(s): Select Total Net Amount
- Click OK
- Click Save