Adding Salary Components and Structures and Tying them to the Contracts

Employee salaries vary according to many factors such as level or job role, and an individual employee’s salary may differ from one month to another based on performance and adherence to attendance timings and rules. It’s easier to set up fixed salary templates/structures for each employee tier with similar salaries, such as accounting department employees in contracts, and also adjust salary components for each template/ structure so that they are flexible, changing based on the rules you set yourself. Thus, you find Employee (A)’s salary automatically reduced by 100 riyals from the usual amount due to some deductions and penalties for the employee’s tardiness and early leave from his work shift.

The Salary Components

Generally, the salary is divided into:

  • Earning 
    • Basic:
      This includes the full basic salary amount, which is determined in
      salary structures or directly within the contract.
    • Other earnings:
      These could either be additional to the basic salary or deductions from it. They are added through salary components or directly in the contract or salary structure. Examples of salary components include (bonuses, profit sharing, transportation allowance, official holiday allowances, deductions for unexcused absences or lateness, etc.)

Salary components are a part of the salary structure.

A salary component is assigned in the salary structure or in the employee’s contract.

Salary components can either be a fixed amount or variable, tied to a condition. For instance, an employee’s salary might increase by 30 pounds for each extra hour worked beyond their regular shift hours. This article will detail the method of adding conditions to salary components.

To add a new salary component, click on “Salary Components” under “Payroll” in the main menu, then click the “New Salary Component” button.

Enter the salary component details as follows:

  • Name: Enter the name of the salary component, preferably something descriptive.
  • Type: Choose whether the component is “Earning” added to the basic salary or “Deduction” deducted from it.
  • Status: Choose whether this salary component is “Active” or “Inactive”.
  • Description: If you want to explain something related to the salary component.
  • Salary Component Value: The value of the salary component can be:
    • A fixed amount, for example, 200 pounds.
    • A condition that leads to the addition or deduction of a fixed amount from the basic salary. Example: Granting a 1000 pounds bonus to the accounting department employees after a year of joining the company.
    • A condition that results in the addition or deduction of an amount that varies based on the condition’s fulfillment. Example: Granting a 30 pounds bonus for each extra working hour beyond the employee’s shift hours.
  • Default Account: If you leave the default account, the entry will be posted to the Salaries and Wages account under Expenses in the chart of accounts. You can also choose any account in the chart of accounts that you wish to post to.
  • Reference Value Only: If “Reference Value Only” is activated, the earning/deduction will not appear in the chart of accounts nor in the entries, while still being present normally when disbursing a payslip or viewing contract data.

Salary Structures

Salary structures are a repetitive templates/ forms for salaries, which you can assign to an entire employment level in their contracts instead of manually re-entering them.
These structures include the basic salary + salary components that we explained in this article.

To add a salary structure , click on “Salary Structures” under “Payroll” in the main menu, then click on the “New Salary Structure” button.

Enter the salary structure information as follows:

Name: Enter the name of the salary structure as required.
Status: Select from the dropdown menu the status of the salary structure, whether active or inactive.
Payroll Frequency: Select from the dropdown menu the pay cycle, whether it’s (weekly, bi-weekly, monthly, quarterly, yearly).
Description: Write a description of the salary structure in the box.

Under earnings, enter the Basic salary component with a fixed amount.
You can add other earnings by clicking on the “+Add” button and choosing the salary component name you want to add to the template, as well as deductions.

After finishing adding salary components, both earnings and deductions, click on the “Save” button.

Salary templates are assigned to employees in their respective contracts. For more details, here is the guide to creating employee contracts in Daftra.

Various examples of setting up the value of the salary component and its effect on the payslip

As mentioned, there are several ways to formulate the value of a salary component, which allows for significant flexibility in automatically dispensing salaries without the need to re-enter each employee’s salary individually based on their adherence to attendance and timing, for example, or as a result of their work performance evaluation. Here are various examples to help you understand how to best utilize the conditions or formulas of salary components.

Fixed Amount

A fixed salary component can be linked to a condition, so it is not added unless the condition is met, or it can be unconditioned and applies to any employee to whom this component is added in their assigned salary structure.


A salary component “Extra” was created with a value of 5000 EGP.

And a salary structure was created for the employees of the Marketing Department entitled to the additional amount.

The basic salary appears as 10,000 EGP in the salary structure, and the pre-defined extra salary component of 5,000 EGP.

Then the salary structure “Marketing + Extra” was assigned to the employee contract of Maria Addams.

When creating the payroll, the employee’s pay slip shows a total amount of 15,000 EGP, which consists of 10,000 EGP basic salary + 5,000 EGP fixed component, dispensed to the employee without any conditions.

A condition that if met, a fixed amount of an earning or deduction is applied to the basic salary

In cases where the salary component value type is a “Fixed Amount”, and the fixed amount is tied to a condition, the salary component value is granted to the employee only if the condition is met and denied otherwise.


A salary component “Bonus” was created with a value of 2000 EGP, granted under the following conditions:

Contract join date < 2022

Meaning, that the bonus is applicable if the employee’s join date is before the year 2022, used for rewarding employees based on their years of service in the company.

The Bonus component was then assigned to the salary structure “Old Employee Bonus,” which was then assigned to the employee John Doe, who joined the company in 2021 and meets the salary component condition.

The employee’s pay slip shows that the Bonus of 2000 EGP was automatically granted in addition to the basic salary of 10,000 EGP, as the condition of the salary component is met.

A condition that, upon being met, results in either the addition or deduction of a variable amount based on the status of the condition's fulfillment

If the salary component is of the “Formula” type, this formula is linked to a condition related to attendance or to the salary components themselves.


If you want to set a bonus to be awarded to the worker at the end of their work period or at the end of each contract, it is determined through “Contract End Date” and “Payroll End Date”.

If the condition is met, a specific amount is calculated, or one or two months of salary as per the company’s policy.


Contract end date == pay run end date

Result (Formula):

Salary component amount * 2

That is, if the contract end date matches the last day of the pay run period, a bonus equal to twice the employee’s basic salary is awarded.

Then, the annual bonus salary component was assigned to a salary structure called “Salary Structure 1”.

This structure was assigned to the contract of the employee “Jane Doe”, which ends on January 1, 2023.


Here appears a payslip for the employee for a month that matches the last day with December 31, 2022, coinciding with the end of the contract, hence the bonus is awarded at twice the salary amount.