PDF Template for JCurve Solutions Limited – Part 2

Requirement: Customer Payment PDF 

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 in the Customer Payment. When the user clicks the custom button, then the script will render the custom pdf template and will generate the corresponding printout. 
 

Field Mapping can be followed as per the given mapping file. 

The “TH Sarabun New” font can be used for the content 

The layout of the PDF will be designed as below 

  • Headers will be displayed on every page. 
  • The item body table can be considered as the Dynamic. So, the table will end immediately after the item lines. 
  • If there are multiple pages, the “ยังมีรายการต่อ” (Continue with next page) label needs to be added at the end of all the pages, except the last page. 

Assumptions 

  • Print will be generated in A4 page size. 
  • The header (1-19) will be repeated on every page if the print has multiple pages. 
  • The summary section (27 to 29) can be added immediately after the Item table.  
  • The footer (30-43) will be repeated on every page if the print has multiple pages. 
  • The borders around the footer section can be removed 
  • The font style will be “TH Sarabun New” 
  • The Thai words/Labels will be provided by JCurve and we can hard code the Thai labels in the print. 
  • 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 Netsuite account 
  • The date format should be in the format “DD/MM/YYYY” 
  • For 7th field, the Bill address will be populated from the invoice applied in the first line of Payment 

The address will be displayed as follows even if the Customer type is company or individual 

ลูกค้า [customer.entityid] 

[Customer.companyname] 

[invoice.addr1] [invoice.addr2] 

[invoice.addr3] [invoice.city] [invoice.zip] 

If any of this field value is empty, then it will be skipped and the next data will be displayed immediately after the previous data 

  • On 12th field, the entity branch value populated from the payment record 
  • Only transaction type invoice needs to be considered from Payment for the item table (21 –29) 
  • The field mapping 27th (custbody_amount_to_text) is not available on the Netsuite account. We assume that Jcurve will set up that field in the Netsuite at development phase. 
  • The amount format is decimal and comma-separated(xxx,xxx.xx) and can be aligned right 
  • Image/Signature size will be in a proper/unique size 

Risks 

  • If the document has more than 1 page, the Summary will show only on the last page 
  • The item table will end immediately after the item lines and will begin the summary table 

Leave a comment

Your email address will not be published. Required fields are marked *