Dynamic date variables for scheduled invoices

Using simple liquid template syntax, it's possible to print dynamic date values for invoices in Cashboard.

From Invoices, and Invoice Schedules, you have access to four date variables…

due_date The date this invoice should be paid
invoice_date The configurable date you can set when editing an invoice, which shows to your clients
created_on When the invoice was actually created. Might differ from invoice_date if you've adjusted it!
paid_on When a payment was recorded for the entire invoice balance

Using these variables, along with our date filter, it's possible to print dynamic dates on your invoices.

From any Invoice 'notes' field, or Line Item — 'title' or 'description' field — try the following…

Retainer for {{ invoice.invoice_date | date: '%B, %Y' }}

If this was done in December, 2013 the output would read…

Retainer for December, 2013

Date math

Those of you who need to bill for a "range" of dates will find this next one handy. Using our custom liquid filters, you can add and subtract months from any of the above dates, like so...

Bill from {{ invoice.invoice_date | date: '%B, %Y' }} to {{ invoice.invoice_date | plus_month: 3 | date: '%B, %Y' }}

Again, assuming this were done in December, the output would read…

Bill from December, 2013 to March, 2014