cre8tivMaxx/discipline_hr — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me an ERPNext HRMS add on called Discipline HR for managing attendance discipline in payroll.

It should let HR set grace minute pools on shifts, choose how often the pool resets, and define penalty rules for late arrivals, early exits, and unapproved absences. When attendance is submitted, the app should calculate late and early minutes, use up the employee’s available grace minutes, keep a clear grace ledger, and automatically create salary deductions when the allowed grace is exceeded.

Also include a way for HR to pre approve lateness or early exits for a specific employee and date. If the employee stays within the approved minutes, don’t penalize them. If they exceed it, only penalize the extra time.

Make sure cancellation cleans everything up, penalties, salary deductions, ledger entries, and consumed approvals. If something fails, show the error on the attendance and let HR retry, and don’t allow salary slips to submit while unresolved penalties or errors exist. Use the current Frappe and ERPNext HRMS patterns, look up docs online if needed.

Want more depth? Deep Reverse