You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
2.9 KiB
Plaintext
106 lines
2.9 KiB
Plaintext
html
|
|
head
|
|
title= "Invoice #" + invoiceNumber
|
|
link(rel='stylesheet', href='static/css/printinvoice.css', type='text/css')
|
|
|
|
body
|
|
.header
|
|
|
|
.headerRight
|
|
h1 Invoice
|
|
.content
|
|
.contentRow
|
|
span.label Invoice
|
|
span.invoiceNumber= "#" + number
|
|
.contentRow
|
|
span.label Date
|
|
span.invoiceDate= date
|
|
.contentRow
|
|
span.label Date Due
|
|
span.invoiceDateDue= dateDue
|
|
.contentRow
|
|
span.label Balance Due
|
|
span.balanceDue= balanceDue
|
|
|
|
.headerLeft
|
|
.myDetails(style='white-space:pre-line;')= myDetails
|
|
.customerAddress(style='white-space:pre-line;')= customerAddress
|
|
//NOTE: the above is a DIRTY HACK because HTML has no "display this including newlines" which is kinda frustrating. will be fixed in time.
|
|
.careOf= "C/O " + careOf
|
|
|
|
|
|
.invoiceTable
|
|
table
|
|
tr.headingRow
|
|
th
|
|
th.quantityHeading Qty
|
|
th.rateHeading Rate
|
|
th.amountHeading Amount
|
|
|
|
each item in items
|
|
tr
|
|
unless item.category == null
|
|
td= item.category + " - " + item.name
|
|
else
|
|
td= item.name
|
|
|
|
unless item.quantitySuffix == null
|
|
td.quantityCell= item.quantity + item.quantitySuffix
|
|
else
|
|
td.quantityCell= item.quantity
|
|
|
|
unless item.rateSuffix == null
|
|
td.rateCell= item.rate + item.rateSuffix
|
|
else
|
|
td.rateCell= item.rate
|
|
td.currencyCell= item.subtotal
|
|
|
|
unless item.comment == null
|
|
tr.commentRow
|
|
td(style='white-space:pre-line;')= item.comment
|
|
//NOTE: the above is a DIRTY HACK because HTML has no "display this including newlines" which is kinda frustrating. will be fixed in time.
|
|
tr.ruleRow
|
|
td(colspan='4')
|
|
|
|
each discount in discounts
|
|
tr.discountRow
|
|
unless discount.percentage == null
|
|
td(colspan='3').labelCell= "Discount (" + discount.percentage + "):"
|
|
else
|
|
td(colspan='2').labelCell Discount:
|
|
td.currencyCell= discount.amount
|
|
|
|
tr.subtotalRow
|
|
td(colspan='3').labelCell Subtotal:
|
|
td.currencyCell= subtotal
|
|
|
|
each tax in taxes
|
|
tr.taxRow
|
|
td(colspan='3').labelCell= tax.name + " (" + tax.rate + "):"
|
|
td.currencyCell= tax.amount
|
|
|
|
each shipper in shipping
|
|
tr.shippingRow
|
|
td(colspan='3').labelCell= "Shipping (" + shipper.name + "):"
|
|
td.currencyCell= shipper.amount
|
|
|
|
each payment in payments
|
|
tr.paymentRow
|
|
td(colspan='3').labelCell= "Paid (" + payment.type + "):"
|
|
td.currencyCell= payment.amount
|
|
|
|
tr.balancedueRow
|
|
td(colspan='3').labelCell Balance Due:
|
|
td.currencyCell= balanceDue
|
|
|
|
unless comments == null
|
|
.invoiceComments
|
|
span.label Comments:
|
|
.content(style='white-space:pre-line;')= comments
|
|
//NOTE: the above is a DIRTY HACK because HTML has no "display this including newlines" which is kinda frustrating. will be fixed in time.
|
|
|
|
unless terms == null
|
|
.invoiceTerms
|
|
span.label Terms:
|
|
.content= terms
|