diff --git a/src/docs/forms/faktura.py b/src/docs/forms/faktura.py index b53e539..db39219 100644 --- a/src/docs/forms/faktura.py +++ b/src/docs/forms/faktura.py @@ -45,6 +45,8 @@ class FakturaForm(BaseModelForm): 'currency', 'sender', 'receiver', + 'government', + 'government_description' ) _radioselect = forms.RadioSelect _textarea = forms.Textarea(attrs={'cols': 80, 'rows': 3}) diff --git a/src/docs/models/faktura.py b/src/docs/models/faktura.py index 400cd93..3269c1f 100644 --- a/src/docs/models/faktura.py +++ b/src/docs/models/faktura.py @@ -38,6 +38,13 @@ class Faktura(BaseInvoiceModel, SignedStatusFieldMixin, InvoiceFieldMixin, Linke plat_doc_date = models.DateField('Дата платёжного документа', blank=True, null=True) fix_doc_num = models.PositiveIntegerField('Номер исправления', null=True, blank=True) fix_doc_date = models.DateField('Дата исправления', blank=True, null=True) + government = models.BooleanField('Госконтракт', default=False) + government_description = models.CharField( + 'Идентификатор госконтракта, договора', + max_length=256, + blank=True, + default='' + ) def get_consignor_and_address(self): """Отправитель и адрес diff --git a/static/css/style.css b/static/css/style.css index e9e964f..df1b53e 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -877,7 +877,8 @@ input[type=number] { .doc-form select#id_currency {width: 330px;height: 40px;font-size: 25px;margin-left: 0;padding-left: 2px;} .fixes__wrapper, -.avance__wrapper { +.avance__wrapper, +.government__wrapper { padding-bottom: 7px; font-size: 15px; } @@ -923,7 +924,8 @@ input[type=number] { } #fixes, -#avance { +#avance, +#government { cursor: pointer; font-style: normal; } @@ -1151,3 +1153,7 @@ input[type=number] { #id_doc_reason { width: 570px; } + +#id_government_description { + width: 325px; +} diff --git a/templates/docs/faktura/as_pdf.html b/templates/docs/faktura/as_pdf.html index 8d51a64..49d19ac 100644 --- a/templates/docs/faktura/as_pdf.html +++ b/templates/docs/faktura/as_pdf.html @@ -89,20 +89,20 @@
| + | Идентефикатор государственного контракта, договора (соглашения) | ++ {{ obj.government_description }} + | +||||