I am trying to add Tax ID or Vat number to the sales order and Sales invoice document. The customer field has a field called Tax ID with field name “tax_id”
So in SETUP-> CUSTOM SCRIPTS-> we add this script “cur_frm.add_fetch(“customer”,“tax_id”,“tax_id”);” to Doc type Sales Order.
Then iSETUP->CUSTOM FIELD we add the following
Document
Sales Order
Label
Tax ID
Fieldname
tax_id
Insert After
Custom name
Select the label after which you want to insert new field.
Field Type
DATA
Then you go to quotations and create a sales order but the TAX ID field is not filled in. It is as if the script is not running to transfer the tax_id to the sales order. Even after reloading “clear Cache”.
Hello Go to setup / custom scrip select sales invoice as target document and add this line cur_frm.add_fetch(“customer”,“tax_id”,“tax_id”); save reload and clear cache dont use The “” at The bigining and end of code.
The Tax id is in the Customer form. This is listed in the documentation as having a field name of tax_id.
I just cannot see why the Tax ID is in the sales order screen but it is empty. The tax_id from the customer form is not transfered. I have the tax_id in the custom field screen showing the type as DATA. Even clearing cache logging out and in then creating a new sales order does not work.
In the customize form you can see the TAX ID line 7
you are right it should work out of the box , try creating a new field at customer label called for example vat as data and add this code cur_frm.add_fetch(“customer”,“vat”,“tax_id”);