Expense Head and Cost Center for Items on Purchase Order screen

72 views
Skip to first unread message

MP

unread,
May 8, 2013, 12:03:47 PM5/8/13
to erpnext-dev...@googlegroups.com
Hi,

We have a need for Expense Head and Cost Center to be displayed and selectable on Purchase Order under Items section for each item entered. This way user who is raising the Purchase Order can select appropriate Expense Head and Cost Center for each item at the time of PO creation. Currently Expense Head and Cost Center can be entered when creating Purchase Invoice but for this finance has to wait for the Purchase Invoice to be available. We want this to be available on Purchase Order screen itself. This way, the finance team knows what funds are needed in next week, months or so by Cost Center and account. Please guide me on how this can be achieved. Thanks in advance.

Kind regards,
Mayur Patel

Rushabh Mehta

unread,
May 8, 2013, 11:04:35 PM5/8/13
to erpnext-dev...@googlegroups.com
Mayur,

You will have to add those fields (as Custom Fields) in Purchase Order Detail. If the fieldnames are same as Purchase Invoice, then they will be copied over when you make a Purchase Invoice from the Purchase Order.

best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

--
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...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/CVblMF6LYPoJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

MP

unread,
May 9, 2013, 3:15:13 AM5/9/13
to erpnext-dev...@googlegroups.com
Thanks Rushabh. Please note that we want user to select Expense Head and Cost Center for each item they will enter as part of a PO. So if I add these two fields as Custom fields in Purchase order then will it be stored against each item? Also will the user be able to run report where they can see by Expense Head and Cost center what future funds they will need? Thanks.

Kind regards,
Mayur Patel

Anand Doshi

unread,
May 9, 2013, 3:17:48 AM5/9/13
to erpnext-dev...@googlegroups.com
Hi Mayur,

Create the custom fields for doctype = "Purchase Order Item". That way, they will appear for each item.

Custom fields appear to be same as standard DocField, including that they are created as columns in the database.  Hence, they will be selectable in reports.

Thanks,
Anand.

--
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...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.

MP

unread,
May 9, 2013, 5:13:42 AM5/9/13
to erpnext-dev...@googlegroups.com
Thanks Anand.

It works. I am able to create PO with Expense Head and Cost Center detail for each item. The system also automatically populate these fields when I create a Purchase Invoice for the same PO straight away.

But after creating PO if I create Purchase Receipt and after that if I create Purchase Invoice system doesn't automatically populate Expense Head and Cost Center detail in Purchase Invoice screen. I think system seems to lose these two fields when I create Purchase Receipt (because they don't have these two fields) and hence not able to populate them in Purchase Invoice. Can you please look into this for me? I am able to replicate this consistently. Thanks.


Kind regards,
Mayur Patel


On Wednesday, May 8, 2013 5:03:47 PM UTC+1, MP wrote:

Anand Doshi

unread,
May 9, 2013, 5:16:33 AM5/9/13
to erpnext-dev...@googlegroups.com
Hi Mayur,

You will also need to create these custom fields for Purchase Receipt Item.

Thanks,
Anand.

--
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...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.

MP

unread,
May 9, 2013, 5:34:05 AM5/9/13
to erpnext-dev...@googlegroups.com
Thanks Anand.

I will do that and check it out.

But can you please explain me how system is able to automatically populate these fields in Purchase invoice when I go  directly from PO screen once it has been submitted?


Kind regards,
Mayur Patel

On Wednesday, May 8, 2013 5:03:47 PM UTC+1, MP wrote:

Anand Doshi

unread,
May 9, 2013, 5:36:27 AM5/9/13
to erpnext-dev...@googlegroups.com
Framework code copies common fields from one doctype's record to another when mapping.

Thanks,
Anand.

--
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...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.

MP

unread,
May 9, 2013, 5:52:41 AM5/9/13
to erpnext-dev...@googlegroups.com
Thanks. So in this instance, mapping occurs when I go from PO page to Purchase Invoice page directly as both has same fields names for expense head and cost center.


Kind regards,
Mayur Patel
On Wednesday, May 8, 2013 5:03:47 PM UTC+1, MP wrote:

Anand Doshi

unread,
May 9, 2013, 5:56:15 AM5/9/13
to erpnext-dev...@googlegroups.com
Yes. However, "No Copy" fields are not mapped.

--
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...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.

MP

unread,
May 9, 2013, 6:01:54 AM5/9/13
to erpnext-dev...@googlegroups.com
Thanks a lot Anand and Rushabh for your prompt responses. This was very helpful. Much appreciated.


Kind regards,
Mayur Patel

On Wednesday, May 8, 2013 5:03:47 PM UTC+1, MP wrote:
Reply all
Reply to author
Forward
0 new messages