diff options
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r-- | archaeological_files/models.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 2e0398ddb..8d3f014da 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -70,7 +70,25 @@ from archaeological_operations.models import ( ) +class PriceAgreement(GeneralType): + order = models.IntegerField(_("Order"), default=10) + start_date = models.DateField(_("Start date"), blank=True, null=True) + end_date = models.DateField(_("End date"), blank=True, null=True) + + class Meta: + verbose_name = _("Price agreement") + verbose_name_plural = _("Price agreement") + ordering = ( + "order", + "label", + ) + + class Job(GeneralType): + price_agreement = models.ForeignKey( + PriceAgreement, verbose_name=_("Price agreement"), blank=True, null=True, + on_delete=models.CASCADE + ) ground_daily_cost = models.FloatField(_("Ground daily cost"), blank=True, null=True) daily_cost = models.FloatField(_("Daily cost"), blank=True, null=True) permanent_contract = models.NullBooleanField( @@ -168,6 +186,10 @@ DCT_ES_UNITS = dict(ES_UNITS) class EquipmentServiceCost(models.Model): + price_agreement = models.ForeignKey( + PriceAgreement, verbose_name=_("Price agreement"), blank=True, null=True, + on_delete=models.CASCADE + ) equipment_service_type = models.ForeignKey( EquipmentServiceType, verbose_name=_("Equipment/Service") ) |