Coverage for modules\hr\migrations\0004_add_payslip.py: 100%
7 statements
« prev ^ index » next coverage.py v7.16.0, created at 2026-09-06 16:58 +0800
« prev ^ index » next coverage.py v7.16.0, created at 2026-09-06 16:58 +0800
1# Generated by Django 5.1.15 on 2026-09-05 02:46
3import django.db.models.deletion
4import uuid
5from django.conf import settings
6from django.db import migrations, models
9class Migration(migrations.Migration):
11 dependencies = [
12 ('hr', '0003_add_payroll_contributions'),
13 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
14 ]
16 operations = [
17 migrations.RemoveField(
18 model_name='performancereview',
19 name='reviewer',
20 ),
21 migrations.CreateModel(
22 name='Payslip',
23 fields=[
24 ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
25 ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
26 ('updated_at', models.DateTimeField(auto_now=True)),
27 ('tenant_id', models.UUIDField(db_index=True, help_text='Organization / Tenant ID')),
28 ('employee_name', models.CharField(max_length=256)),
29 ('employee_number', models.CharField(max_length=32)),
30 ('job_title', models.CharField(blank=True, max_length=128)),
31 ('period_start', models.DateField()),
32 ('period_end', models.DateField()),
33 ('basic_salary', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
34 ('overtime_pay', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
35 ('allowances', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
36 ('other_earnings', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
37 ('gross_pay', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
38 ('sss_deduction', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
39 ('philhealth_deduction', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
40 ('pagibig_deduction', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
41 ('withholding_tax', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
42 ('other_deductions', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
43 ('total_deductions', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
44 ('net_pay', models.DecimalField(decimal_places=2, default=0, max_digits=14)),
45 ('status', models.CharField(default='GENERATED', max_length=16)),
46 ('generated_at', models.DateTimeField(auto_now_add=True)),
47 ('released_at', models.DateTimeField(blank=True, null=True)),
48 ('payroll_item', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='payslip', to='hr.payrollitem')),
49 ('reviewer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='performance_reviews_given', to=settings.AUTH_USER_MODEL)),
50 ],
51 options={
52 'abstract': False,
53 },
54 ),
55 ]