#--
This is a meta-template that is used to generate invoice templates. It supports the following
settings:
- showColumnDate
- showColumnTime
- showColumnCategory
- showColumnQuantity
- showColumnMeasure
- showColumnPrice
- showColumnTotal
- showSubtotalProject
- showSubtotalServices
- showSubtotalExpenses
- showSubtotalInvoice
- showSubtotalTaxes
- showItemDescription
- showServiceDiscount
- showServiceTime
- groupServiceTimeByDate
- showInvoiceNotes
- showInvoiceDiscount
- tableBorderColor
- tableBackgroundColor
- tableHeaderForegroundColor
- tableHeaderBackgroundColor
-->
Invoice No. ${'$'}{invoice.number}
${i18n("invoice")}
<@showClient/>
<@showInvoiceDetails/>
<@showInvoiceHeader/>
<@showInvoiceItemsByProject/>
<#if showSubtotalInvoice>
<@showInvoiceSubtotal/>
#if>
[#if invoice.taxable] |
<#if showSubtotalTax>
<@showInvoiceTaxes/>
#if>
<#if showSubtotalTaxes>
<@showInvoiceTaxesSubtotal/>
#if>
<#if showTotalInvoice>
<@showInvoiceTotal/>
#if>
[/#if] |
<#if showInvoiceBalance>
<@showInvoiceBalanceMacro/>
#if>
<#if showClientOpenInvoices>
<@showOpenInvoices/>
#if>
Thank you for your business!
<#if showInvoiceNotes>
${'$'}{invoice.notes}
#if>
<#macro showOpenInvoices>
[#if client.openInvoices?size != 0]
Open invoices
${i18n("invoice.number")} |
${i18n("invoice.date")} |
${i18n("invoice.duedate")} |
${i18n("invoice.age")} |
${i18n("invoice.total")} |
Amount Paid |
Amount Due |
[#list client.openInvoices?sort_by("ageInDays") as invoice] |
${'$'}{invoice.number} |
${'$'}{invoice.date?date?string.short} |
${'$'}{invoice.dueDate?date?string.short} |
${'$'}{invoice.ageInDays?string("#0")} days |
${'$'}{invoice.grandTotal} |
${'$'}{invoice.paymentsTotal} |
${'$'}{invoice.balance} |
[/#list] |
Total |
${'$'}{client.balance} |
[/#if]
#macro>
<#macro showInvoiceDetails>
${i18n("invoice")} #: | ${'$'}{invoice.number} |
${i18n("invoice.date")}: | ${'$'}{invoice.date?date} |
${i18n("invoice.duedate")}: | ${'$'}{invoice.dueDate?date} |
<#if showInvoicePurchaseOrder>
PO #: | ${'$'}{contract.reference} |
#if>
#macro>
<#macro showBusiness>
${'$'}{business.name}
${'$'}{business.address}
${'$'}{business.city}, ${'$'}{business.state} ${'$'}{business.zip}
${'$'}{business.phone}
${'$'}{business.email}
${'$'}{business.website}
<#if showBusinessNumber>
${'$'}{business.businessNumber}
#if>
<#if showBusinessTaxNumber>
${'$'}{business.taxNumber}
#if>
<#if showBusinessOtherNumber>
${'$'}{business.otherNumber}
#if>
#macro>
<#macro showClient>
${'$'}{client.name}
${'$'}{client.attention}
${'$'}{client.address}
${'$'}{client.city}, ${'$'}{client.state} ${'$'}{client.zip}
${'$'}{client.phone}
${'$'}{client.email}
<#if showClientBusinessNumber>
${'$'}{client.businessNumber}
#if>
<#if showClientTaxNumber>
${'$'}{client.taxNumber}
#if>
<#if showClientOtherNumber>
${'$'}{client.otherNumber}
#if>
#macro>
<#macro showBusinessLogoMacro>
#macro>
<#macro showInvoiceBalanceMacro>
<#if showColumnDate>
Total Due |
<#else>
Total Due |
#if>
<#if showColumnCategory>
|
#if>
<#if showColumnTime>
|
#if>
<#if showColumnQuantity>
|
#if>
<#if showColumnMeasure>
|
#if>
<#if showColumnPrice>
|
#if>
<#if showColumnTax>
[#list invoice.taxes?sort_by("name") as tax] |
|
[/#list] |
#if>
<#if showColumnTotal>
${'$'}{invoice.balance}
|
#if>
#macro>
<#macro showInvoiceTaxesSubtotal>
<#if showColumnDate>
Taxes |
<#else>
Taxes |
#if>
<#if showColumnCategory>
|
#if>
<#if showColumnTime>
|
#if>
<#if showColumnQuantity>
|
#if>
<#if showColumnMeasure>
|
#if>
<#if showColumnPrice>
|
#if>
<#if showColumnTax>
[#list invoice.taxes?sort_by("name") as tax] |
|
[/#list] |
#if>
<#if showColumnTotal>
${'$'}{invoice.taxesTotal}
|
#if>
#macro>
<#macro showInvoiceTaxes>
[#list invoice.taxes?sort_by("name") as tax] |
<#if showColumnDate>
${'$'}{tax.name} <#if showInvoiceTaxRate>${'$'}{tax.defaultRate}#if> |
<#else>
${'$'}{tax.name} <#if showInvoiceTaxRate>${'$'}{tax.defaultRate}#if> |
#if>
<#if showColumnCategory>
|
#if>
<#if showColumnTime>
|
#if>
<#if showColumnQuantity>
|
#if>
<#if showColumnMeasure>
|
#if>
<#if showColumnPrice>
|
#if>
<#if showColumnTax>
[#list invoice.taxes?sort_by("name") as tax] |
|
[/#list] |
#if>
<#if showColumnTotal>
${'$'}{invoice.taxTotal(tax)}
|
#if>
[/#list] |
#macro>
<#macro showInvoiceTotal>
<#if showColumnDate>
Grand Total |
<#else>
Grand Total |
#if>
<#if showColumnCategory>
|
#if>
<#if showColumnTime>
|
#if>
<#if showColumnQuantity>
|
#if>
<#if showColumnMeasure>
|
#if>
<#if showColumnPrice>
|
#if>
<#if showColumnTax>
[#list invoice.taxes?sort_by("name") as tax] |
|
[/#list] |
#if>
<#if showColumnTotal>
${'$'}{invoice.grandTotal}
|
#if>
#macro>
<#macro showInvoiceHeader>
<#if showColumnDate>
${i18n("item.date")} |
#if>
${i18n("item.name")} |
<#if showColumnCategory>
${i18n("item.category")} |
#if>
<#if showColumnTime>
${i18n("item.time")} |
#if>
<#if showColumnQuantity>
${i18n("item.quantity")} |
#if>
<#if showColumnMeasure>
${i18n("item.unitofmeasure.short")} |
#if>
<#if showColumnPrice>
${i18n("item.price")} |
#if>
<#if showColumnTax>
[#list invoice.taxes?sort_by("name") as tax] |
${'$'}{tax.name} <#if showItemTaxRate>${'$'}{tax.defaultRate}#if> |
[/#list] |
#if>
<#if showColumnTotal>
${i18n("item.total")} |
#if>
#macro>
<#macro showExpenses expenses>
${i18n("item.type.expenses")} |
[#list ${expenses}?sort_by("date") as expense] |
<#if showColumnDate>
${'$'}{expense.date?date?string.short} |
#if>
${'$'}{expense.name}
<#if showItemDescription>
${'$'}{expense.description}
#if>
|
<#if showColumnCategory>
${'$'}{expense.itemCategory!"-"} |
#if>
<#if showColumnTime>
- |
#if>
<#if showColumnQuantity>
${'$'}{expense.quantity} |
#if>
<#if showColumnMeasure>
${'$'}{expense.unitOfMeasure} |
#if>
<#if showColumnPrice>
${'$'}{expense.price} |
#if>
<#if showColumnTax>
[#list invoice.taxes?sort_by("name") as tax] |
${'$'}{invoice.taxTotal(tax, expense)} |
[/#list] |
#if>
<#if showColumnTotal>
${'$'}{expense.total} |
#if>
[/#list] |
#macro>
<#macro showServices services>
${i18n("item.type.services")} |
[#list ${services}?sort_by("date") as service] |
<#if showColumnDate>
${'$'}{service.date?date?string.short} |
#if>
${'$'}{service.name}
<#if showItemDescription>
${'$'}{service.description}
#if>
|
<#if showColumnCategory>
${'$'}{service.itemCategory!"-"} |
#if>
<#if showColumnTime>
${'$'}{service.billableTimeAsDecimal} |
#if>
<#if showColumnQuantity>
${'$'}{service.quantity}
<#if showServiceDiscount>
[#if service.quantityDiscounted]
${'$'}{service.regularQuantity}
[/#if]
#if>
|
#if>
<#if showColumnMeasure>
${'$'}{service.unitOfMeasure} |
#if>
<#if showColumnPrice>
${'$'}{service.price}
<#if showServiceDiscount>
[#if service.priceDiscounted]
${'$'}{service.regularPrice}
[/#if]
#if>
|
#if>
<#if showColumnTax>
[#list invoice.taxes?sort_by("name") as tax] |
${'$'}{invoice.taxTotal(tax, service)} |
[/#list] |
#if>
<#if showColumnTotal>
${'$'}{service.total} |
#if>
<#if showServiceTime && showColumnTime>
<#if groupServiceTimeByDate>
<@showServiceTimeByDate service="service"/>
<#else>
<@showServiceTimeMacro service="service"/>
#if>
#if>
[/#list] |
#macro>
<#macro showServiceTimeMacro service>
[#list ${service}.timeEntries?sort_by("date") as timeEntry] |
<#if showColumnDate>
|
#if>
${'$'}{timeEntry.description} |
<#if showColumnCategory>
|
#if>
<#if showColumnTime>
${'$'}{timeEntry.date?string("MMM dd")} - ${'$'}{timeEntry.elapsedTimeAsDecimal} |
#if>
<#if showColumnQuantity>
|
#if>
<#if showColumnMeasure>
|
#if>
<#if showColumnPrice>
|
#if>
<#if showColumnTax>
[#list invoice.taxes as tax] |
|
[/#list] |
#if>
<#if showColumnTotal>
|
#if>
[/#list] |
#macro>
<#macro showServiceTimeByDate service>
[#list ${service}.timeEntriesByDate?sort_by("date") as timeEntry] |
<#if showColumnDate>
|
#if>
|
<#if showColumnCategory>
|
#if>
<#if showColumnTime>
${'$'}{timeEntry.date?string("MMM dd")} - ${'$'}{timeEntry.elapsedTimeAsDecimal} |
#if>
<#if showColumnQuantity>
|
#if>
<#if showColumnMeasure>
|
#if>
<#if showColumnPrice>
|
#if>
<#if showColumnTax>
[#list invoice.taxes as tax] |
|
[/#list] |
#if>
<#if showColumnTotal>
|
#if>
[/#list] |
#macro>
<#macro showInvoiceSubtotal>
<#if showColumnDate>
Total |
<#else>
Total |
#if>
<#if showColumnCategory>
|
#if>
<#if showColumnTime>
${'$'}{invoice.billableTimeAsDecimal} |
#if>
<#if showColumnQuantity>
|
#if>
<#if showColumnMeasure>
|
#if>
<#if showColumnPrice>
|
#if>
<#if showColumnTax>
[#list invoice.taxes?sort_by("name") as tax] |
${'$'}{invoice.taxTotal(tax)} |
[/#list] |
#if>
<#if showColumnTotal>
${'$'}{invoice.total}
<#if showInvoiceDiscount>
[#if invoice.totalDiscounted]
${'$'}{invoice.regularTotal}
[/#if]
#if>
|
#if>
#macro>
<#macro showInvoiceItemsByProject>
[#list invoice.projects?sort_by("name") as project] |
${'$'}{project.name} |
[#if project.services?size != 0] |
<@showServices services="project.services"/>
<#if showSubtotalServices>
<#if showColumnDate>
|
#if>
|
<#if showColumnCategory>
|
#if>
<#if showColumnTime>
|
#if>
<#if showColumnQuantity>
|
#if>
<#if showColumnMeasure>
|
#if>
<#if showColumnPrice>
|
#if>
<#if showColumnTax>
[#list invoice.taxes?sort_by("name") as tax] |
|
[/#list] |
#if>
<#if showColumnTotal>
${'$'}{project.servicesSubtotal} |
#if>
#if>
[/#if] |
[#if project.expenses?size != 0] |
<@showExpenses expenses="project.expenses"/>
<#if showSubtotalExpenses>
<#if showColumnDate>
|
#if>
|
<#if showColumnCategory>
|
#if>
<#if showColumnTime>
|
#if>
<#if showColumnQuantity>
|
#if>
<#if showColumnMeasure>
|
#if>
<#if showColumnPrice>
|
#if>
<#if showColumnTax>
[#list invoice.taxes?sort_by("name") as tax] |
|
[/#list] |
#if>
<#if showColumnTotal>
${'$'}{project.expensesSubtotal} |
#if>
#if>
[/#if] |
<#if showSubtotalProject>
[#if invoice.projects?size != 1] |
<#if showColumnDate>
|
#if>
|
<#if showColumnCategory>
|
#if>
<#if showColumnTime>
<#if showColumnTime>${'$'}{project.billableTimeAsDecimal}#if> |
#if>
<#if showColumnQuantity>
|
#if>
<#if showColumnMeasure>
|
#if>
<#if showColumnPrice>
|
#if>
<#if showColumnTax>
[#list invoice.taxes as tax] |
|
[/#list] |
#if>
<#if showColumnTotal>
${'$'}{project.total} |
#if>
[/#if] |
#if>
[/#list] |
#macro>