Feature #10256
Updated by Sai Priyatham Sadineni about 2 hours ago
@Abhilash@suthratech today i worked on these tasks 1. New Payroll module (backend) Built a complete payroll module — schema, service, controller and module registration. Follows the existing database-per-tenant architecture and central models convention. The existing Attendance module and schema were not modified at any point. 2. Data model The payroll profile links one-to-one to the User record, so employee identity (name, role, department, joining date) is not duplicated. The profile holds only payroll data — pay structure, bank details, salary history, advances and leave records. 3. Payroll calculation engine Salary is derived from the existing clock-in/clock-out records. Each day is classified as present, half-day, absent, leave or weekly-off based on hours worked, and deductions are calculated on a daily-rate basis. All calculations run server-side. 4. New Payroll page (frontend) Three tabs — Employee Directory, Monthly Payroll and Attendance Sheet — plus an employee detail view with Profile, Attendance, Salary History, Advances and Leaves. Added to routing and sidebar under admin, manager and accountant roles. 5. Attendance marking Added per-employee attendance marking and a Daily Attendance screen for marking all staff for a single date. Marking creates standard shift records, so payroll and the existing Attendance page stay consistent. 6. US localization Payroll fields aligned to US requirements — ACH bank details (routing number, account type), W-2/1099 classification, filing status, work state, and W-4/I-9 tracking. 7. Expense integration Marking a salary as paid now automatically records it as an expense under the existing "salaries" category, with the full breakdown stored against it. Duplicate posting is prevented by design. Also added a sync option to post salaries that were marked paid before this integration was in place. 8. Spice levels Completed the spice levels work, including the data migration script for existing records. 9. Bug fixes and improvements Fixed a timezone issue where a selected date was saved as the previous day Blocked attendance marking and display for future dates Removed inner scrollbars and made all components responsive for mobile Added joining date to the employee directory Simplified the payroll table by merging the actions column into the status column 10. Verification Both backend and frontend compile without errors. Schema validation, dependency wiring and date handling were verified directly. Pending End-to-end testing of a full month's payroll cycle in the application, before the module is used for actual salary processing.