Default Income Account in Item is set from Sales Invoice

Hello All,

I have a certain scenario, where i dont set the “Default Income Account” for a specific item but when i goto “Sales Invoice” and set this item in the entries and also set the “Income Account”. when i save / submit this sales invoice, the income account is picked from the entries and set into the Item which should not be the case ?? because i have left it empty on purpose.

I may be 2 users who are not allowed to see each other income accounts,

so if the first user sets the income account, then it is updated into the item. now if the other user uses the same item and it is bring the default income account with it ??

i dont think this is the right behaviour of the system to set the “default income account” if it is empty ??

Thanks
Syed.

Hi,

Have you set Default Income Account in company master? To check this go to Setup > Company

Regards,
Prakash

i dont think it have to do anything with the company master.

the following code is setting the default income account in item from sales invoices. i dont understand why this logic or code exists in the selling_controller

https://github.com/frappe/erpnext/blob/develop/erpnext/controllers/selling_controller.py#L313-L315

@rushabh_mehta

Hello rushabh,

kindly look into this issue.

Thanks

@sdqadeer44 , if you think this is an issue ,you can report it on GitHub . As I can see you have already identified the code, you can comment it out in your local installation if it meets your custom requirements