Invoices can be generated by nBill (based on your order records), or you can create ad­-hoc invoices yourself. To access your list of invoices, select Billing-­>Invoices from the main menu, as shown in figure 5.9.1.

Figure 5.9.1 - Accessing the Invoice List

This takes you to the invoice list.

Invoice List

The 'Generate All' toolbar button will prompt you to enter a date (which defaults to the current date), and allows you to generate invoices for all orders that fall due up to the date entered. It will then tell you how many invoices it generated.

The 'HTML Preview' toolbar button does the same thing as the little magnifying glass icon next to each invoice - ie. shows a printer­ friendly version of the selected invoice(s). If you check the box next to more than one invoice, the preview will show all of the selected invoices, one after the other (if you print them out, a page break should appear between each invoice, if supported by your browser).

If you have the PDF generation script installed on your server, you will also see the 'PDF Preview' toolbar button. Check the box next to an invoice, followed by this button, to see a PDF version of the invoice. If you select more than one invoice, the PDF will contain page­ breaks between each one. A PDF icon will also appear next to each invoice which you can click to see that invoice. Note: The PDF generation script is not written by Netshine Software, so we have no control over how well it works! It seems to be able to handle a maximum of about 20 or so invoices in one go.

Tip: You can quickly jump to a list of the order records that were used to generate an invoice by clicking on the little orders icon next to each invoice (the icon will only appear if an order was used to generate the invoice - ad-hoc invoices will not show the icon).

Tip: You can quickly jump to a list of the income records relating to the payment of an invoice by clicking on the small income icon next to each invoice (the icon will only appear if the invoice is marked as paid).

You can either specify a date range and click on 'Go' to see the invoices within that range (the default range is as specified on your global configuration page), or click on 'Show All' to see all invoices regardless of the date (typically you would use this in conjunction with a client name filter, otherwise it will return literally every invoice you have ever created). After clicking on 'Show All', the caption of the button changes to 'Reset Date Range' to let you go back to the default view so you can select a date range.

Tip: It is possible to mark an invoice as 'written off' (see below), in which case it will be shown at the end of the list, with a line crossed through it.

If you click on a little red 'x' icon in the 'Paid in Full' column, you will be taken straight to the income editor to create an income item for the payment. After you save or cancel from that screen, you will be brought back here to the invoice list (not to the income list).

The final column on the invoice list contains two icons: the first indicates whether or not an e­mail has been sent to the client about this invoice, and the second allows you to send an e­mail now. The possible icons for the e­mail status are as follows:
 
 e­mail not sent
 e-mail sent (hover your mouse over the icon to see date and time)
 an attempt was made to send an e­mail, but it failed (click on the icon to jump to the email log for further information)

Invoices can be e­mailed to clients automatically as they are generated (if the client record and/or global configuration indicates that this should happen), or you can e­mail them yourself individually by clicking on the envelope icon:  (you can send an invoice by e­mail like this even if you have already sent it before). This will show a new screen which allows you to customise the message that is sent, as shown in figure 5.9.2.

Figure 5.9.2 - E­mailing an Invoice


From

This will automatically be populated with the email address from the vendor record, but you can overtype it if you want.

To

If the invoice is associated with a client record, the e­mail address from the client's primary contact record will be filled in here automatically. You can change this if you want though, or type in a new value if there is no associated client record. Naturally if you leave this blank, no e­mail will be sent!

CC

You can send a courtesy copy to another e-mail address if you wish.

BCC

You can send a blind courtesy copy to another e-mail address if you wish (recipients will not be able to see who else the email was sent to).

Subject

This will be populated automatically, but you can enter your own value if you wish.

Include the actual document?

You can choose whether to attach the invoice as an HTML document, a PDF (if the PDF generator is installed), embed the invoice into the email, or just send notification that the invoice is available (requiring the user to login to your site if they want to see it).

Use HTML Template?

Whether to send an HTML e-mail using the template selected on the vendor record (and stored in the /components/com_nbill/templates/ folder), or just a plain text message without using an HTML template.

Message

A default message will be shown here depending on what options you select above. You can type your own message if you don't want to use the default one. If you change the format options above though, the default text will re-appear here and you will lose any changes you have made.

Tip: If you want to send a reminder for an overdue invoice, just overwrite the custom message with your own text to indicate that the invoice is overdue. Or better still, set up a reminder to send an e-mail automatically after a defined number of days.

Click on 'Send' to send the e­mail, or 'Abort' to cancel.

Click on an invoice number to edit an existing invoice, or on the 'New' toolbar button to create a new ad­-hoc invoice. This takes you to the invoice editor. (Note: if you want invoices to be generated on a regular basis, you have to set up an order record, and use the toolbar button or create a CRON job to generate the invoices automatically as they become due. Creating new invoices using the 'New' toolbar button is only meant to be used for creating one-­off invoices).

Basic Tab

Client

If the invoice is for an existing client, you can select the appropriate record here to automatically populate the billing name, address, reference, and tax exemption code (if applicable). Selecting a client here will also enable nBill to pick up the e­mail address in case you want to send the invoice by e­mail as described above.

Invoice Number

Typically, you would leave this blank when creating a new invoice. When the invoice is saved, the next available number (as defined in the vendor record) will be assigned. However, you can enter a number yourself if you wish (be careful if you want to avoid duplicates though).

Vendor Name

This is populated automatically based on the selected vendor, but you can override the value that appears on the invoice here if you wish.

Vendor Address

As with vendor name, you can override the address from the selected vendor record if you wish.

Billing Name

If you have selected a client record above, this will be populated automatically. Otherwise, you need to type in the name of the person or company who is being billed.

Billing Address

If you have selected a client record above, this will be populated automatically, and formatted according to the standard for that client's country. Otherwise, you need to type in the address of the person or company who is being billed (except the country, which is held separately - see below).

Billing Country

If you have selected a client record above, this will be populated automatically. Otherwise, you need to select the country of the person being billed.

Reference

If you have selected a client record above, this will be populated automatically with the client reference stored against the client record. You can enter whatever you like here to help you identify the client or invoice. The value entered here will appear on the invoice.

Invoice Date

Self­ explanatory.

Due Date

There is an option on the My Invoices tab of the display options page to automatically calculate a due date for your invoices (for example, 30 days after the invoice date), however, you can override that behaviour for individual invoices by specifying a due date here.

Currency

Self­ explanatory.


Line Items

This is where you enter a breakdown of prices that go into the total amount you are billing for. You might have a single item, or you could have several. Line items can be grouped into sections, and you can also specify a percentage discount for a section. Figure 5.9.3 shows an example of three line items split into two sections, the first of which has a percentage discount.

Figure 5.9.3 - Invoice Line Items

The line items are split into two tabs, basic and advanced, but the items you will need most appear on the basic tab. You can click on the section break icon to create a new section (this will open a lightbox popup to allow you to supply a name, and optionally a discount for the section). The page break icon will cause a page break to be inserted between line items when the invoice document is printed (or produced as a PDF). Line items can be moved up and down using the arrows on the far left, and some of the values (description and amount) can be edited inline if there is enough screen width (on a mobile phone, you will need to tap on the line item or edit icon to edit it). You can delete a line item by clicking the delete icon next to it. Deleting a section just deletes the section break itself, it does not delete any of the line items contained within it - they will be reassigned to a neighbouring section if their own section is deleted.

To create a new line item, click on the 'Add Item' button, or click on the edit icon  next to an existing line item to edit it. This opens a lightbox (popup window), as shown in figure 5.9.4.

Figure 5.9.4 - Invoice Line Item Editor

SKU

Optional 'stock keeping unit' - a reference number to identify the product.

Tip: You can either enter a value here, and select a product from the dropdown list that appears as you type, or leave the box blank and click on the 'Products' button to bring up a list of your products - you can then select the appropriate product by clicking on it, and the rest of the details will then be filled in automatically. Alternatively, you can just fill in the product details manually (you do not have to have a product record defined in order to create a quote item).

Description

The main description of what this item is. As you type, suggestions will be shown based on your product list or items you have previously added to a document - clicking on any of these suggestions will automatically populate the rest of the fields on the line item editor according to the values on the product record or previous document. If you click on the button next to the description (marked with tag symbols: < >), an HTML editor will appear, allowing you to enter a rich text description in addition to the single line summary description.

Nominal Ledger Code

If you are using the nominal ledger feature, you can select the ledger code here. Otherwise, leave it as 'miscellaneous'.

Unit Price

Net price for the item.

Quantity

Number of items being billed for.

Net Price

Total price for this item - ie. unit price, multiplied by quantity.

Tax Rate (%)

The percentage tax to be used for this line item (usually populated automatically based on your tax records and the country of the selected client).

Tax

Total sales tax (VAT) due for this item.

Electronic Delivery?

Whether or not this line item relates to a digital product or service for EU VAT purposes (and should therefore be taxed at the rate prevailing in the client's own country rather than the vendor's).

Shipping Service

If shipping is being charged, you can select the pre-defined shipping rate to use here.

Shipping

Net price of the shipping fees.

Shipping Tax Rate (%)

The percentage tax to be used for the shipping element of this line item (usually populated automatically).

Tax on Shipping

Sales tax (VAT) to be added to the shipping fees.

Gross Price

Total amount due for this line of the invoice (calculated automatically based on the other values).


Written Off?

If an invoice is never likely to be paid, you can write it off by setting this to 'yes'. This will cause the invoice to be sent to the end of the invoice list, and it will be displayed with a line through it. Writing off an invoice may affect your tax summary report, as this will no longer regard the invoice as a being due.

Date Written Off

If you have written off an invoice, you should set the date that it was written off. This may affect your tax summary report for the given date if you also select 'yes' to 'Claim Tax Back', below.

Claim Tax Back?

If you pay sales tax (VAT) on invoices due rather than just those that have been paid, you can indicate that you want to claim back the tax you have already paid on this invoice if it has been written off. If you select 'yes' here, the tax summary report will deduct the tax amount of this invoice from the tax amount due if you have it set to include unpaid invoices.

Notes

You can enter anything you like in the notes - they are just for your reference as an administrator and are never displayed to the end user.

Attachments

You can attach one or more files to this client record using the supporting documents feature. Attached files are only visible to administrators, not to the client.

Payment Link

This displays the URL that can be used to pay this invoice. It is shown here in case the payment link is not displayed on the invoice itself, and you want to e-mail a payment link to the client.

Tip: You can allow clients to pay more than one invoice at a time by appending more invoice ID numbers to the end of the link, and separating them with a comma. You can find the ID number by checking the 'cid' parameter in the URL for editing an invoice.

Advanced Tab

Tax Reference Description

This is the label that will appear next to your tax reference number (eg. your VAT number or equivalent) on the invoice. It will be populated automatically based on your own country's tax record, and if you select a client record (on the Basic tab) and the client falls into a different tax rate, the value will be updated accordingly.

Abbreviation

This will also be populated automatically in the same way as the tax reference description. The value is used on the invoice as a label for the tax amounts.

Tax Reference Number

Your own VAT number or equivalent.

Tax Exemption Code

The client's VAT number or equivalent. Populated automatically if a client record is selected.

Payment Plan

You can specify a payment plan here to allow the invoice to be paid in installments etc.

Show Payment Link?

Whether or not to allow this invoice to be paid online (ie. for a 'pay now' link to appear next to the invoice in the user's invoice list). By default, only invoices for orders with 'one-off' payment frequencies, or ad-hoc one-off invoices, will have a payment link, but you can change this on the display options screen, override that setting on the order record(s) (if applicable), and override it again here.

Paid in Full?

Indicates whether the invoice has been settled. Generally you should avoid touching this! If you want to mark an invoice as paid, it is best to do so from the main invoice list, as this will allow you to create an associated income record for the payment. To mark an invoice as unpaid, you should delete the associated income record instead of setting the value here (this value will then be updated automatically).

However, if you do not wish to record your income at all using nBill, you can use this option to set the paid status.

Partially Paid?

If only part of the total has been paid, it can be indicated here. This will be handled automatically if you mark an invoice as paid from the invoice list, but the amount entered in the related income record is less than the invoice total, or if the user part pays the invoice (eg. if there is a payment plan set up which does not require payment in full).

Refunded in Full?

Used to indicate whether a full refund has been given for this invoice.

Partially Refunded?

Used to indicate whether a partial refund has been given for this invoice.

Payment Instructions

Until such time as the invoice is marked as paid in full, the text you enter here will appear towards the end of the invoice. It is picked up from the tax record, or if there is no tax record, from the vendor record. You can also override the text for this invoice only by typing in your own value here. When the invoice is marked as paid, the payment instructions are no longer displayed on the invoice.

Small Print

The text you enter here will appear on the invoice after the payment instructions, and will typically be presented in a smaller font than the rest (but you can also specify your own formatting using the wysiwyg editor). Like 'Payment Instructions', this value is picked up from the tax record or failing that, the vendor record, or you can type in your own value. Unlike the payment instructions, small print is always displayed on the invoice, even after it has been paid.