Adding invoice number to delivery note print format

Hi

How can I add the linked invoice number to the delivery note print format? 

I have no option but to do this since it's a dictate from our largest customer. It can surely be done, just a matter of what the method is to do it. 

Could I create a custom field and use JS or SQL to import the data similar to what I've done in the reports? This would be preferential to doing it through code in the print format.

Thanks

Paul


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/4c6d9dbb-d971-48f9-a2c8-74ce9b8b9a3c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


On 23-Sep-2014, at 9:17 am, Paul Dowd <pd...@myzealand.com> wrote:

Hi

How can I add the linked invoice number to the delivery note print format? 

I have no option but to do this since it's a dictate from our largest customer. It can surely be done, just a matter of what the method is to do it. 

Could I create a custom field and use JS or SQL to import the data similar to what I've done in the reports? This would be preferential to doing it through code in the print format.

{{ ", ".join(list(set([d.against_sales_invoice for d in doc.delivery_note_details]))) }}


Thanks

Paul


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/4c6d9dbb-d971-48f9-a2c8-74ce9b8b9a3c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/E130FA45-A584-470D-AFD1-4D31E660DD9A%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Hi Rushabh,

How / where should I be implementing this? I have tried adding it in the print format replacing the "doc.invoice_number" and in a custom field but can't get it to work.

Thanks

Paul


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/487f68d6-68e1-4819-9c46-44e7a7f64287%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

On 25-Sep-2014, at 5:00 am, Paul Dowd <pd...@myzealand.com> wrote:

Hi Rushabh,

How / where should I be implementing this? I have tried adding it in the print format replacing the "doc.invoice_number" and in a custom field but can't get it to work.

I hope you are using server side print formats. In client side, you will have to write the same code in javascript.


Thanks

Paul


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/487f68d6-68e1-4819-9c46-44e7a7f64287%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/61BA4EE5-6F4A-4079-832D-88D6BBE40435%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.

Can I do this using a custom field? That would be preferential. I can write some SQL to pull the correct data, but I need to know how to set-up the custom field or custom script if that is what I should be doing.

Pls share your print format. I am kind of lost here.

I'd prefer to do this outside of print format and use a custom field so it's visible on the form.

I need to show the relevant invoice number on the delivery note that the invoice was created from.

Process:

Create SO - DN - INV

then print DN & INV