J-curve would like to create the Invoice PDF template as per 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 custom 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
The layout of the PDF will be designed as below
- Header will be displayed on every page
- The item body table can be considered as the Dynamic. So, the table will be end immediately after the item’s lines
- Summary section can be added immediately after the Item table
Assumptions
- Copies need to be generated per invoice. 1 Original and 1 or 2 copy in A4 page size.
If [Invoice.custbody_scg_ar_doctype] is ใบส่งของ/ใบแจ้งหนี้ – AR, then print 2 copies
- ต้นฉบับ สำหรับลูกค้า / Original for Customer
- สำเนา สำหรับเก็บเป็นหลักฐานทางบัญชี / Copy for Accounting
If [Invoice.custbody_scg_ar_doctype] is ใบกำกับภาษี/ใบส่งของ/ใบแจ้งหนี้ – AR, then print 3 copies
- ต้นฉบับ สำหรับลูกค้า / Original for Customer
- สำเนา 1 สำหรับลูกค้า / Copy 1 for Customer
- สำเนา 2 สำหรับเก็บเป็นสำเนาใบกำกับภาษีและหลักฐานทางบัญชี / Copy 2 For Tax Invoice and Accounting
If the doctype other than the ใบกำกับภาษี/ใบส่งของ/ใบแจ้งหนี้ – AR or ใบกำกับภาษี/ใบส่งของ/ใบแจ้งหนี้ – AR, then print will be created only with an original copy – ้นฉบับ สำหรับลูกค้า / Original for Customer
- The header and footer section (actions 1-34 and 77- 78) will be repeated on every page if the print has multiple pages
- For field mapping 36, if Invoice is standalone then show PO number only.
- For field mapping 10,
- If [Invoice.custbody_scg_ar_doctype] is ใบส่งของ/ใบแจ้งหนี้ – AR, then show
ใบแจ้งหนี้
INVOICE
- If [Invoice.custbody_scg_ar_doctype] is ใบกำกับภาษี/ใบส่งของ/ใบแจ้งหนี้ – AR, then show
ใบกำกับภาษี/ใบแจ้งหนี้
TAX INVOICE/INVOICE
- If doctype other than ใบส่งของ/ใบแจ้งหนี้ – AR or ใบกำกับภาษี/ใบส่งของ/ใบแจ้งหนี้ – AR, then show
ใบแจ้งหนี้
INVOICE
- For field mapping 54,
- it will show withholding Tax (custpage_4601_witaxamount) amount if the bill to is Thailand.
- Otherwise populate the line amount from item, where item is Withholding tax receivable (WHTDeduct) available in the current invoice
- If bill to is not Thailand and no Withholding tax receivable (WHTDeduct) item in current invoice then show 0.00
- Regarding the item table, based on the attached excel sample
We can Group the Line Discount amount along with preceding item line. But the display of discount Item lines will be skipped from the print.
If the discount item (other than Line Discount) is coming after any other type item line, then discount column of print will be empty
- For field mapping 76, fixed size will be given for signature image. We assume that all signatures will be in same size.
- The amount format is comma-separated.
- The Thai words/Labels will be provided by the JCurve Solutions Limited 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 Netsuite account
- The date format should be same as in the given sample print
Risks
- As now we can apply the above PDF template customization into currently available invoice forms such as SCG Invoice and SCG Asset Invoice. If you want to display this PDF on other than SCG Debit Memo form, then manually apply this newly created Invoice template to custom invoice forms.
- We can get data only from the current record and the next join record such as Subsidiary and Entity. If any data needs to be populated from 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. This is not included in the current scope
- If document has more than 1 page, Total will show only in the last page
- The withholding Tax in mapping no. 54, will be shown within bracket as per sample even if the withholding tax is positive value. It will show 0.00 if it has no value
- The item table will end immediately after the item lines and will begin the summary table (44-76 and 79)
- The contents in the summary part (44-76 and 79) may break into multiple pages due to the long content.

- The summary section will split into 4 sections such as
- Section 1: 44 to 56 and 79,
- Section 2: 57 to 73,
- Section 3: 74 and
- Section 4: 75 to 76.
So, here the page break will be done accordingly
- Item table header will be repeated in all pages even if the item lines end but still page with summary part
- There will be chance to show double horizontal lines (item table header line and summary part line) if page start with summary part.