This article is relevant if you are working with NetSuite and you would like to consolidate customer invoices.
Background
One of our clients is a leader offering global payroll services. They came to us to help them properly re-implement NetSuite to drive complex international foreign currency accounting. In my client’s business model, they have customers that need payroll services for their employees who work overseas. Each employee is represented in NetSuite as an employee contract. Our client has customers that may have multiple employee contracts. Our client bills monthly and the goal is to present a single customer invoice for all the employees that are under contract.
In contrast to our specific client situation, a more general pattern is to have multiple sales orders for a single company that are threaded together by a project. Consider a technology organization that delivers hardware, software implementation services, and recurring billing for hosted applications. These different business offerings may each be represented on a separate sales order but are held together by a common project reference. The point here is that while a customer may have multiple sales orders that need ultimate delivery, in the mind of the customer, they share a common overall objective for which was constituted as a project.
Distinguishing Revenue Recognition from Bill Presentment
I have seen prospective client situations where they want to get a certain invoice presentation to their customers — thus they did work to modify NetSuite records to fit document output objectives. In doing so, this caused issues with a revenue recognition policy.
To solve for any consolidated invoice challenge, we first need to respect the desired revenue recognition policy. For the purpose of this article, I will simplify the conversation to say that as soon as we ship the product, or we perform the service, we have earned the revenue. The easiest way to earn that revenue is to create a respective NetSuite invoice record at the same time we record we fulfilled (perhaps a shipped item fulfillment or an approved timesheet). Because NetSuite offers a full blown revenue recognition system, I respect much more can be said. Yet going into that subject here will only obscure the important points to be made: solve first for your revenue recognition policy before attempting consolidation.
For our goal here, we will think of the invoice as our revenue event under the proper revenue policy (naturally, the invoice is the most common pattern I observe used in our client organization to record revenue). But it may not be our bill presentment event. Meaning, we have some freedom between what we generate as revenue and what we generate as a bill to distribute to a customer.
NetSuite Bill Presentment Considerations
The key to a consolidated invoice is to be respectful of the NetSuite architecture and the revenue recognition policy. In NetSuite, the Sales Order acts as a controller record for driving invoice generation. See my related article. We do not want to lose this. Let NetSuite do what it does very well to keep those two transaction types under control.
Once an invoice is properly generated for revenue purposes, we have an opportunity to take multiple invoices and pull them together into a single bill for presentment to the customer. To do so means we need to have something in common between the invoices.
Thus bill presentment requires addressing two independent but related concerns:
- Bill Generation: the mechanics of producing an artifact (typically a PDF) that can be presented to a customer.
- Bill Distribution: the mechanism to electronically move the artifact to a place the customer can receive it (typically email).
For this article, we are not interested in Bill Distribution. We are interested in Consolidated Bill Generation.
Method for Solving Consolidated Bill Generation
I will say up front that I am not an advocate of a technique where you take multiple invoices targeted to be consolidated, craft a credit memo, apply the credit memo to the invoices, and then generate a single invoice for consolidation. However, I can see why folks would do this as it is easier to conceptualize and organize accounting functions around one record. Yet, I take the view that if we performed invoicing correctly, and thus we have recognized revenue correctly, we now really have only one concern — getting paid. I view any additional modifications to sound NetSuite records as avoidable risk that produces costs which must be managed through additional accounting operations.
Consider that since we must have something that we are using to consolidate invoices into a bill, we must also have something to say about the fact that each invoice is individual. Thus, goodness is inherent in both the individual invoice information and the element that we are using to produce the group. For our demand for payment, our goal now is to produce a consolidated bill in a manner which will be the most meaningful to the customer so we can minimize any questions that may come forth.
Since NetSuite is a database application, we have the opportunity to find the invoice records we are interested in and consolidate them into a single bill. Thus we use the NetSuite Platform, and the full capacities of SuiteScript, Saved Searches and Advanced PDF technology to make the consolidated bill become a reality.
The easiest bill generation pattern to understand is a miniature customer statement. In this pattern, we do the following:
- Individual Invoices: we generate each individual PDF like we would traditionally. Let these PDF documents live on the NetSuite filesystem. Do not distribute.
- Package Cover Page: generate another PDF that will consolidate the summary of each invoice and use the total for the payment request.
- Reference Individual Invoices: after the cover page is created, pull each respective individual invoice into a consolidated single PDF file.
To make the solution complete, we need to address the following questions:
- Consolidated Bill Number: we may need to create a number that we can use for record lookup reference. The customer may also expect a single reference number.
- Consolidated Bill Date: we will likely want to date the consolidated bill. But we must respect that the underlying invoices may have different dates.
- Cash Receipt Processing: When we are paid, the customer may reference the Consolidated Bill Number. NetSuite’s cash receipt application will be ignorant to this consolidated bill number. Thus we may want to create a helpful cash receipt lookup function to automatically select all the related invoices when the consolidated bill number is referenced.
All these matters are subject to invention depending on the specific business requirements. To see a sample consolidated invoice, click here.
How to Include External PDFs into a New NetSuite PDF
For readers that will produce this conceptual solution, here is the BFO (Big Faceless Organization; NetSuite’s PDF generation engine) syntax that you need to pull in external PDFs into the PDF you are generating. In this example, I am illustrating that I am looping through a list of PDF invoices (called batchline) by referencing their location on the NetSuite file system via their URL. The pattern here is to craft the cover page and at the end, bring in the other invoices that were previously generated.
<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd"> <pdfset> <pdf><!-- build the standard package pdf here--></pdf> {var url_host = "https://system.na2.netsuite.com/"} {var url_link_doc = ''} {if defined('batchline')} {for xbatchline in batchline} {if xbatchline.columns.custrecord_pri_cre_request_output_dlink} {var url_link_doc = xbatchline.columns.custrecord_pri_cre_request_output_dlink.replace(/&/g, "&")} {var url_link_doc_complete = url_host + url_link_doc} <pdf src="${url_link_doc_complete}" /> {/if} {/for} {/if} </pdfset>
Many readers know that I reference our Content Renderer Engine (CRE) in some of the innovations we have produced with clients. While that tool makes it very easy to produce PDF / HTML and other outputs, all these patterns are possible with the SuiteScript platform. The pattern above requires that you get a list of invoices (generally via a saved search in SuiteScript) injected into the BFO environment so you can indeed produce the dynamic invoice PDF list.
Selecting the Invoices to Consolidate
We need some technology to select the invoices that will be consolidated. In your business case, there will be a key (in our client’s example, it was the employee contract; it may be a project). In our CRE framework, we have a concept of a batch handling tool that can be used to generate detailed CRE Profiles (think of these as the individual invoices) which allows us to process the batch last to act as our final consolidated record. The tool is flexible because we can either a) allow users to hand pick individual invoices for consolidation or b) automatically select the invoices on user behalf by referencing a common key.
Consolidate Your Invoices
My goal has been to show you a pattern to consolidate NetSuite invoices (or any NetSuite transaction record) leveraging reporting tools versus modifying the underlying accounting records. I believe this technique is sound and low risk. For readers that wish to produce a consolidated invoice, we provide our Content Renderer Engine (CRE) tool without charge when we setup a professional services relationship. This tool has helped our client developers, NetSuite Administrators and business users become more productive. If you would like to solve your NetSuite record consolidation requirements, let’s have a conversation.
See Related Articles
- Deliver Complex NetSuite Outputs via User-Centric Options
- Easier Crafting with Data-Driven Syntax for NetSuite Advanced PDF Templates
- Get License Free Tools to Link NetSuite Saved Search / SQL to Extend Data Reach
- Learn the Framework to Extend NetSuite Content Generation
- Learn how to Overcome NetSuite’s 10 MB PDF File Size Limitation
Hi, may I ask if it is possible for netsuite to generate a consolidated invoice based on multiple approved sales orders?
My understanding is that NetSuite can automate billing to customers but NetSuite can only generate one invoice for one sales order. Hence, if there are multiple sales orders for one customer, multiple invoices will be generated. Can we consolidate into one invoice per customer?
Hi Nicholas,
In general, no. NetSuite uses the Sales Order as a controller and thus is bound by that scope. But the concept of packaging multiple invoices from multiple sales together into a single deliverable is possible.
Marty
I was trying to reference body field in the PDF code for a consolidated invoice but wasn’t able to. I wanted to check the subsidiary field to add some conditional logic based on this, any suggestions?
Hello John,
See this article.
https://blog.prolecto.com/2016/07/16/learn-how-to-bring-netsuite-subsidiary-data-into-advanced-pdfs/
With NetSuite provided tools, I think the best you are going to get is “record.subsidiary” which should return an integer.
Marty