Insert Multiple Delivery Note Custom field value to Sales Invoice

Hello everyone,

i was create a custom field in Delivery Note and same in Sales Invoice just like you wrote on the manual.
When i make Sales Invoice from one Delivery Note custom field value from DN was regularly copied to SI and that works great.
When i create SI from multiple DN i get value only from last added DN. How to concatenate all added DN values in one SI field. I used field type data. I tried with table but i get some errors.
I was trying to find some help on your forum, and i found that several users ask the same but they get no answer.
I need this to be visible on sales invoice print format. Is there any other way to get field from other table on SI print, some sql query or something?
Thanks in advance.

You can edit the print format and add Delivery Note to the columns of Item table and Delivery Note number will show up in Print Format.

Thank you for quick response. I will try that later. Thanks for help @KanchanChauhan

I check this and it is ok. I was aked about custom field value from delivery note to be shown in item table in SI. Could you help me with this?

I create custom field in Delivery Note. Same field in Sales Invoice and Sale Invoice item. When i create sales invoice item from multiple Delivery Notes, program copy last added DN value in Sales Invoice, and in Sales Invoice item custom field is empty

I wan’t to get Sales Invoice print format like this

I solve this. It was not so difficult. Thanks anyway.

Hi, I’m triying to solve this exact issue, how did you solved it?
Edit:
In my case I’ve added a custom field called Observations on both Delivery Note and Sales Invoice.
When invoicing multiple delivery notes y only get the first observation string on the Sales Invoice observations field, can this value be concatenated?

Hello @Playjink,

Here is code:

frappe.ui.form.on("Delivery Note", "broj_vaucera", function(frm) {
   $.each(frm.doc.items || [], function(i, d) {
      frappe.model.set_value("Delivery Note Item", d.name, "broj_vaucera", frm.doc.broj_vaucera);
   });
})
2 Likes