Requirement 1: Customer Payment PDF – Receipt_Tax
J-curve would like to create the Customer Payment PDF template as per given layout

Our Solution
The requirement can be achieved by creating a script for adding a custom button named Receipt Print in the Customer Payment. When the user clicks the custom button then PDF will be generated based on the document type of current Payment.
Also, a script needs to be deployed on save of the Customer Payment, which will create the Customer Payment Total(applied) in Thai words and store it in a separate custom body field. This Amount in words can be used on the print
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 Customer Payment. 1 Original and 1 or 2 copy in A4 page size.
If [payment.custbody_scg_ar_doctype] is ใบกำกับภาษี/ใบเสร็จรับเงิน – AR, then print 3 copies as below
1. ต้นฉบับ สำหรับลูกค้า / Original for Customer
2. สำเนา 1 สำหรับลูกค้า / Copy 1 for Customer
3. สำเนา 2 สำหรับเก็บเป็นสำเนาใบกำกับภาษีและหลักฐานทางบัญชี / Copy 2 For Tax Invoice and Accounting
- The header and footer section (actions 1-34 and 76- 77) will be repeated on every page if the print has multiple pages
- For field mapping 10,
- If [payment.custbody_scg_ar_doctype] is ใบกำกับภาษี/ใบเสร็จรับเงิน – AR, then show
ใบกำกับภาษี / ใบเสร็จรับเงิน
TAX INVOICE / RECEIPT
- Regarding the field mapping 57, In partial Payment case, withhold tax amount is show as the sum of withhold tax amount of corresponding transaction applied on the current Payment. Where consider only the withholding tax amount of transaction applied on the Applied To subtab. In case of full payment, then the withhold tax amount will be 0.
- For field mapping 12, 13, 14, 18, 21, 24, 50, 51 are populated from the first transaction line applied on the Applied to subtab of current Payment
- For field mapping 21, will be empty if the transaction applied in the first line is standalone invoice.
- In case of Payment.custbody_scg_print1line is checked, then show all transactions lines (on Applied To and Credit Applied subtab) in the print.
- If Payment.custbody_scg_print1line is checked then for field mapping 42 will be calculated as follows
[Payment.applied] + Sum of Withholding Tax for each Line Payment]
Where Withholding Tax will be considered from sum of amount of Credit Memo transactions coming under Withholding Tax Subtab. Credit Memo Amount will be taken from the corresponding Credit Memo record.
- Regarding the item table,
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 74, 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
- 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
- Only a single button will be available in Payment record for the Receipt Print. Print layout will be generated based on the Document Type
- If document has more than 1 page, Total will show only in the last page
- The withholding Tax in mapping no. 57, 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 (43-75)
- The contents in the summary part (43-75) may break into multiple pages due to the long content.
- The summary section will split into 3 sections such as
- Section 1: 43 to 60,
- Section 2: 61 to 72,
- Section 3: 73 to 75
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.
Requirement 2: Customer Payment PDF – Receipt
J-curve would like to create the Customer Payment PDF template as per given layout

Our Solution
The requirement can be achieved by render print through same button (Receipt Print) click created for above customer payment print.
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 Customer Payment. 1 Original and 1 or 2 copy in A4 page size.
If [payment.custbody_scg_ar_doctype] is ใบเสร็จรับเงิน – AR, then print 2 copies as below
1. ต้นฉบับ สำหรับลูกค้า / Original for Customer
2. สำเนา สำหรับเก็บเป็นหลักฐานทางบัญชี / Copy for Accounting
- The header and footer section (actions 1-28 and 58- 59) will be repeated on every page if the print has multiple pages
- For field mapping 10,
- If [payment.custbody_scg_ar_doctype] is ใบเสร็จรับเงิน – AR, then show
ใบเสร็จรับเงิน
RECEIPT
- For field mapping 12, 13, 14, 18, 21, 24, 50, 51 are populated from the first transaction line applied on the Applied to subtab of current Payment
- For the field mapping 31 and 32, transactions considered from both Applied To and Credit Applied subtabs.
- Regarding the field mapping 39, In partial Payment case, withhold tax amount is show as the sum of withhold tax amount of corresponding transaction applied on the current Payment. Where consider only the withholding tax amount of transaction applied on the Applied To subtab. In case of full payment, then the withhold tax amount will be 0.
- For field mapping 56, 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
- 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
- The above 2 customer payment print will be generated using same button Receipt Print based on the document type.
- If document has more than 1 page, Total will show only in the last page
- The withholding Tax in mapping no. 57, 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 (33-57)
- The contents in the summary part (33-57) may break into multiple pages due to the long content.
- The summary section will split into 3 sections such as
- Section 1: 33 to 42,
- Section 2: 43 to 54,
- Section 3: 55 to 57
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.