From c3b54dcd9ed604c0ba3f8f86c66f3c7e91d65128 Mon Sep 17 00:00:00 2001 From: Dmitriy Shesterkin Date: Sat, 27 May 2017 14:17:45 +0300 Subject: [PATCH] some fix --- src/docs/models/invoice.py | 3 +++ src/dokumentor/static/css/style.css | 10 ++++++++++ src/dokumentor/static/js/client.commons.js | 1 + src/dokumentor/templates/docs/_base/base_edit.html | 1 - src/dokumentor/templates/docs/stub_js.html | 9 +++++---- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/docs/models/invoice.py b/src/docs/models/invoice.py index fb33099..fd8436a 100644 --- a/src/docs/models/invoice.py +++ b/src/docs/models/invoice.py @@ -44,6 +44,9 @@ class Invoice(BaseInvoiceModel, LinkedDocsMixin): sum=self.invoice_items.aggregate(Sum('total_price'))['total_price__sum'] ) + def __str__(self): + return self.to_string_for_json() + class InvoiceItem(BaseItemInvoiceModel): """Табличная часть счета.""" diff --git a/src/dokumentor/static/css/style.css b/src/dokumentor/static/css/style.css index c9ef7f5..d678127 100644 --- a/src/dokumentor/static/css/style.css +++ b/src/dokumentor/static/css/style.css @@ -445,6 +445,7 @@ a.delete { vertical-align: top; } { margin-left: 10px; } .doc-form #client .hilight {font-size:25px;} +.doc-form #client .deck {font-size:25px;} .doc-form #saldo_debit input { margin-left: 12px; } .doc-form #saldo_credit input { margin-left: 5px; } .doc-form #saldo_debit .errorlist, .doc-form #saldo_credit .errorlist { margin-left: 83px; } @@ -814,3 +815,12 @@ input[type=number] { text-transform: uppercase; } /* */ + +/* select */ + +#doc-form #id_invoice, +#id_platej_type, +#id_payment_type { + font-size: 25px; + height: 40px; +} diff --git a/src/dokumentor/static/js/client.commons.js b/src/dokumentor/static/js/client.commons.js index fd6c975..1705981 100644 --- a/src/dokumentor/static/js/client.commons.js +++ b/src/dokumentor/static/js/client.commons.js @@ -2,6 +2,7 @@ function setup_client_edit_form(form) { var btn1_caption = form.data('dialog-btn-caption') || "Сохранить"; var form_id = form.attr('id'); var dlg_id = form_id + '_dlg'; + form.dialog({ modal: true, autoOpen: false, diff --git a/src/dokumentor/templates/docs/_base/base_edit.html b/src/dokumentor/templates/docs/_base/base_edit.html index ec7bff5..166a194 100644 --- a/src/dokumentor/templates/docs/_base/base_edit.html +++ b/src/dokumentor/templates/docs/_base/base_edit.html @@ -14,7 +14,6 @@

Редактировать {{ padeji.vinit }}

-
{% include form_template %}
{% endblock %} diff --git a/src/dokumentor/templates/docs/stub_js.html b/src/dokumentor/templates/docs/stub_js.html index 50aa662..8f7d6c3 100644 --- a/src/dokumentor/templates/docs/stub_js.html +++ b/src/dokumentor/templates/docs/stub_js.html @@ -53,6 +53,7 @@ var add_block = $('.add-client-link'), // блок с кнопкой "Добавить контрагента" client_block = $('#id_client'); + //console.log('rte'); // прячем кнопку добавить контрагента если он уже есть в документе if (client_block.val()){ check_vis(add_block); @@ -62,7 +63,7 @@ // как я понимаю основной блок на поиск и вывод "инвойсов" для автодобавления контрагента client_block.on('change', function() { -{# console.log('change');#} + //console.log('change'); check_vis(add_block); var client_id = $(this).val(); @@ -110,7 +111,7 @@ var invoice_id = $(this).val(); -{# console.log(invoice_id);#} + //console.log(invoice_id); if (invoice_id) { // TODO: needed preloader or remade function @@ -120,9 +121,9 @@ }); $.get('/my/docs/ajax_get_tbl_items/' + invoice_id, function(data) { -{# console.log('===================');#} + //console.log('==================='); var items = JSON.parse(data); -{# console.log(items);#} + //console.log(items); $.each(items, function(index, item){ var name = item['fields']['name'];