frappe / hrms

Open Source HR and Payroll Software
https://frappe.io/hr
GNU General Public License v3.0
1.39k stars 729 forks source link

Expense claim Submit issue #93

Closed jaqobk closed 1 year ago

jaqobk commented 4 years ago

Hi Guys,

Am report a possible bug with the version-12.xxx where by I have created the expense claim but cant submit it and I have set the cost center in that expense claim doc and also at the company default but every time I try it says that ;

**

Cost center is required to book an expense claim

**

Kindly help so that I can be able to use the system without any issues. I have attached the image

submit issue

gwhitney commented 4 years ago

I have encountered a bug sufficiently similar that I am just mentioning it here rather than opening a potential duplicate. In my case, I have Cost Centers as mandatory for P&L accounts but not for Balance Sheet accounts. Thus, generally Expense Claims have no Cost Center (on the liability side) but there are Cost Centers on the Expense line items. However, when there is an Expense account on an Expense Taxes and Charges line item, ERPNext will no longer allow the Expense Claim to be submitted, complaining "Expense Claim HR-EXP-2020-00004: Cost Center is required for 'Profit and Loss' account 66601 - Sales Tax Paid - MOFAD. Please set up a default Cost Center for the Company." (this message comes even though I have quite explicitly set a cost center on every expense line in the Expense Taxes and Charges section.)

I will shortly be filing a one-line pull request which fixes my concern (the reference to the tax.cost_center is missing in the relevant spot in expense_claim.py) and I will list it as possibly resolving this issue (since I am not certain that the difficulty I am encountering is exactly the same as jaqobk's, as my message has different text than the screen shot above).

ruchamahabal commented 1 year ago

Cost centers now get mapped from expense claims after https://github.com/frappe/hrms/pull/623