diff --git a/db.sqlite3 b/db.sqlite3 index 18e25d4..ec04a21 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/installations/forms.py b/installations/forms.py index e877b2b..2fa60ec 100644 --- a/installations/forms.py +++ b/installations/forms.py @@ -72,7 +72,6 @@ class InstallationReportForm(forms.ModelForm): 'discharge_pipe_diameter': forms.NumberInput(attrs={ 'class': 'form-control', 'min': '0', - 'step': '1', 'required': True }), 'usage_type': forms.Select(attrs={ @@ -91,19 +90,18 @@ class InstallationReportForm(forms.ModelForm): 'motor_power': forms.NumberInput(attrs={ 'class': 'form-control', 'min': '0', - 'step': '1', 'required': True }), 'pre_calibration_flow_rate': forms.NumberInput(attrs={ 'class': 'form-control', 'min': '0', - 'step': '0.01', + 'step': '0.0001', 'required': True }), 'post_calibration_flow_rate': forms.NumberInput(attrs={ 'class': 'form-control', 'min': '0', - 'step': '0.01', + 'step': '0.0001', 'required': True }), 'water_meter_manufacturer': forms.Select(attrs={ diff --git a/installations/migrations/0008_alter_installationreport_post_calibration_flow_rate_and_more.py b/installations/migrations/0008_alter_installationreport_post_calibration_flow_rate_and_more.py new file mode 100644 index 0000000..b69ada5 --- /dev/null +++ b/installations/migrations/0008_alter_installationreport_post_calibration_flow_rate_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 5.2.4 on 2025-10-09 08:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('installations', '0007_installationreport_meter_model'), + ] + + operations = [ + migrations.AlterField( + model_name='installationreport', + name='post_calibration_flow_rate', + field=models.DecimalField(blank=True, decimal_places=4, max_digits=10, null=True, verbose_name='(لیتر بر ثانیه)دبی بعد از کالیبراسیون'), + ), + migrations.AlterField( + model_name='installationreport', + name='pre_calibration_flow_rate', + field=models.DecimalField(blank=True, decimal_places=4, max_digits=10, null=True, verbose_name='(لیتر بر ثانیه)دبی قبل از کالیبراسیون'), + ), + ] diff --git a/installations/models.py b/installations/models.py index 6cd48bd..e1e5850 100644 --- a/installations/models.py +++ b/installations/models.py @@ -62,8 +62,8 @@ class InstallationReport(BaseModel): usage_type = models.CharField(max_length=20, choices=USAGE_TYPE_CHOICES, null=True, verbose_name='نوع مصرف') exploitation_license_number = models.CharField(max_length=50, verbose_name='شماره پروانه بهره‌برداری چاه') motor_power = models.PositiveIntegerField(null=True, blank=True, verbose_name='(کیلووات ساعت) قدرت موتور') - pre_calibration_flow_rate = models.DecimalField(max_digits=10, decimal_places=2, null=True, blank=True, verbose_name='(لیتر بر ثانیه)دبی قبل از کالیبراسیون') - post_calibration_flow_rate = models.DecimalField(max_digits=10, decimal_places=2, null=True, blank=True, verbose_name='(لیتر بر ثانیه)دبی بعد از کالیبراسیون') + pre_calibration_flow_rate = models.DecimalField(max_digits=10, decimal_places=4, null=True, blank=True, verbose_name='(لیتر بر ثانیه)دبی قبل از کالیبراسیون') + post_calibration_flow_rate = models.DecimalField(max_digits=10, decimal_places=4, null=True, blank=True, verbose_name='(لیتر بر ثانیه)دبی بعد از کالیبراسیون') water_meter_manufacturer = models.ForeignKey('wells.WaterMeterManufacturer', on_delete=models.SET_NULL, null=True, blank=True, verbose_name='شرکت سازنده کنتور آب') sim_number = models.CharField(max_length=20, null=True, blank=True, verbose_name='شماره سیمکارت') driving_force = models.CharField(max_length=50, null=True, blank=True, verbose_name='نیرو محرکه چاه')