Print format - including company file data

Hi,

How can I include data from the company file on print format invoices, quotes etc. 

I have added custom fields for "Tax registration code (GST number)" and "company registration number" to the company file and I want to use these on print formats. I will also need to add some industry certification codes as well which need to be on all print views as part of the company details.

Many thanks

Paul



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/61183e00-bce6-4b0b-bef0-9356b4731bb8%40googlegroups.com.

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

Is it possible to include this in the "Letterhead" section and then define where to include the "Letterhead" within the print format? 

E.g.

<div - print format>
<div - header>
<div - left column of header> some print format specific content here </div>
<div - print header> the "Letterhead" </div>
</div>
<div - rest of invoice></div>
</div>

On Thursday, 27 March 2014 13:33:01 UTC+13, Paul Dowd wrote:
Hi,

How can I include data from the company file on print format invoices, quotes etc. 

I have added custom fields for "Tax registration code (GST number)" and "company registration number" to the company file and I want to use these on print formats. I will also need to add some industry certification codes as well which need to be on all print views as part of the company details.

Many thanks

Paul



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/2db3916b-ae03-4c39-bcf2-f57f3597c871%40googlegroups.com.

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

Paul,

You will have to create a new Print Format via the UI. Go to Setup > Printing > Print Format. Check out an existing one on how to include values.

best,
Rushabh



On Thursday, March 27, 2014 6:03:01 AM UTC+5:30, Paul Dowd wrote:
Hi,

How can I include data from the company file on print format invoices, quotes etc. 

I have added custom fields for "Tax registration code (GST number)" and "company registration number" to the company file and I want to use these on print formats. I will also need to add some industry certification codes as well which need to be on all print views as part of the company details.

Many thanks

Paul



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/f9c122cc-8709-48bb-bd6a-de1474dd21eb%40googlegroups.com.

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

Hi Rushabh,

I have done this, the issue is with including fields from the company file rather than the invoice file. Can you please post some code for getting fields from a the company file? E.g. the company name?

Thanks

Paul

On Thursday, 27 March 2014 18:17:38 UTC+13, Rushabh Mehta wrote:
Paul,

You will have to create a new Print Format via the UI. Go to Setup > Printing > Print Format. Check out an existing one on how to include values.

best,
Rushabh



On Thursday, March 27, 2014 6:03:01 AM UTC+5:30, Paul Dowd wrote:
Hi,

How can I include data from the company file on print format invoices, quotes etc. 

I have added custom fields for "Tax registration code (GST number)" and "company registration number" to the company file and I want to use these on print formats. I will also need to add some industry certification codes as well which need to be on all print views as part of the company details.

Many thanks

Paul



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/f8224600-1ba7-44fe-9d81-db5fb7216465%40googlegroups.com.

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

Hello Paul,

Adding these static values (GST No./registration no.) in Letterhead would be good solution. Letterhead by default is shown as header in print formats.

Using terms and condition master to pull these details in transaction is another alternative. Terms is an open tax field where you can enter these details.

Selling >> Terms and Condition


On Thu, Mar 27, 2014 at 11:42 AM, Paul Dowd <pd...@myzealand.com> wrote:
Hi Rushabh,

I have done this, the issue is with including fields from the company file rather than the invoice file. Can you please post some code for getting fields from a the company file? E.g. the company name?

Thanks

Paul


On Thursday, 27 March 2014 18:17:38 UTC+13, Rushabh Mehta wrote:
Paul,

You will have to create a new Print Format via the UI. Go to Setup > Printing > Print Format. Check out an existing one on how to include values.

best,
Rushabh



On Thursday, March 27, 2014 6:03:01 AM UTC+5:30, Paul Dowd wrote:
Hi,

How can I include data from the company file on print format invoices, quotes etc.

I have added custom fields for "Tax registration code (GST number)" and "company registration number" to the company file and I want to use these on print formats. I will also need to add some industry certification codes as well which need to be on all print views as part of the company details.

Many thanks

Paul



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/f8224600-1ba7-44fe-9d81-db5fb7216465%40googlegroups.com.

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



--
Thanks and Regards,
Umair Sayyed
www.erpnext.com
Hi
 
Thanks for the replies to date, unfortunately they don't really help :/

I suppose the main question is: How do I access data from a different form in the print format?

e.g. in the Delivery note print format I can easily access a custom UID Number fields using <script>doc.uid_number</script>

How do I access for instance the Batch batch_id field in the Delivery Note print format?

Thanks



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/f54a5ba3-26f7-4c2d-a283-b3b1715eb6fd%40googlegroups.com.

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

Paul,

Batch Id field is located under Delivery Note Item table, which is the child table under Delivery Note.

In the Print Format's script, if you add Batch Id's field name in the script written for item table, it will be shown in the Delivery Note Print Format.


On Mon, Mar 31, 2014 at 3:07 AM, Paul Dowd <pd...@myzealand.com> wrote:
Hi
Thanks for the replies to date, unfortunately they don't really help :/

I suppose the main question is: How do I access data from a different form in the print format?

e.g. in the Delivery note print format I can easily access a custom UID Number fields using <script>doc.uid_number</script>

How do I access for instance the Batch batch_id field in the Delivery Note print format?

Thanks



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/f54a5ba3-26f7-4c2d-a283-b3b1715eb6fd%40googlegroups.com.

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



--
Thanks and Regards,
Umair Sayyed
www.erpnext.com
ok, so that was a terrible example for me to use

How about we go back to the original question around including information from the Company file. How do I include the Company doc-type custom field "exporter_number".

Thanks

Paul

On Monday, 31 March 2014 19:49:31 UTC+13, Umair Sayyed wrote:
Paul,

Batch Id field is located under Delivery Note Item table, which is the child table under Delivery Note.

In the Print Format's script, if you add Batch Id's field name in the script written for item table, it will be shown in the Delivery Note Print Format.


On Mon, Mar 31, 2014 at 3:07 AM, Paul Dowd <pd...@myzealand.com> wrote:
Hi
 
Thanks for the replies to date, unfortunately they don't really help :/

I suppose the main question is: How do I access data from a different form in the print format?

e.g. in the Delivery note print format I can easily access a custom UID Number fields using <script>doc.uid_number</script>

How do I access for instance the Batch batch_id field in the Delivery Note print format?

Thanks



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/f54a5ba3-26f7-4c2d-a283-b3b1715eb6fd%40googlegroups.com.

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



--
Thanks and Regards,
Umair Sayyed
www.erpnext.com



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/a4883723-b4ad-470c-8547-46bb323007a9%40googlegroups.com.

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

to further clarify, I'm looking for a code example I can use in print formats to access any field from any doc-type in a static manner. 

Something like <script>Doc-Type(ID).field_name</script> would be amazing if it worked.

thanks

Paul

On Thursday, 3 April 2014 12:08:26 UTC+13, Paul Dowd wrote:
ok, so that was a terrible example for me to use

How about we go back to the original question around including information from the Company file. How do I include the Company doc-type custom field "exporter_number".

Thanks

Paul

On Monday, 31 March 2014 19:49:31 UTC+13, Umair Sayyed wrote:
Paul,

Batch Id field is located under Delivery Note Item table, which is the child table under Delivery Note.

In the Print Format's script, if you add Batch Id's field name in the script written for item table, it will be shown in the Delivery Note Print Format.


On Mon, Mar 31, 2014 at 3:07 AM, Paul Dowd <pd...@myzealand.com> wrote:
Hi
 
Thanks for the replies to date, unfortunately they don't really help :/

I suppose the main question is: How do I access data from a different form in the print format?

e.g. in the Delivery note print format I can easily access a custom UID Number fields using <script>doc.uid_number</script>

How do I access for instance the Batch batch_id field in the Delivery Note print format?

Thanks



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/f54a5ba3-26f7-4c2d-a283-b3b1715eb6fd%40googlegroups.com.

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



--
Thanks and Regards,
Umair Sayyed
www.erpnext.com



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/3ac4ecc0-6f24-47ab-badd-00d73fb23c5c%40googlegroups.com.

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

Hi, Paul!

you can use a query in server to get some informations eg:

var company;
wn.call({
    method: "webnotes.client.get",
    args: {
        doctype: "Company",
        name: "Your company name"
    },
    callback: function(resp){
        if (resp.exc) throw resp.exc;
        company = resp.message[0];
    }
}) ;


2014-04-02 20:14 GMT-03:00 Paul Dowd <pd...@myzealand.com>:
to further clarify, I'm looking for a code example I can use in print formats to access any field from any doc-type in a static manner.

Something like <script>Doc-Type(ID).field_name</script> would be amazing if it worked.

thanks

Paul


On Thursday, 3 April 2014 12:08:26 UTC+13, Paul Dowd wrote:
ok, so that was a terrible example for me to use

How about we go back to the original question around including information from the Company file. How do I include the Company doc-type custom field "exporter_number".

Thanks

Paul

On Monday, 31 March 2014 19:49:31 UTC+13, Umair Sayyed wrote:
Paul,

Batch Id field is located under Delivery Note Item table, which is the child table under Delivery Note.

In the Print Format's script, if you add Batch Id's field name in the script written for item table, it will be shown in the Delivery Note Print Format.


On Mon, Mar 31, 2014 at 3:07 AM, Paul Dowd <pd...@myzealand.com> wrote:
Hi
Thanks for the replies to date, unfortunately they don't really help :/

I suppose the main question is: How do I access data from a different form in the print format?

e.g. in the Delivery note print format I can easily access a custom UID Number fields using <script>doc.uid_number</script>

How do I access for instance the Batch batch_id field in the Delivery Note print format?

Thanks



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/f54a5ba3-26f7-4c2d-a283-b3b1715eb6fd%40googlegroups.com.

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



--
Thanks and Regards,

Umair Sayyed
www.erpnext.com



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/3ac4ecc0-6f24-47ab-badd-00d73fb23c5c%40googlegroups.com.

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



--

Best Regards.

Maxwell Morais
Python Developer powered by Webnotes framework <3
+55 11 954329659




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/CABK1YkPYXFDwMPz3oCtRYYSxHsLpWPA3zHSXEa-Jo5pCrOJ%2ByA%40mail.gmail.com.

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

thanks Maxwell!

I'll give this a go for the static data. 

For linked data, how can I for instance get the "Expiry Date" field from the Batch?? Batch ID is easy, as has been shown previously in this topic, but on the Delivery Note we need to show Batch ID, Batch Expiry, and Batch Manufacture Date. 

If I need to add a new custom field to the Delivery Note Item doc-type so that it can be brought through then that is OK, but then the question will become what do I put in the "Options" field once I've selected the "Link" type to create the link to the Batch/Expiry Date field rather than just to Batch??



On Thursday, 3 April 2014 14:17:13 UTC+13, Maxwell wrote:

Hi, Paul!

you can use a query in server to get some informations eg:

var company;
wn.call({
    method: "webnotes.client.get",
    args: {
        doctype: "Company",
        name: "Your company name"
    },
    callback: function(resp){
        if (resp.exc) throw resp.exc;
        company = resp.message[0];
    }
}) ;


2014-04-02 20:14 GMT-03:00 Paul Dowd <pd...@myzealand.com>:
to further clarify, I'm looking for a code example I can use in print formats to access any field from any doc-type in a static manner. 

Something like <script>Doc-Type(ID).field_name</script> would be amazing if it worked.

thanks

Paul


On Thursday, 3 April 2014 12:08:26 UTC+13, Paul Dowd wrote:
ok, so that was a terrible example for me to use

How about we go back to the original question around including information from the Company file. How do I include the Company doc-type custom field "exporter_number".

Thanks

Paul

On Monday, 31 March 2014 19:49:31 UTC+13, Umair Sayyed wrote:
Paul,

Batch Id field is located under Delivery Note Item table, which is the child table under Delivery Note.

In the Print Format's script, if you add Batch Id's field name in the script written for item table, it will be shown in the Delivery Note Print Format.


On Mon, Mar 31, 2014 at 3:07 AM, Paul Dowd <pd...@myzealand.com> wrote:
Hi
 
Thanks for the replies to date, unfortunately they don't really help :/

I suppose the main question is: How do I access data from a different form in the print format?

e.g. in the Delivery note print format I can easily access a custom UID Number fields using <script>doc.uid_number</script>

How do I access for instance the Batch batch_id field in the Delivery Note print format?

Thanks



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/f54a5ba3-26f7-4c2d-a283-b3b1715eb6fd%40googlegroups.com.

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



--
Thanks and Regards,

Umair Sayyed
www.erpnext.com



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/3ac4ecc0-6f24-47ab-badd-00d73fb23c5c%40googlegroups.com.

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



--

Best Regards.

Maxwell Morais
Python Developer powered by Webnotes framework <3
+55 11 954329659




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/c5ade28f-3c44-4224-91d0-1343286e3d0f%40googlegroups.com.

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

Paul, you can replace the method webnotes.client.get to webnotes.client.get_value and pass the field name in parameters eg: {doctype: "Company", fieldname: "exporter_number", filters: {name: "You Company Name"}}

For the complete API check https://github.com/webnotes/wnframework/blob/develop/webnotes/client.py



2014-04-03 22:19 GMT-03:00 Paul Dowd <pd...@myzealand.com>:
thanks Maxwell!

I'll give this a go for the static data.

For linked data, how can I for instance get the "Expiry Date" field from the Batch?? Batch ID is easy, as has been shown previously in this topic, but on the Delivery Note we need to show Batch ID, Batch Expiry, and Batch Manufacture Date.

If I need to add a new custom field to the Delivery Note Item doc-type so that it can be brought through then that is OK, but then the question will become what do I put in the "Options" field once I've selected the "Link" type to create the link to the Batch/Expiry Date field rather than just to Batch??



On Thursday, 3 April 2014 14:17:13 UTC+13, Maxwell wrote:

Hi, Paul!

you can use a query in server to get some informations eg:

var company;
wn.call({
    method: "webnotes.client.get",
    args: {
        doctype: "Company",
        name: "Your company name"
    },
    callback: function(resp){
        if (resp.exc) throw resp.exc;
        company = resp.message[0];
    }
}) ;


2014-04-02 20:14 GMT-03:00 Paul Dowd <pd...@myzealand.com>:
to further clarify, I'm looking for a code example I can use in print formats to access any field from any doc-type in a static manner.

Something like <script>Doc-Type(ID).field_name</script> would be amazing if it worked.

thanks

Paul


On Thursday, 3 April 2014 12:08:26 UTC+13, Paul Dowd wrote:
ok, so that was a terrible example for me to use

How about we go back to the original question around including information from the Company file. How do I include the Company doc-type custom field "exporter_number".

Thanks

Paul

On Monday, 31 March 2014 19:49:31 UTC+13, Umair Sayyed wrote:
Paul,

Batch Id field is located under Delivery Note Item table, which is the child table under Delivery Note.

In the Print Format's script, if you add Batch Id's field name in the script written for item table, it will be shown in the Delivery Note Print Format.


On Mon, Mar 31, 2014 at 3:07 AM, Paul Dowd <pd...@myzealand.com> wrote:
Hi
Thanks for the replies to date, unfortunately they don't really help :/

I suppose the main question is: How do I access data from a different form in the print format?

e.g. in the Delivery note print format I can easily access a custom UID Number fields using <script>doc.uid_number</script>

How do I access for instance the Batch batch_id field in the Delivery Note print format?

Thanks



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/f54a5ba3-26f7-4c2d-a283-b3b1715eb6fd%40googlegroups.com.

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



--
Thanks and Regards,

Umair Sayyed
www.erpnext.com



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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/3ac4ecc0-6f24-47ab-badd-00d73fb23c5c%40googlegroups.com.

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



--

Best Regards.

Maxwell Morais
Python Developer powered by Webnotes framework <3




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/c5ade28f-3c44-4224-91d0-1343286e3d0f%40googlegroups.com.

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






Best Regards.

Maxwell Morais

Python Developer powered by Webnotes framework <3
+55 11 954329659




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

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

To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/CABK1YkO2QpXp%3DW7koO%2BWmThanOGUH-FHxTUpKgS%2BfemDNdQYAg%40mail.gmail.com.

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