114 lines
6.0 KiB
Plaintext
114 lines
6.0 KiB
Plaintext
extends layout_side
|
|
|
|
block content
|
|
.container
|
|
h1(style='color: #d19b3d;') #{title}
|
|
|
|
form(method='POST', action='/invoices/details/'+invoice._id)
|
|
#form-group
|
|
label Számlaszám:
|
|
input.form-control(name='invoiceNumber',type=text,autocomplete='off', readonly=true,value=invoice.invoiceNumber style='color: white;background-color:#2C3446;')
|
|
br
|
|
#form-group
|
|
if invoice.itype===true
|
|
label Kibocsátó:
|
|
if invoice.itype===false
|
|
label Vevő:
|
|
input.form-control(name='owner',type=label, tabindex='-1',value=invoice.owner,readonly=true,autocomplete='off', style='color: white;background-color:#2C3446;')
|
|
br
|
|
#form-group
|
|
label Nettó érték:
|
|
.input-group
|
|
if invoice.currency==='HUF'
|
|
.input-group-addon HUF
|
|
input.form-control.currency(id='nPrice',name='nPrice',autocomplete='off',readonly=true,min='0.00',type=text, value= tsep(invoice.nPrice), tabindex='1',style='color: white;background-color:#2C3446; text-align:right;width:120px')
|
|
if invoice.currency==='EUR'
|
|
.input-group-addon EUR
|
|
input.form-control.currency(id='nPrice',name='nPrice',autocomplete='off',readonly=true,min='0.00',type=text, value= tsep(invoice.nPrice), tabindex='1',style='color: white;background-color:#2C3446; text-align:right;width:120px')
|
|
if invoice.currency==='USD'
|
|
.input-group-addon USD
|
|
input.form-control.currency(id='nPrice',name='nPrice',autocomplete='off',readonly=true,min='0.00',type=text, value= tsep(invoice.nPrice), tabindex='1',style='color: white;background-color:#2C3446; text-align:right;width:120px')
|
|
//-input.form-control.currency(id='nPrice',name='nPrice',autocomplete='off',readonly=true,min='0.00',type=text, value= (invoice.nPrice/100).toLocaleString('hu-HU'), tabindex='1',style='color: white;background-color:#2C3446; text-align:right;width:120px')
|
|
br
|
|
br
|
|
#form-group
|
|
label Fizetési határidő:
|
|
input.form-control(id='ed',name='days',type=text,autocomplete='off',readonly=true, value=invoice.daysLeft,style='color: white;background-color:#2C3446;')
|
|
|
|
br
|
|
#form-group
|
|
label Kibocsátás dátuma:
|
|
.container
|
|
.row
|
|
.col-sm-6
|
|
input.form-control(id='emDate',name='dateEmission',readonly=true,type='text',value=invoice.dateEmission,style='color: white;background-color:#2C3446;')
|
|
br
|
|
label Lejárati idő:
|
|
.container
|
|
.row
|
|
.col-sm-6
|
|
input.form-control(id='expDate',name='expiryDate',readonly=true,type='text',value=invoice.expiryDate,style='color: white;background-color:#2C3446;')
|
|
.col-sm-3
|
|
if invoice.delayed===0 && invoice.state===3
|
|
.input-group
|
|
input.form-control(id='invoiceDelayed',name='invoiceDelayed',type='text', placeholder='Haladék (nap)',style='color: white;background-color:#2C3446;')
|
|
span.input-group-btn
|
|
button.btn.btn-warning(type='submit',name='action',value='delaying') Haladék adása
|
|
else
|
|
input.form-control(type='text', readonly=true,value=invoice.delayed,style='color: white;background-color:#2C3446;')
|
|
br
|
|
#form-group
|
|
label Teljesítés dátuma:
|
|
.container
|
|
.row
|
|
.col-sm-6
|
|
if invoice.state===0
|
|
input.form-control(id='compDate',name='compDate',type='text',readonly=true,value=invoice.closingDate,style='color: white;background-color:#2C3446;')
|
|
else
|
|
.form-group
|
|
#datetimepicker3.input-group.date
|
|
input.form-control(id='compDate',name='compDate',type='text',style='color: white;background-color:#2C3446;')
|
|
span.input-group-addon
|
|
span.glyphicon.glyphicon-calendar
|
|
|
|
br
|
|
#form-group
|
|
label Megjegyzés:
|
|
textarea.form-control(name='body',tabindex='1',value=invoice.body,style='color: white;background-color:#2C3446;')
|
|
br
|
|
//a.btn.btn-primary.new-work(href='#') Létrehozás
|
|
.container
|
|
.row
|
|
.col-sm-5
|
|
if invoice.state===3
|
|
.input-group
|
|
input.form-control(id='transactionid',name='transactionid',type='text', placeholder='Tranzakció száma',style='color: white;background-color:#2C3446;')
|
|
span.input-group-btn
|
|
button.btn.btn-success(type='submit',name='action',value='closing') Számla lezárása
|
|
if invoice.state===0
|
|
.input-group
|
|
input.form-control(id='transactionid',name='transactionid',type='text', readonly=true,value=invoice.transactionId,style='color: white;background-color:#2C3446;')
|
|
span.input-group-btn
|
|
button.btn.btn-success(type='submit',name='action',disabled=true,value='closing') Számla lezárása
|
|
.col-sm-2
|
|
a.btn.btn-primary(href='/invoices/list') Vissza
|
|
.col-sm-2
|
|
a.btn.btn-primary(href='/invoices/edit/'+invoice._id) Módosítás
|
|
.col-sm-2
|
|
a.btn.btn-danger.delete-invoice(href='#',data-id=invoice._id) Törlés
|
|
script(type='text/javascript',src='/js/datepicker.js')
|
|
script.
|
|
$(document).ready(function(){
|
|
$('.delete-invoice').on('click', function(e){
|
|
$target = $(e.currentTarget);
|
|
var $iid=$target.attr('data-id');
|
|
$.ajax({
|
|
type: "DELETE",
|
|
url: "/invoices/"+$iid,
|
|
success: function(response){
|
|
console.log("Törölve!");
|
|
location.href='/invoices/list/all';
|
|
}
|
|
});
|
|
});
|
|
}); |