Each month, Morocco payroll produces the payslips of an employer — the company or one of its sub-companies — in a payroll period. A period goes through three statuses: Open, Calculated, then Closed. This article explains how to open a month, calculate and recalculate it, deal with contracts to complete, close it (on your own or with a second manager’s approval), then produce and publish the payslip PDFs. It is intended for payroll managers and administrators.
Before you start #
- The Morocco payroll module is installed and open to you (see Getting started with Morocco payroll).
- The Calculate and close the month’s payroll, read the payslips permission: at the Access tier you read periods, payslips and statements; at the Execute tier you open a month, calculate it, close it, and produce and publish the PDFs.
- Employers, remuneration types and the payslip template are set up (see Setting up Morocco payroll), and employee records are complete (see Preparing an employee’s Morocco payroll record).
Reading the list of periods #
Open Morocco payroll › Payroll periods. The Morocco payroll screen lists the months of the year chosen in the Year list, one per employer, with the columns:
- Month: the link to the period;
- Employer: the company or the sub-company;
- Status: Open, Calculated or Closed;
- Payslips, Net pay and Employer cost: the period’s totals, in dirhams.
If no month is open for the year, the screen shows “No payroll period this year.”. At the bottom, the Salaries card gives the annual statement (see Monthly statements and returns).
Opening a month #
- In Morocco payroll › Payroll periods, choose the Employer. The list first offers employers that have contracts in Morocco, with their number (for example “3 contract(s) in Morocco”).
- Choose the Month (the current month is suggested).
- Click Open the month. The period opens and its page appears, with the status Open and “No payslip yet”.
A given month can only be opened once per employer: if the period already exists, Open the month takes you to it.
Calculating the month #
- On the period page, click Calculate.
- A message summarises the calculation, for example “12 payslip(s) calculated, 2 to complete.”. The status changes to Calculated.
- Read the payslip table: Employee (name and employee number), Gross, Net pay, Employer cost and Notes. The Notes column shows gaps that do not prevent the payslip, such as “CNSS number missing”.
The calculation includes all the employer’s Moroccan contracts active in the month. As long as the period is not closed, you can correct a record or the Salary tab, then click Recalculate: the payslips are replaced by the new calculation.
Contracts to complete #
A contract missing blocking data has no payslip. It appears in the To complete before closing card, with the employee’s name (a link to their Morocco payroll tab) and what is missing:
- “No salary on the Salary tab and no agreed net pay”;
- “Salary or payment not in dirhams on the Salary tab: Moroccan payroll only calculates in MAD”;
- “Payment type to set up for the Moroccan payroll (Settings › Payroll › Remuneration types)”.
Complete each contract, then click Recalculate. As long as the card is not empty, the Close button stays greyed out.
Closing the month #
- When the period is Calculated and no contract is left to complete, click Close.
- The Close the month? dialog reminds you that payslips are frozen, their PDFs produced and the month’s input closed. This cannot be undone. Click Close to confirm, or Cancel.
- Without a validation workflow, the message “Month closed: N PDF payslip(s) produced.” confirms it. The status changes to Closed.
Closing is refused if a contract has entered the month since the last calculation: recalculate first. A closed month can no longer be recalculated; payslips keep the rate schedule that calculated them.
With a second manager’s approval #
If the Closing a Moroccan pay period workflow is active (see Setting up Morocco payroll):
- Click Close and confirm. The message “Closing sent for validation: a second manager must approve it.” appears. The closing checks are made before sending.
- On the period page, a banner reads “Closing awaiting validation by a second manager: the month can no longer be recalculated meanwhile.”. The Recalculate and Close buttons disappear.
- The second manager sees the banner “Closing awaiting validation” with the Approve or reject link, which opens the request in their approvals. They can also decide from their notifications.
- If approved, the period is closed in the approver’s name and the PDFs are produced. If rejected or cancelled, the period stays Calculated and can be recalculated again.
The person requesting the closing cannot approve it themselves.
Reading a payslip PDF #
After closing, the Payslip column shows a PDF link for each employee. Click it: the payslip opens in a new tab. It is written in the employee’s language, using their employer’s template.
If producing a PDF failed during closing, the Produce missing PDFs button appears: click it to produce them.
Publishing payslips #
- On the page of a closed period, click Publish (N), where N is the number of payslips not yet published.
- The message “N payslip(s) published to the employees’ files.” confirms it. In the table, the link becomes PDF · published.
Each payslip is placed in the employee’s documents, Payslips folder, attached to their contract. The employee receives the “Payslip available” notice, with a link to their payslips. A published payslip no longer changes.
Good to know #
- Every action (opening, calculating, closing, producing, publishing) is logged in your name. Each viewing of a payslip or of a month’s payslip list is also logged.
- An alert reminds the payroll manager every working day of the month’s contracts missing data, then, from the 5th of the following month, of calculated periods not yet closed. A period awaiting validation no longer triggers this reminder.
- Payslip PDFs are stored encrypted and are included in your space’s backup.
Frequently asked questions #
Can I correct a payslip after closing? #
No. Closing is final: payslips are frozen. Check the calculation, and if needed the simulation of a few employees, before closing.
The Close button is greyed out. Why? #
At least one contract is listed under To complete before closing. Complete it, then click Recalculate.
I can’t see the Calculate or Open the month buttons. #
Your role holds the Calculate and close the month’s payroll, read the payslips permission at the Access tier only: you can read but not act. You need the Execute tier.
