doctype html
html
head
meta charset="utf-8"
link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"
title
= proforma ? 'Proforma' : 'Faktura'
= " nr #{number}"
css:
body, h1, h2, h3, h4, h5, h6 { font-family: verdana, helvetica, arial, sans-serif; }
body
.container
- if proforma
h5.text-center Proforma nie jest dowodem księgowym i nie należy jej księgować.
br
br
h2
= proforma ? 'Proforma' : 'Faktura'
h3
= "Nr #{number}"
br
br
.row
.col-xs-6
h4 Sprzedawca
- seller.each do |line|
= line
br
= "NIP: #{seller_nip}"
.col-xs-6
h4 Nabywca
- buyer.each do |line|
= line
br
= "NIP: #{buyer_nip}"
hr
.row
.col-xs-3
| Data wystawienia:
- unless proforma
br
| Wykonanie usługi:
.col-xs-3
= create_date
- unless proforma
br
= trade_date
.col-xs-3
| Termin płatności:
br
| Sposób zapłaty:
.col-xs-3
= payment_date
br
= payment_type
br
br
table.table.table-condensed
tr
th width="40%" Usługa
- if pkwiu
th.text-center width="1%" PKWiU
th.text-center width="7%" Ilość
th.text-center width="7%" Cena netto
th.text-center width="7%" Wart. netto
- unless proforma
th.text-center width="1%" VAT
th.text-center width="7%" Kwota VAT
th.text-center width="7%" Wart. brutto
tr
td = item_name
- if pkwiu
td.text-center = pkwiu
td.text-center
| 1 usł.
td.text-center = net_value
td.text-center = net_value
- unless proforma
td.text-center = vat
td.text-center = vat_value
td.text-center = gross_value
tr
td colspan="#{pkwiu ? 3 : 2}"
|
th.text-center Razem
td.text-center = net_value
- unless proforma
td.text-center = vat
td.text-center = vat_value
th.text-center = gross_value
br
.row
.col-xs-3
b Razem do zapłaty:
br
| Zapłacono:
br
| Zostało do zapłaty:
.col-xs-3
b = "#{gross_value} zł"
br
- if paid
= "#{gross_value} zł"
- else
| 0,00 zł
br
- if paid
| 0,00 zł
- else
= "#{gross_value} zł"
- if comments.any?
.col-xs-6
b Uwagi:
br
- comments.each do |line|
= line
br
- if no_vat_reason
br
p
b Podstawa zwolnienia z podatku VAT:
br
= no_vat_reason