The Calculated Quantity feature in Wafeq allows you to automatically calculate the quantity of invoice or quotation line items based on values entered in custom fields. This makes it easier to manage line items where the quantity depends on multiple factors.
Before You Start
To use this feature, you must first create the custom fields that will be used to calculate the quantity.
For example, if you manage a hotel, you can automatically calculate the quantity for a hotel stay based on the number of rooms × the number of nights, instead of manually performing the calculation and entering the result.
For example:
- Number of Rooms
- Number of Nights
Note: The custom fields used in the formula must be of the Number type so that Wafeq can use them in calculations.
For more information on how to add custom fields to invoices and documents in Wafeq, refer to this guide.
How to Set Up Calculated Quantity
1. Set Up the Formula When Adding a Line Item
When adding a line item to an invoice or quotation, click the Quantity field, then click the Formula icon.
The custom fields you previously created will appear, allowing you to select the fields you want to use to calculate the quantity.
For example:
Number of Rooms × Number of Nights
After selecting the formula, click Apply, then enter the required values in the custom fields.
For example, if you enter:
- Number of Rooms: 2
- Number of Nights: 3
Wafeq will automatically calculate the quantity:
2 × 3 = 6
You can also add multiple fields to the formula or include a constant value when needed.
For example, you can add a constant value such as 0.001 to convert a measurement from centimeters to meters.
At any time, you can click the Formula icon to view, edit, or remove the formula.
2. Set Up the Formula When Adding a Product
You can also configure the quantity formula in advance when adding a product.
For example, you can set the quantity formula for a Hotel Stay product as:
Number of Rooms × Number of Nights
Once the product is saved, the formula will be applied automatically whenever you select this product on an invoice or quotation, eliminating the need to configure the formula each time.
Displaying Custom Fields on the Invoice
You can customize your Document Template to display the fields used to calculate the quantity, such as Number of Rooms and Number of Nights, instead of displaying only the final calculated quantity.
To display these fields, enable the custom fields you created from Document Templates, then select the fields you want to display on the invoice or quotation.
This allows you to clearly present the details used to calculate the quantity while keeping the automatically calculated final quantity.
How Is the Calculated Quantity Used?
Once the formula is applied, the final quantity is calculated automatically. This quantity is used in reports and data submitted to tax authorities, such as the Zakat, Tax and Customs Authority (ZATCA) in Saudi Arabia.
Comments
0 comments
Please sign in to leave a comment.