Hi, my name is Alex Sirota, and I'm going to introduce you to the bulk Wild Apricot invoice printer. You can create one or more custom HTML invoices with all the details of your Wild Apricot invoices, and then deposit them into Dropbox, or you could change it to use any service, including email.
[00:00:20] The way that the scenario works is it uses four Wild Apricot modules. The first one is to get the account details of your account, which is the name of your organization. The next step gets a list of invoices. You can go back a month or several months, or maybe multiple years to print invoices. The nice thing about this feature is you can also check unpaid invoices.
[00:00:43] Once you've got a list of invoices, we're going to get the invoice details and we're going to iterate this invoice list. This will then iterate and go through each invoice and create information about the invoice .
[00:00:55] Finally, we need to find information about who the invoice is for. And so each invoice has a contact associated with it. It's usually a member for their organization. And so now we're going to go and grab the contact ID from the invoice details result.
[00:01:08] At this point we've got information about the account. We got a list of invoices that fit the criteria. We've got information about the invoices , including all the details on the invoice. And then information about who the invoices are for. We're going to use the iterator tool to iterate through the order details. In Wild Apricot, this could be a membership application or renewal, it could be an online store order. It could be a set of taxes. An invoice could have one or several invoice order details.
[00:01:38] The iterator is iterating through this particular array that has one or more items in it. And the interesting thing we're doing with this array is using the table aggregator to create a table, which is usually what an invoice has, is a table of order details. And this iterator module is going through and selecting particular parts of the order details. We're using the value, the notes, the order detailed type of information from from the invoice.
[00:02:09]And we're doing something interesting here is, we are trying to create an HTML table. We're actually taking each row from the order details and creating a cell separator. This is an end cell , and this is an open table cell value. We're also using a closed cell and a closed row and an open row as a separator. This technique allows you to build a list of cells in a table. It's kind of a neat technique the table aggregator has, which you can create some interesting formatting for HTML or for potentially a spreadsheet.
[00:02:40] Finally, as this iterator is working, it's iterating all of these arrays on each invoice. And now we're going to compose a string. This is actually where we use HTML. This is where we assemble all of the details for each invoice that we've accumulated.
[00:02:53] We've got a document number that's coming from the invoice details. We've got the domain name, which is the URL of the website. And we're even loading a logo so you can put the logo of their organization inside of your invoice. You can create a dynamic link to this invoice by using this information . And then we've got all the details of the organization. What type of order it was the invoice number. We format that the date of the invoice using the format date function. And then we create a format of the invoice.
[00:03:23] So you have first name, last name, organization, email. We're creating this table and we're going to use that aggregated table in the result of that table aggregator. We've opened up the table row so that this table aggregator fits nicely into this formatted HTML table. You could do this with CSS and all kinds of other nice way you can find , and then put your variables where you want them. Finally, we're formatting the number, which is a a currency field and a formatting with two decimal points.
[00:03:55] We're making sure that this looks really nice and creating the public memo. And then creating the URL to view this invoice online.
[00:04:02] The last step of the scenario is simply where to deliver the invoice. We're uploading the file into Dropbox and naming the file dynamically so that you can have a unique file name. What I'm going to show you next is what it looks like when it's actually generated.
[00:04:16]Here's an example of a bunch of invoices that we had for one of our clients. You could see there's an invoice number here. And if we open this up in the HTML, you'll see that there is a a nice invoice.