Skip to content

Server scripts — Sales Invoice & payroll

Map scripts/ entry points to hooks so engineers know where submit-time and payroll logic lives.

  • leekimerp/leekimerp/scripts/sales_invoice.py
  • leekimerp/leekimerp/scripts/salary_slip.py, payroll_entry.py, salary_component.py, employee.py (see Payroll & HR and Doc events)
SymbolTriggerRole
before_submit_sales_invoicedoc_events Sales Invoice on_update in hooks.pyExpands [Year], [Invoice No], [Customer], [Item Code] in item description lines via _render_template

Flow: On update, each item description is scanned; known bracket tokens are replaced from the invoice and row context.

ModuleNotable hooks
salary_slip.pyCPF, SHG, SDL, net pay (chained on Salary Slip validate)
payroll_entry.pyNaming, salary structure switch, trash handler
salary_component.pyAbbreviations, accounts table
employee.pySalary structure v2, holiday list

Details: Doc events, Payroll module.

  • ERPNext HRMS payroll DocTypes
  • Company and account setup per Accounting hooks on Account / Company