diff --git a/client/models.py b/client/models.py index c8c6b76..3bfe293 100644 --- a/client/models.py +++ b/client/models.py @@ -3,7 +3,7 @@ from django.db import models class TaxType(models.Model): name = models.CharField(max_length=15) - percentage = models.DecimalField() + percentage = models.DecimalField(max_digits=3, decimal_places=2) def __str__(self): return self.name diff --git a/employee/models.py b/employee/models.py index 817bd9e..31ee860 100644 --- a/employee/models.py +++ b/employee/models.py @@ -8,7 +8,7 @@ class Employee(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) employee_id = models.CharField(max_length=15) phone = PhoneNumberField() - salary = models.DecimalField() + salary = models.DecimalField(max_digits=10, decimal_places=2) start_date = models.DateField() end_date = models.DateField(null=True, blank=True) projects = models.ManyToManyField(Project) diff --git a/invoice/models.py b/invoice/models.py index a4ea0f7..804d1bb 100644 --- a/invoice/models.py +++ b/invoice/models.py @@ -16,7 +16,7 @@ class Invoice(models.Model): class Item(models.Model): name = models.TextField(blank=False, null=False) - amount = models.DecimalField() + amount = models.DecimalField(max_digits=15, decimal_places=2) quantity = models.IntegerField() invoice = models.ForeignKey(Invoice, on_delete=models.CASCADE) diff --git a/project/models.py b/project/models.py index 003d367..ace63ea 100644 --- a/project/models.py +++ b/project/models.py @@ -6,7 +6,7 @@ class Project(models.Model): name = models.CharField(max_length=30) project_image = models.ImageField(upload_to='project_images', null=True, blank=True) client = models.ForeignKey(Client, on_delete=models.CASCADE) - total_compensation = models.DecimalField() + total_compensation = models.DecimalField(max_digits=15, decimal_places=2) start_date = models.DateField() end_date = models.DateField() diff --git a/requirements.txt b/requirements.txt index 2081d3f..560bc69 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,8 @@ coreschema==0.0.4 Django==4.0.6 django-cors-headers==3.13.0 django-filter==22.1 +django-phonenumber-field==6.3.0 +django-phonenumbers==1.0.1 django-sendgrid-v5==1.2.0 djangorestframework==3.13.1 drf-yasg==1.20.0 @@ -17,6 +19,8 @@ Jinja2==3.1.2 Markdown==3.3.7 MarkupSafe==2.1.1 packaging==21.3 +phonenumbers==8.12.51 +Pillow==9.2.0 pyparsing==3.0.9 python-http-client==3.3.7 pytz==2022.1