Required templates

Variables are accessed within the template via {{invoice.(var name)}}, the template tag {{link}} returns a link to that specific invoice. Templates to be used are defined in your or similar See Getting Started -Settings

For example

Hi <b>{% if invoice.client_organization and not invoice.client_full_name %}{{invoice.client_organization}}{% else %}{{}}{% endif %}</b>, 
Here is a link to the Invoice for the services you have requested:
<b>Total</b>: $<b>{{}}</b> AUD
<b>Inclusive of</b>: $<b>{{invoice.gst|floatformat:2}}</b>GST
<b>Payment link</b>: {{link}} 
<small style='color:red;'> Please allow 5-30 seconds page loading time. </small>
<br> Your Invoice Number is: <b>#{{}}</b>
<b>This is an automatically generated message.</b>
Chauffeured Cars & Coaches

Methods accessible via the template

Method that retrieve certain information can be defined in the models to be then accessed in the template for example:

    def due(self):
        time = int(self.days_due)
        due_date = self.issue_date + timedelta(days=time)
        return due_date

    def days_overdue(self):
        days_due = self.days_due
        days_var = timedelta(days=days_due)
        due_date = self.issue_date + days_var
        days_overdue = ( - due_date).days
        return days_overdue

    def is_due(self):
        if self.payment_received is True:
            return False
            time = self.days_due
            days = timedelta(days=time)
            due_date = self.issue_date + days
            if >= due_date:
                return True
                return False

    def status(self):
        if self.job_status == "Cancelled":
            return "Cancelled"
        elif self.payment_received:
            return "Paid"
        elif self.is_due():
            return "Overdue"
            return "Pending"

    def total(self):
        amount = 0
        for i in self.service_items.all():
            amount = amount + i.amount
        return amount

All those variables would be accesible as {{invoice.(function name)}} eg {{invoice.due}}

Rendering invoices to pdf format

The plugin/module expects that you have defined your PDF_TEMPLATE file in your settings which is used when trying to display the invoice as a PDF. Similarly variables are accessed via {{invoice.(var name)}}