Advanced PDF-HTML Development in NetSuite

In this article, we’ll discuss the challenges and insights learned from doing advanced development in NetSuite to implement it as Smartbridge’s new accounting and professional services management system.

At Smartbridge, we implemented NetSuite, replacing Quickbooks and Tenrox as Accounting and Professional Services Management systems respectively. One of the greatest challenges of this implementation was having to do advanced development of complex invoices.

We use the detailed invoices to provide maximum transparency and visibility to our customers. The NetSuite out-of-the-box invoice template does not provide the required level of details. Also, there are different formats required for different types of invoices like Time & Materials, Fixed Price, Milestone, etc. We therefore needed to customize the invoice template to satisfy the requirements.

This project presented an additional layer of complexity, facing a hard deadline based on the yearly renewal agreement of our Professional Services Management software with only 12 weeks to complete NetSuite Accounting and Project Management implementation and only 4 weeks to complete all developments.

The time I was assigned to this project, I had very limited knowledge of NetSuite development since my background is primarily in JD Edwards development. Hence, I thought to share my experience with others.

Advanced Development Netsuite
Figure 1: NetSuite out-of-box Standard Invoice template

WYSIWYG Mode vs. Source Code Mode

NetSuite provides two modes to the developers:

  • WYSIWYG mode

  • Source code mode

Source code mode gives the developers more power for customization, whereas WYSIWYG mode is best when the layout is not complicated and uses only simple tables with no subtotaling at different data levels.

In source code mode, developers make use of the following tools:

Oracle NetSuite
Advanced Development NetSuite
Figure 2: WYSIWYG mode
Advanced Development NetSuite
Figure 3: Source code mode

The Requirements:

There are 3 different formats required:

  • Fixed Monthly Invoice

  • Time & Materials

  • Milestone Invoice

Other requirements for this project include having a:


Header with important details like remit to, bill to, etc. and then a summary bill row.

Invoice Summary

Grouped by resource and week. Shows subtotal on the group and grand total row.

Timesheet Details

Print timesheet details by the resource (both billable and non-billable), subtotal by each week, a total of billable amount & non billable amount in a separate row, and subbtotal by resource.

Expense Details

Print expense details by a resource (both billable and non-billable), subtotal by each week, a total of billable amount & non-billable amount in a separate row and subtotal by resource.

Advanced Development NetSuite
Figure 4: Invoice header
Advanced Development NetSuite
Figure 5: Summary section
Advanced Development NetSuite
Figure 6: Summary section taskwise template
Advanced Development NetSuite
Figure 7: Invoice summary section
Advanced Development NetSuite
Figure 8: Detailed time report section
Advanced Development NetSuite
Figure 9: Detailed expense report section

Development Considerations:

This was a very complex project and non-billable details added more complexity to the requirements. In such complex scenarios, I found the following rules helpful:

  • Use WYSIWYG mode for the designing of the header and footer, company logo, and font size.

  • Once you are done designing in WYSIWYG mode, switch to source code mode. In source code mode, developers have more control of the document. Switching to WYSIWYG mode from source code mode can mess up the logic developers have written, so be careful.

  • Divide the template into different sections like summary, timesheet details, etc.

  • Try to keep sections independent.

  • Put comments in your code.

  • Use indents in the code so that multi-levels are easily identified, for maintenance.

  • Use functions for calculations. I used functions extensively to calculate week dates and totals of fees, expenses, etc.

  • Test the changes part by part.

  • Once the testing of a part is successful save the code (preferably take code back up).

  • Prepare the test data and create test scripts to cover all the possible scenarios.


In the first billing cycle using NetSuite, we faced some challenges in processing the invoice on time. However, once we set up newly developed invoices, the time it took to process the billing reduced from days to a couple of hours.

We set up the multiple templates functionality which NetSuite provides. This helps us remove the manual invoicing process, improve productivity, and save a lot of time for our admin staff.

After the stabilization period, Recurrent Fixed Price invoices run on a schedule and the billing is generated without user intervention.

Looking for more on systems modernization?

Explore more insights and expertise at

There’s more to explore at!

Sign up to be notified when we publish articles, news, videos and more!