Missing field Cost Center in purchase invoice form

Linking expenses to cost centers needs to be declared! But where in ERPnext?

In the database table for purchase invoices I have seen there is a field cost_center. But in each record this field remains empty.

When I have a look into the purchase invoice form, I cannot find a field for cost center?!
There is a small hint in the docs for purchase invoice, that cost center would be treated as accounting dimension. But also this field does not exist in the form!

So where can I link my expenses to the right cost center?

@Perino
Goto Puchase Invoice → Open child table row → you can see the field cost center in Accounting Dimensions(section)

hope this help you

@abrarpv97 @Suresh_Thakor
Thank you for your replies. I don’t see this field. After a short research in the html code of the form, I found there is a form field ‘cost_center’:

When I have a look at the css styling (…/assets/css/desk.min.css?ver=1591714894.0):

.hide-control {
display: none!important;
}

So the field is hidden and furthermore classified as !important?!

ERPNext: v12.x.x-develop () (develop)
Frappe Framework: v12.x.x-develop () (develop)

@Perino pe okay. you can change hidden property using customize form
select doctype as ‘Sales Invoice Item’ in customize form

@abrarpv97 I’ve checked by following your recommendation, but the item is not marked as ‘hidden’.

@Perino :thinking: do you need this as shown in screen shot.

@Suresh_Thakor Thank you, I found your hint! But this section regards only to the taxes!

And yes, in the field you have shown me is the same value ‘Main - XX’.

Go to the Purchase Invoice, under the items section, expand the item row.

Next, scroll down to “Accounting Dimensions” section and set the Cost Center there.

Note: In case you have already set the default cost center in the company master, the cost center will be automatically fetched.

Hope this helps.

1 Like

@michelle Great, I founded! Thanky you! :slightly_smiling_face:

Finally, I stil cannot save my record :frowning:
I’m ending up with error:
‘Purchase Invoice ACC-PINV-2020-00002: Cost Center is required for ‘Profit and Loss’ account 7241 - Pkw-Kosten Mercedes 80%Bka - SG. Please set up a default Cost Center for the Company.’

Default cost center for the compay is set in the company settings.

Have you added taxes? If so, check for each tax row if the cost center is added? Also, check in each item row too. There is also a separate field called “Cost Center” under Accounting Dimensions in the Purchase Invoice document as shown below:

Make sure it is set there too.

Hope this helps.