Happy Business Starts Here

Allow repeated tables in invoice template

Allow repeated tables in invoice template

Currently if you try to include the same table twice on an invoice template, you receive the following style error when uploading:

 

TableStart:TaxSummary is a duplicate table.

 

This is an issue for us as we wish to display a differently formatted table based on the region. For example for our EU invoices we need to format the table to show "VAT" rather than "Tax". There are other instances where we might wish to show or hide a column and the only way to do this is have a second table with the different formatting and chose to show it or not based on IF conditions.

 

The quote templates already support repeated tables (its even used in your example template) so this seems to be more of an artifical limitation imposed by invoicing rather than a technical one.

 

11 Comments
Zuora Product Team
Status changed to: Under Consideration

Hi,

 

I'll think about this for a future release. Thanks!

 

Nick

Valued Scholar

@nharlow Nick, I agree that this would be an invaluable addition to the Invoice Template functionality. One thing we have struggled with multiple times as we have revised our invoices is table placement. We host a large number of custom fields on the Subscription and while we want to dispaly all of this information on the Invoice Template, these fields are more or less important (from a billing perspective) and we would like to be able to place them at either the beginning or end of the invoice depending on the content respectively. However only being able to display the Subscription table once means that we had to choose a middle ground where we would put all of the information together.

Guru

So I am either going crazy and I imagined that Quotes supported repeated tables or something changed recently that stopped it from working (in which case Smiley Sad)

 

At any rate, having repeated tables is important in both Quotes and Invoices to allow flexible formatting without having the hassle and complexity of many templates.

Scholar

Is there anything any of you are using as a workaround for this? We currently would like to pull service dates into our invoice, but there is different logic for service dates on different products. Since we can't pull in the table more than once, we can't use IF THEN statements to pull in diff. service periods...our business hates that we can't put this on the invoice. Would appreciate any insight into a workaround for this. 

Guru

@spaolozza our service dates also have some product specific logic on them. Rather than trying to segment the tables, we apply the logic in the cell itself.

 

For example (in pseudo code):

 

If Product is perpetual, show "N/A" in the service period.

If Product is normal subscription show InvoiceItem.ServiceStartDate to InvoiceItem.ServiceEndDate

If StartDate == EndDate Show only the StartDate (i.e. if its an activation/one-time charge)

 

So you can use IF statements just within the normal table loop.

Newly Enrolled

@nharlow Any update on this? It's been almost two years.

 

This is very important for flexible formatting. We have a requirement where we need to hide or display a column and at present the only way zuora supports this is by having multiple tables and showing them based on IF conditions but we are stuck because repeated tables ain't supported in invoice templates. Thanks.

Guru

@abbasali we have this use case as well, we worked around the limitation by generating the entire table within a loop manually.

 

Essentially we did something like this:

 

IF format1_condition:

OUTPUT format1_table_header

IF format2_condition:

OUTPUT format2_table_header

 

BEGIN TABLE 

 

IF format1_condition:

OUTPUT format1_table_row

IF format2_condition:

OUTPUT format2_table_row

 

END TABLE

 

At the end of this you essentially still have one loop. Under the hood its not actually a single table but many individual tables that happen to all line up because they are repeating.

 

I show this in an example I posted here: https://community.zuora.com/t5/Zuora-CPQ/Quote-Template-Sample-with-Advanced-Customizations/td-p/157...

 

All that being said... @nharlow we would still love to see the ability to repeat the use of tables so we dont need such complicated templates ;-)

Partner

Hello,

 

we recently had this also block some ideas to show data on multiple points in the invoice. By accident we discovered that for `InvoiceItem` you can have this table twice. You need to use

`Table:InvoiceItem`  and `Table:InvoiceItems`. Be aware the the table with the plural form only works for non-nested tables.

 

Thought someone could use this.

Savvy Scholar

+1, I'm running in to this issue trying to conditionally render a table of transactions.

If there are no transactions I want to hide the table completely including the header, so it makes sense that I loop through once and set a local variable along the lines of "HasTransactions" and set it to 1 inside the first transactions table. Then later when it comes to rendering the table I want to display the table only if HasTransactions is set to 1. But I can't, because Zuora doesn't allow it and the only reasonable workaround causes problems with some invoices.

Guru

@jamiedavidson While repeated tables would make this simpler to implement, this is currently possible in the current system. What you can do is generate and store your table into a "Bookmark" (this is Word template speak for a variable) and also using another variable to count the rows in the table.

 

At the end of this you can decide if you want to display the entire table or not based on the variable's value. My post https://community.zuora.com/t5/Zuora-CPQ/Quote-Template-Sample-with-Advanced-Customizations/td-p/157... has some tricks you can use for this (the post is for the Quote template but they use the same generator so the same tricks and methods work here.