In Zoho Books, you have the ability to create
Price Lists, wherein you can mark up and mark down the item rates by a specific percentage or set custom rates. Generally, when you apply a price list to an invoice, the default rate of the items gets updated on the invoice and these updated rates will be visible to you and your customers. However, if you also wish to view the default rates and the percentage of difference between these defaults and the updated rates, today's custom function is for you.
Prerequisites:
1. Create a Connection named
"zbooks" to successfully execute the function. You can watch the GIF attached below to know how to create the connection.
2. Create a custom field called
"Actual Rate" to be displayed in the item table of invoices. The default sales rate of the items will be populated in this field.
3. Create a custom field called
"Difference Percentage" to be displayed in the item table of invoices. The percentage of difference between the actual rate and the updated rate will be calculated and displayed in this field.
Custom Function:
Navigate to Settings -> Automation -> Workflow Actions -> Custom Functions -> +New Custom Function > Add the function code from this
GitHub link > Hit Save.
Workflow Rule:
Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and set up the workflow rule as shown below: