Requirement : Invoice PDF
JCurve Solutions Limited would like to create the Invoice PDF template as per the given layout.

Our Solution
The requirement can be achieved by customizing the advanced PDF template of the Invoice and that template can be applied to the preferred Invoice form. So, the users can generate the print by clicking the standard print button from the Invoice record.
- Field Mapping can be followed as per the given mapping file.
- The “Angsana” font can be used for the content
We will create two custom body fields on the invoice record. A script needs to be deployed on save of the invoice which will create the Invoice Total in Thai words and populate work order document number from the record selected in the “createdfrom” field. These can be stored in these custom fields. These custom fields value can be used to source the values on the print.
The layout of the PDF will be designed as below
- Headers (1 to 15) will be displayed on every page.
- The item body table can be considered as Dynamic. So, the table will end immediately after the item lines.
- The summary section from 23 to 29 is displayed at last page only if multiple pages in print.
Assumptions:
- Only an Original copy needs to be generated per invoice in H 28cm x W 21.7cm page size.
- The header section (actions 1 to 15) will be repeated on every page if the print has multiple pages.
- The amount format is decimal and comma-separated(xxx,xxx.xx) and can be aligned right
- The Thai words/Labels will be provided by JCurve and we can hard code the Thai labels in the print.
- The font style should be Angsana and the font size should be the same as the file provided by the client.
- The field sourcing will be done based on the file that is provided by the client and we assume all the fields are available in the SIM NetSuite account
- The tax rate will be populated from the first item line of the current invoice record
Risks
- We can get data only from the current record and the next to join records such as Company and Entity. If any data needs to be populated from the record with more than one join/from item record, then that needs to be populated to a custom field on the corresponding transaction by sourcing or scripting.
- Customer ID will be shows full text and fixed into 7 digits.
- The mapping from 3 to 5, utilize mentioned space without limiting content.
- Transaction ID will be shows full text and fixed into 10 digits
- Tax Rate can be moved into right as per the given sample
- For the field mapping 9, display in a single line for full text without cut data. The maximum digit of text is 20 digits. If the PO number is less than 20 digits in length and doesn’t fit in the allocated space, we will allow it to overlap with the SO number column to the right. We will shorten PO number display if their contents are more than 20 digits.
- For mapping 10, display in a single line and cut the data if it exceeds the one line.
- In field mapping 17, display in a single line for full text without cut data. We assume maximum 15 digits can be placed in this column. Therefore, If the content exceeds 15 digits, we will shorten display of this column value.
- The field mapping 18, limited the text display to the second line if it extends beyond the second line. Hence fixed height must be set for each item line in order to wrap the content onto the second line. Height couldn’t be compressed into a single line if the description has content to show in single line. So, we always allocate 2 lines of spacing for every item without considering whether the content exceeds 1 line or not.
- By setting this fixed height for each line we can maintain the summary section in designated place as per sample.
- Tax rate will be only considered from the first line of the Invoice even if that is blank or the Tax rate is different in a different line
- Work Order document number is taken from any of the item lines (if it has Created WO) of “createdfrom”.
- The Amount in Thai Words conversion will be done by using the predefined library and its conversion logic will depend upon the functions defined within that Library