Hi
I have one custom field in Sales Invoice, I need this field also to come in the aginst Sales Invoice field as an option along with Sales invoice name,date of creation, customer name, fiscal year and total amount in journal Entries table in Journal Voucher.
This should work, the only thing is that FS No would be in the JV Details table and not in the JV main since there could be a case when you have multiple against Sales Invoices in a JV.
Hello Adityaduggal,
Thanks for your quick respnse, appreciate that. Forget about the above two pictures for the time being and let us concentrate on the third one. Very simple, i need my custom field value(alrady on the Sales Invoice) to come as a selection options like the others name ‘SINV-00067’,2014-07-25,2014-09-08,ICAP ETHIOPIA - LITP,2014-2015,297000,FS000258(my custom field value from sales invoice)
I think that the code I have mentioned for the custom script should fetch the fs_no. But if it not fetching then you would have to ensure that the field name for “Last Invoice FS No” on JV detail should be fs_no only.
Hi Aditya,
No, Sorry, i think we are not on the same track, forget the “Last Invoice FS No” it is there for other purpose. I made this one clear in my last question. How to bring the FS No value as an option for selection in the Against Sales Invoice field. Sorry for the misaunderstanding and Thanks for your rapid response.
Thanks
I added also a custom field on the search field of Delivery note to be filtered by that, like i did for the sales invoice but it is not coming on the stock entry during sales return.
Does it not work for all or what?
Why are you adding that custom field in JV parent form? It will not work in case there are multiple invoice linked in the JV. Instead you should add the custom field in JV child table. And in that case, the steps mentioned by @adityaduggal should work perfectly.
If you want the custom field in the parent form, add_fetch method will not work, you have to write some server side script (using python) to fetch and set the value.
Thanks Nabin,
I did it on my test server and its working fine but it is not on my live server. i edited similar file but with no reflection. Am i editeng the wrong file or what?, here is the path…
home/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py
I saved and cleared cache
Thanks