Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPPProductBOM.getDefault() doesn't find default. #2303

Open
mckayERP opened this issue Feb 1, 2019 · 0 comments
Open

MPPProductBOM.getDefault() doesn't find default. #2303

mckayERP opened this issue Feb 1, 2019 · 0 comments

Comments

@mckayERP
Copy link
Member

mckayERP commented Feb 1, 2019

The code for MPPProductBOM.getDefault(MProduct product, String trxName) doesn't find the default if there are multiple BOMs. The code simply returns the first one found that is active and has the same value/search key as the Product. This will be the first bom created unless the BOM search key was changed.

The BOM record has a "IsDefault" column but this is not checked.

Would it not be clearer for the user to use the IsDefault to select the default BOM?

Otherwise, its easy to break things by changing the search key.

Also suggest beforeSave checks to make sure at least one record has the default flag set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant