summaryrefslogtreecommitdiff
path: root/archaeological_files
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_files')
-rw-r--r--archaeological_files/forms.py36
-rw-r--r--archaeological_files/migrations/0108_auto_20220711_0128.py70
-rw-r--r--archaeological_files/models.py6
-rw-r--r--archaeological_files/templates/ishtar/sheet_file.html48
4 files changed, 116 insertions, 44 deletions
diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py
index 1623e901f..defb7ba05 100644
--- a/archaeological_files/forms.py
+++ b/archaeological_files/forms.py
@@ -524,14 +524,14 @@ class FileFormPreventiveDetail(forms.ModelForm, CustomForm, ManageOldType):
class Meta:
model = models.File
fields = [
+ "intervention_period",
+ "study_period",
+ "report_due_period",
"start_date",
"end_date",
"ground_start_date",
"ground_end_date",
- "intervention_period",
- "study_period",
"execution_report_date",
- "report_due_date",
"type_of_agreement",
"operation_type_for_royalties",
"total_developed_surface",
@@ -540,6 +540,21 @@ class FileFormPreventiveDetail(forms.ModelForm, CustomForm, ManageOldType):
]
pk = forms.IntegerField(label="", required=False, widget=forms.HiddenInput)
+ intervention_period = forms.CharField(
+ label=_("Intervention period"),
+ max_length=200,
+ required=False,
+ )
+ study_period = forms.CharField(
+ label=_("Study period"),
+ max_length=200,
+ required=False,
+ )
+ report_due_period = forms.CharField(
+ label=_("Report due period"),
+ max_length=200,
+ required=False,
+ )
start_date = forms.DateField(
label=_("Start date"),
required=False,
@@ -560,26 +575,11 @@ class FileFormPreventiveDetail(forms.ModelForm, CustomForm, ManageOldType):
required=False,
widget=DatePicker(attrs={"bs_col_width": "col-6 col-lg-3"}),
)
- intervention_period = forms.CharField(
- label=_("Intervention period"),
- max_length=200,
- required=False,
- )
- study_period = forms.CharField(
- label=_("Study period"),
- max_length=200,
- required=False,
- )
execution_report_date = forms.DateField(
label=_("Execution report date"),
required=False,
widget=DatePicker(attrs={"bs_col_width": "col-6 col-lg-3"}),
)
- report_due_date = forms.DateField(
- label=_("Report due date"),
- required=False,
- widget=DatePicker(attrs={"bs_col_width": "col-6 col-lg-3"}),
- )
total_developed_surface = forms.FloatField(
widget=widgets.AreaWidget(attrs={"bs_col_width": "col-6 col-lg-3"}),
label=_("Total developed surface (m2)"),
diff --git a/archaeological_files/migrations/0108_auto_20220711_0128.py b/archaeological_files/migrations/0108_auto_20220711_0128.py
new file mode 100644
index 000000000..edda06d21
--- /dev/null
+++ b/archaeological_files/migrations/0108_auto_20220711_0128.py
@@ -0,0 +1,70 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.28 on 2022-07-11 01:28
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('archaeological_files', '0107_auto_20220705_1612'),
+ ]
+
+ operations = [
+ migrations.AlterModelOptions(
+ name='priceagreement',
+ options={'ordering': ('order', 'start_date', 'end_date', 'label'), 'verbose_name': 'Price agreement', 'verbose_name_plural': 'Price agreement'},
+ ),
+ migrations.AddField(
+ model_name='file',
+ name='intervention_period',
+ field=models.CharField(blank=True, default='', max_length=200, verbose_name='Intervention period'),
+ ),
+ migrations.AddField(
+ model_name='file',
+ name='report_due_period',
+ field=models.CharField(blank=True, default='', max_length=200, verbose_name='Report due period'),
+ ),
+ migrations.AddField(
+ model_name='historicalfile',
+ name='intervention_period',
+ field=models.CharField(blank=True, default='', max_length=200, verbose_name='Intervention period'),
+ ),
+ migrations.AddField(
+ model_name='historicalfile',
+ name='report_due_period',
+ field=models.CharField(blank=True, default='', max_length=200, verbose_name='Report due period'),
+ ),
+ migrations.AlterField(
+ model_name='equipmentservicecost',
+ name='unit',
+ field=models.CharField(blank=True, choices=[('D', 'days'), ('W', 'weeks'), ('M', 'months'), ('L', 'linear m.')], max_length=1, null=True, verbose_name='Unit'),
+ ),
+ migrations.AlterField(
+ model_name='file',
+ name='permit_reference',
+ field=models.TextField(blank=True, default='', verbose_name='Permit/order reference'),
+ ),
+ migrations.AlterField(
+ model_name='historicalfile',
+ name='permit_reference',
+ field=models.TextField(blank=True, default='', verbose_name='Permit/order reference'),
+ ),
+ migrations.AlterField(
+ model_name='job',
+ name='default_daily_need',
+ field=models.FloatField(default=0, verbose_name='Def. daily number on study'),
+ ),
+ migrations.AlterField(
+ model_name='preventivefilegroundjob',
+ name='job',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_files.Job', verbose_name='Job'),
+ ),
+ migrations.AlterField(
+ model_name='preventivefilejob',
+ name='job',
+ field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='archaeological_files.Job', verbose_name='Job'),
+ ),
+ ]
diff --git a/archaeological_files/models.py b/archaeological_files/models.py
index cc1ca7c2a..c8a328633 100644
--- a/archaeological_files/models.py
+++ b/archaeological_files/models.py
@@ -691,6 +691,9 @@ class File(
study_period = models.CharField(
_("Study period"), max_length=200, default="", blank=True
)
+ report_due_period = models.CharField(
+ _("Report due period"), max_length=200, default="", blank=True
+ )
start_date = models.DateField(_("Start date"), blank=True, null=True)
end_date = models.DateField(_("End date"), blank=True, null=True)
ground_start_date = models.DateField(_("Ground start date"), blank=True, null=True)
@@ -698,9 +701,6 @@ class File(
execution_report_date = models.DateField(
_("Execution report date"), blank=True, null=True
)
- report_due_date = models.DateField(
- _("Report due by"), blank=True, null=True
- )
linear_meter = models.IntegerField(_("Linear meter"), blank=True, null=True)
type_of_agreement = models.ForeignKey(
AgreementType, blank=True, null=True,
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html
index d54d29e7e..417977a11 100644
--- a/archaeological_files/templates/ishtar/sheet_file.html
+++ b/archaeological_files/templates/ishtar/sheet_file.html
@@ -243,11 +243,13 @@
<div class="tab-pane fade show active" id="{{window_id}}-costs"
role="tabpanel" aria-labelledby="{{window_id}}-costs-tab">
<div class="row">
+ {% field_flex "Intervention period" item.intervention_period %}
+ {% field_flex "Study period" item.study_period %}
+ {% field_flex "Report due period" item.report_due_period %}
{% field_flex "Start date" item.start_date|date:"DATE_FORMAT" %}
{% field_flex "End date" item.end_date|date:"DATE_FORMAT" %}
{% field_flex "Ground start date" item.ground_start_date|date:"DATE_FORMAT" %}
{% field_flex "Ground end date" item.ground_end_date|date:"DATE_FORMAT" %}
- {% field_flex "Study period" item.study_period %}
{% field_flex "Execution report date" item.execution_report_date|date:"DATE_FORMAT" %}
</div>
<div class="row">
@@ -276,17 +278,17 @@
<thead>
<tr>
<th>{% trans "Job" %}</th>
- <th colspan="3">{% trans "Planned" %}</th>
- <th colspan="3">{% trans "Effective" %}</th>
+ <th colspan="3" class="text-center">{% trans "Planned" %}</th>
+ <th colspan="3" class="text-center">{% trans "Effective" %}</th>
</tr>
<tr>
<td>&nbsp;</td>
- <th>{% trans "Man by day" %}</th>
- <th>{% trans "Days" %}</th>
- <th>{% trans "Cost" %}</th>
- <th>{% trans "Man by day" %}</th>
- <th>{% trans "Days" %}</th>
- <th>{% trans "Cost" %}</th>
+ <th class="text-center">{% trans "Man by day" %}</th>
+ <th class="text-center">{% trans "Days" %}</th>
+ <th class="text-center">{% trans "Cost" %}</th>
+ <th class="text-center">{% trans "Man by day" %}</th>
+ <th class="text-center">{% trans "Days" %}</th>
+ <th class="text-center">{% trans "Cost" %}</th>
</tr>
</thead>
{% for job in item.ground_jobs.all %}
@@ -328,17 +330,17 @@
<thead>
<tr>
<th>{% trans "Job" %}</th>
- <th colspan="3">{% trans "Planned" %}</th>
- <th colspan="3">{% trans "Effective" %}</th>
+ <th colspan="3" class="text-center">{% trans "Planned" %}</th>
+ <th colspan="3" class="text-center">{% trans "Effective" %}</th>
</tr>
<tr>
<td>&nbsp;</td>
- <th>{% trans "Man by day" %}</th>
- <th>{% trans "Days" %}</th>
- <th>{% trans "Cost" %}</th>
- <th>{% trans "Man by day" %}</th>
- <th>{% trans "Days" %}</th>
- <th>{% trans "Cost" %}</th>
+ <th class="text-center">{% trans "Man by day" %}</th>
+ <th class="text-center">{% trans "Days" %}</th>
+ <th class="text-center">{% trans "Cost" %}</th>
+ <th class="text-center">{% trans "Man by day" %}</th>
+ <th class="text-center">{% trans "Days" %}</th>
+ <th class="text-center">{% trans "Cost" %}</th>
</tr>
</thead>
{% for job in item.jobs.all %}
@@ -380,17 +382,17 @@
<thead>
<tr>
<th>{% trans "Equipment / service" %}</th>
- <th colspan="4">{% trans "Planned" %}</th>
- <th colspan="4">{% trans "Effective" %}</th>
+ <th colspan="4" class="text-center">{% trans "Planned" %}</th>
+ <th colspan="4" class="text-center">{% trans "Effective" %}</th>
</tr>
<tr>
<td>&nbsp;</td>
- <th>{% trans "Quantity" %}</th>
+ <th class="text-center">{% trans "Quantity" %}</th>
<th colspan="2">&nbsp;</th>
- <th>{% trans "Cost" %}</th>
- <th>{% trans "Quantity" %}</th>
+ <th class="text-center">{% trans "Cost" %}</th>
+ <th class="text-center">{% trans "Quantity" %}</th>
<th colspan="2">&nbsp;</th>
- <th>{% trans "Cost" %}</th>
+ <th class="text-center">{% trans "Cost" %}</th>
</tr>
</thead>
{% for equipment in equipments %}