prod
Dmitriy Shesterkin 9 years ago
parent 9e23e63aee
commit c3b54dcd9e
  1. 3
      src/docs/models/invoice.py
  2. 10
      src/dokumentor/static/css/style.css
  3. 1
      src/dokumentor/static/js/client.commons.js
  4. 1
      src/dokumentor/templates/docs/_base/base_edit.html
  5. 9
      src/dokumentor/templates/docs/stub_js.html

@ -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):
"""Табличная часть счета."""

@ -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;
}

@ -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,

@ -14,7 +14,6 @@
<h2 style="display:inline">Редактировать {{ padeji.vinit }}</h2>
<div class="clear"></div>
<div class="div-doc-form">{% include form_template %}</div>
{% endblock %}

@ -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'];

Loading…
Cancel
Save