We can create a custom GSTIN field in the address book using the ‘Customization’ menu, specifically navigating to ‘Lists, Records & Fields’ and selecting ‘Other Record Fields.’
The GSTIN number for each customer can then be added by editing the respective address field in their customer records.
When generating a new invoice and choosing a customer with a GSTIN, this information will automatically appear in the invoice’s address section. To display the GSTIN below the ‘bill to’ address, we can implement a line-by-line approach for fetching the bill to address in the advanced PDF template.
<tr>
<td class="address" colspan="2" style="padding-left: 0px;">
<#if record.billingaddress.attention?has_content>${record.billingaddress.attention}<br/></#if>
<#if record.billingaddress.addressee?has_content>${record.billingaddress.addressee}<br/></#if>
<#if record.billingaddress.addr1?has_content>${record.billingaddress.addr1}<br/></#if>
<#if record.billingaddress.addr2?has_content>${record.billingaddress.addr2}<br/></#if>
<#if record.billingaddress.city?has_content>${record.billingaddress.city}</#if>
<#if record.billingaddress.state?has_content>${record.billingaddress.state}</#if>
<#if record.billingaddress.zip?has_content>${record.billingaddress.zip}<br/></#if>
<#if record.billingaddress.country?has_content>${record.billingaddress.country}<br/></#if>
<#if record.billingaddress.custrecord_jj_gstin_field?has_content>GSTIN: ${record.billingaddress.custrecord_jj_gstin_field}</#if>
</td>
The provided code snippet enables the printing of the GSTIN number below the bill to address, accompanied by the label ‘GSTIN:’.