SBarnes wrote:Yes I know but should the code throw an exception for the not allowed change, otherwise from the outside it looks like it has done it?
We behave that way to suit the users of the user interface.
Forms and API both use the underlying business logic, and we sometimes do silently change / modify things when the user keys it in instead of throwing an error, as the users don't like error messages - and we do this change / modifying inside the business logic.
We could add logic into the UI to anticipate when this would cause an exception (such as setting min or max values for the grid cells), and then also modify the business logic to throw an exception instead of ignoring / adjusting, or we could catch specific exceptions in the UI and swallow them - but logic or complexity in general in the UI isn't something I'm terribly fond of - I'd much rather it just be a really dumb presentation layer.
I'd also rather not have the silly rule that the user needs to know when creating a new snapshot if it is to cancel backorders or fulfill the backorders - just let them do either!