Adding Company/Customer TRN / Tax ID to Quotation

Hi. Can someone let me know how to add company and customer TRN/Tax id in quotation?

I am able to select these items in Sales order and Sales Invoice but when customizing Quotation, Tax ID/TRN aren’t available on the left side to drag and drop.

Please help.

Add custom field for TRN and Tax Id on Quotation form

but how will that field automatically fetch the customer and company tax ids? what code has to be used in custom fields?

Use the following code for the TaxID in Quote.

{{frappe.db.get_value(“Supplier”, doc.supplier, “tax_id”)}}

it’ll get that taxid on Quote as well.

i need customer tax id, not supplier tax id. However, I tried both Supplier, and Customer in the code you gave. Both gave me errors when clicking print icon.

This code is working without any issue.

for Customers,

{{frappe.db.get_value(“Customer”, doc.customer, “tax_id”)}}

and for Suppliers,

{{frappe.db.get_value(“Supplier”, doc.supplier, “tax_id”)}}

just make sure you are using the latest version. if not, just make sure that you have custom Field “tax_id” in both DocType.

these have to be used in custom html or custom field?

in Custom HTML. with proper formating to appear in Design.

I am using ERPNEXT online.

wrap it in div tag.

{{frappe.db.get_value(“Customer”, doc.customer, “tax_id”)}}

If you need it for UAE/KSA, it is available out-of-the-box.

https://erpnext.com/uae-ksa-vat

@adnan I am pasting exactly what you gave all this time (as seen in the screenshot in my previous reply). Now i even added

tag but still nothing.

{{frappe.db.get_value(“Customer”, doc.customer, “tax_id”)}}
or

{{frappe.db.get_value(“Customer”, doc.customer, “tax_id”)}}

both don’t work

@umair I know it’s available to enter into the system but problem is fetching the tax ids for modifying Quotation Template. Sales Order and Sales Invoice has these fields available to put in the Invoice. There should be a way to just fetch a constant value like Tax ID from the System and just display it in a custom template (quotation, sales order, purchase order or wherever required)
But it seems like the only way to make it available in custom template area is to add custom field… But even then, how can I add the custom field that can fetch the data already in the system?

the div tags are not being displayed in the above reply… but the code after or has div /div tags. but it doesn’t work in ERPNEXT with or without div tags

update?

it’s working fine at our end.

this is the only code which is required to call field.

I also tried to enter the code from @adnan into an custom html field at print format so i can display customers tax id in my quotation. but it does not work out! :roll_eyes: sure custom field is a workaround, but its not good to have a temporary field always in the main view.

does automatic displaying the customer tax id only work in sales invoices?

For whomever who might end up at this thread: make sure to adjust the " in the above post. This is what prevents it from working. Just copy the line, put it in between a div tag, and replace the “” by typing them again.