Fetching values

Is it possible to fetch manufacturing date and expiry date from batch master to sales invoice item table

yes you can.

Make two custom fields for Manufacturing Date and Expiry Date. And in the Fetch from section of those fields you can use it like mentioned here :


1 Like

Thanks for the reply
Please give me some time …will start as per your input :slightly_smiling_face:

1 Like

Sorry for the late reply (i got busy with some other work)
I just tried it …it dint work …i am working on v12…
I created two fields mdt and edt in item master (type=date) and same fields in sales invoice item table but it did not fetch

It would be a great help if you could suggest some other work around

1 Like

Can you post screenshots of the new fields you made.

1 Like

Sure …please give me an hour or so

It is possible to add add_fetch on the child too.

  cur_frm.add_fetch("account", "account_currency", "entry_type")

But That will trigger when I will choose account on my child table in your case that will trigger when you choose item_code on sales invoice item table


Thanks for the reply …will try…please give me some time.
I have another query related to fetching
For fields which have there type as “currency” for them I used simple code in fetch from …code was item_code.abc …so by using this code I could easily fetch my data from item master to sales invoice…but this somehow doesnt work for any DATE (Manufacturing date and expiry date )…i dont know why

Hi ,
Is it possible for you to help me with batch number

Thanks in advance

This one ?

Dint get you ?
I am done with the batch number but fetching values for fields is still an issue

I was quoting the issue you mentioned in the thread. What specifically are you facing ? Also share screenshots of the new fields that you made.

Hi ,Sorry for the delay in my reply …I was stuck with batch number hence was not able to proceed with the transaction,but now that is resolved so I will now run an end to end transaction in which Manufacturing date and expiry date should be fetched from “Batch master” to “sales invoice item” table …Please find screen shots attached as below

Capture5 Capture6 capture7

so here I create Manufacturing date and Expiry Date in sales invoice item table ,both the fields do get created but they dont fetch any value…Please let me know if I am supposed to provide some other information i n sales invoice item doctype

Please find the screen shot of sales invoice item table as below as below

i followed the following steps

  1. Created a company.
    2)linked it to warehouse.
    3)Created an Item.
    4)Made an stock entry (Material receipt).
  2. While making the stock entry I created a batch number for my stock in which manufacturing date and expiry date got automatically added then I completed the transaction.
    6)Then I created the sales invoice in which batch number was automatically fetched but both the dates were blank .

And I am using v12.

Should I delete the sales invoice and re-do the whole transaction again ?

Also earlier I had to create a field called MRP (minimum retail price) .The value of MRP was to be fetched from item master to sales invoice item…Initially I made the field with the same name on both the doc but no value was fetched but then I wrote a very simple code in fetch from of the sales invoice item doc …the code was item_code.mrp and it worked ,it did fetch value.
So how come for MRP I have to code and for dates it should fetch data just by writing similar name fields on both the docs