Spaces:
Running
Running
write for me a code for payroll system with the kenyan taxation and statutory n integrated and can print payslips and p9 for about 1000 employees. the code should be executable in visual code - Initial Deployment
c2bcdff
verified
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Kenyan Payroll System</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| @media print { | |
| .no-print { | |
| display: none ; | |
| } | |
| body { | |
| background-color: white ; | |
| color: black ; | |
| } | |
| .payslip-container, .p9-container { | |
| box-shadow: none ; | |
| border: none ; | |
| margin: 0 ; | |
| padding: 0 ; | |
| width: 100% ; | |
| } | |
| } | |
| .sidebar { | |
| transition: all 0.3s ease; | |
| } | |
| .sidebar.collapsed { | |
| width: 70px; | |
| } | |
| .sidebar.collapsed .sidebar-text { | |
| display: none; | |
| } | |
| .sidebar.collapsed .menu-item { | |
| justify-content: center; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100"> | |
| <div class="flex h-screen overflow-hidden"> | |
| <!-- Sidebar --> | |
| <div class="sidebar bg-blue-800 text-white w-64 flex flex-col"> | |
| <div class="p-4 flex items-center justify-between border-b border-blue-700"> | |
| <div class="flex items-center"> | |
| <i class="fas fa-money-bill-wave text-2xl mr-3"></i> | |
| <span class="sidebar-text text-xl font-bold">Kenya Payroll</span> | |
| </div> | |
| <button id="toggleSidebar" class="text-white focus:outline-none"> | |
| <i class="fas fa-bars"></i> | |
| </button> | |
| </div> | |
| <nav class="flex-1 overflow-y-auto"> | |
| <ul class="py-4"> | |
| <li> | |
| <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('dashboard')"> | |
| <i class="fas fa-tachometer-alt mr-3"></i> | |
| <span class="sidebar-text">Dashboard</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('employees')"> | |
| <i class="fas fa-users mr-3"></i> | |
| <span class="sidebar-text">Employees</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('payroll')"> | |
| <i class="fas fa-calculator mr-3"></i> | |
| <span class="sidebar-text">Payroll Processing</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('tax')"> | |
| <i class="fas fa-file-invoice-dollar mr-3"></i> | |
| <span class="sidebar-text">Tax & Statutory</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('reports')"> | |
| <i class="fas fa-chart-bar mr-3"></i> | |
| <span class="sidebar-text">Reports</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('p9')"> | |
| <i class="fas fa-file-alt mr-3"></i> | |
| <span class="sidebar-text">P9 Forms</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('settings')"> | |
| <i class="fas fa-cog mr-3"></i> | |
| <span class="sidebar-text">Settings</span> | |
| </a> | |
| </li> | |
| </ul> | |
| </nav> | |
| <div class="p-4 border-t border-blue-700"> | |
| <div class="flex items-center"> | |
| <div class="w-10 h-10 rounded-full bg-blue-600 flex items-center justify-center"> | |
| <i class="fas fa-user"></i> | |
| </div> | |
| <div class="ml-3 sidebar-text"> | |
| <div class="font-medium">Admin User</div> | |
| <div class="text-xs text-blue-200">Administrator</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Content --> | |
| <div class="flex-1 overflow-auto"> | |
| <!-- Header --> | |
| <header class="bg-white shadow-sm py-4 px-6 flex justify-between items-center"> | |
| <h1 class="text-2xl font-bold text-gray-800" id="pageTitle">Dashboard</h1> | |
| <div class="flex items-center space-x-4"> | |
| <div class="relative"> | |
| <input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i> | |
| </div> | |
| <button class="p-2 rounded-full bg-gray-100 text-gray-600 hover:bg-gray-200"> | |
| <i class="fas fa-bell"></i> | |
| </button> | |
| </div> | |
| </header> | |
| <!-- Main Content Sections --> | |
| <main class="p-6"> | |
| <!-- Dashboard Section --> | |
| <div id="dashboard" class="section-content"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6"> | |
| <div class="bg-white rounded-lg shadow p-6"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500">Total Employees</p> | |
| <h3 class="text-3xl font-bold" id="totalEmployees">1,024</h3> | |
| </div> | |
| <div class="p-3 rounded-full bg-blue-100 text-blue-600"> | |
| <i class="fas fa-users text-2xl"></i> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <span class="text-green-500 text-sm font-medium">+5.2% from last month</span> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow p-6"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500">Monthly Payroll</p> | |
| <h3 class="text-3xl font-bold" id="monthlyPayroll">KSh 12,450,000</h3> | |
| </div> | |
| <div class="p-3 rounded-full bg-green-100 text-green-600"> | |
| <i class="fas fa-money-bill-wave text-2xl"></i> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <span class="text-green-500 text-sm font-medium">+3.8% from last month</span> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow p-6"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500">PAYE Tax</p> | |
| <h3 class="text-3xl font-bold" id="payeTax">KSh 2,890,000</h3> | |
| </div> | |
| <div class="p-3 rounded-full bg-red-100 text-red-600"> | |
| <i class="fas fa-file-invoice-dollar text-2xl"></i> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <span class="text-red-500 text-sm font-medium">+4.1% from last month</span> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow p-6"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500">NSSF Contributions</p> | |
| <h3 class="text-3xl font-bold" id="nssfContributions">KSh 204,800</h3> | |
| </div> | |
| <div class="p-3 rounded-full bg-yellow-100 text-yellow-600"> | |
| <i class="fas fa-shield-alt text-2xl"></i> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <span class="text-green-500 text-sm font-medium">+5.2% from last month</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6"> | |
| <div class="bg-white rounded-lg shadow p-6 lg:col-span-2"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="text-lg font-semibold">Payroll Overview</h3> | |
| <div class="flex space-x-2"> | |
| <button class="px-3 py-1 text-sm bg-blue-100 text-blue-600 rounded">Monthly</button> | |
| <button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded">Quarterly</button> | |
| <button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded">Yearly</button> | |
| </div> | |
| </div> | |
| <canvas id="payrollChart" height="300"></canvas> | |
| </div> | |
| <div class="bg-white rounded-lg shadow p-6"> | |
| <h3 class="text-lg font-semibold mb-4">Recent Payslips</h3> | |
| <div class="space-y-4"> | |
| <div class="flex items-center justify-between p-3 bg-gray-50 rounded"> | |
| <div class="flex items-center"> | |
| <div class="w-10 h-10 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center mr-3"> | |
| <i class="fas fa-user"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">John Doe</p> | |
| <p class="text-sm text-gray-500">ID: EMP001</p> | |
| </div> | |
| </div> | |
| <span class="text-green-500 font-medium">KSh 85,420</span> | |
| </div> | |
| <div class="flex items-center justify-between p-3 bg-gray-50 rounded"> | |
| <div class="flex items-center"> | |
| <div class="w-10 h-10 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center mr-3"> | |
| <i class="fas fa-user"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Jane Smith</p> | |
| <p class="text-sm text-gray-500">ID: EMP002</p> | |
| </div> | |
| </div> | |
| <span class="text-green-500 font-medium">KSh | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=WritingGuru/payroll" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |