Tuesday, March 25, 2025

How to do mirroring payroll data from another platform for the last two months in ERPNext

 




Mirroring payroll data from another platform into ERPNext for the last two months involves several steps, including data extraction, transformation, and importing into ERPNext. Here’s a structured approach:


Step 1: Extract Payroll Data from the Source System

  • Check if the external payroll platform supports data export via:
    • CSV/XLSX download
    • API endpoints
    • Database queries (if you have direct access)
  • Extract data for the last two months (e.g., salary slips, earnings, deductions, taxes, etc.).

Step 2: Prepare the Data for ERPNext

  • Format the extracted data according to ERPNext payroll structure.
  • Mandatory fields in ERPNext for payroll import:
    • Employee ID
    • Payroll Entry Date
    • Earnings (Basic, Allowances, Bonus, etc.)
    • Deductions (Taxes, Provident Fund, etc.)
    • Net Pay
    • Payment Status (Paid/Unpaid)
  • Convert all fields into a CSV or JSON format.

Step 3: Import Payroll Data into ERPNext

There are two methods:

Option 1: Using Data Import Tool

  1. Go to ERPNext → Data Import.
  2. Select Payroll Entry or Salary Slip.
  3. Download the template.
  4. Fill in the extracted payroll data.
  5. Upload the file and import.

Option 2: Using ERPNext API (For Automation)

If the external system has an API, you can use ERPNext’s API to push data programmatically.

Example API call to create a salary slip:

POST /api/resource/Salary Slip
{
  "employee": "EMP-0001",
  "payroll_date": "2024-02-01",
  "earnings": [
    {"salary_component": "Basic", "amount": 5000},
    {"salary_component": "Bonus", "amount": 500}
  ],
  "deductions": [
    {"salary_component": "Tax", "amount": 200}
  ],
  "net_pay": 5300
}

Repeat this for each employee.


Step 4: Reconcile & Verify the Data

  • Cross-check the data in ERPNext Payroll Reports.
  • Verify total amounts match the external system.

Step 5: Process Payroll in ERPNext

  • If payroll is marked as Unpaid, you can process and pay salaries from ERPNext.

Would you like an automation script for this? 🚀

No comments:

Post a Comment

How to do mirroring payroll data from another platform for the last two months in ERPNext

  Mirroring payroll data from another platform into ERPNext for the last two months involves several steps, including data extraction, tran...