ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Help with multiple cost centers and warehouses


#1

Hi,

I am looking for some help with multiple cost-centers and warehouses to mimic multi-branch setup. I have gone through https://erpnext.org/docs/user/manual/en/accounts/setup/cost-center and couple of other posts and created the cost centers and warehouses. However I am not able to select cost-center/warehouse Sales Invoice/Purchase Receipt/Journal Entry. I saw some references to ‘branch’ in some posts, but the ‘branch’ in HR doesn’t seem to do much. Any help with how to use/setup muti cost centre/warehouse properly is really appreciated.

Regards
Sathish


#2

Hi,

I have added many custom fields in branch doctype, one of which is cost center.

In Sales Invoice/Purchase Receipt/Journal Entry i have added a custom field called branch(link field)

Then i have written script to pick cost center from branch in validate doc event of Sales Invoice/Purchase Receipt/Journal Entry.

Hope this helps.

Thanks


#3

Thanks @Basawaraj_Savalagi, I am not very particular about branch doctype, just need a way of segregating sales/purchase/expenses based on cost center/warehouse. Looks like you are saying it is possible only with custom additions to the Sales Invoice/Purchase Receipt/Journal Entry. That shouldn’t be difficult, but then how does ‘GL Entry’ picks up the cost center from these doctypes? Do we need to customize that as well?
@James_Robertson (sorry for tagging), wondering whether you have some insights on this as I saw couple of responses from you in this area.


#4

In each sales invoice item there is cost center link field…

The cost center entered here is what is choosen when GL entry is posted.

Similarly for every expese there is a cost center.

I did those customizations because i didnt want our end user to enter cost center manually.


#5

Thanks, I was just looking for that. Adding custom field certainly helps the user in assigning it to the right cost center automatically.


#6

Would you mind sharing a sample of this script, mine does not appear to be working


#7

Sorted

Thanks


#8

@Basawaraj_Savalagi how to setup cost center inside branch? Please guide me. Thank you


#9

Do share the script used for setting the cost center automatically.