CORE-POS / IS4C

Cooperative Operational Retail Environment
http://www.core-pos.com
GNU General Public License v2.0
64 stars 44 forks source link

Allow null cost value when creating new product #1107

Closed lgedgar closed 1 year ago

lgedgar commented 2 years ago

if user blanks-out the cost field when making new product, the cost value comes through as empty string, which is not valid per data type

This is pretty minor and you may have other ideas on how (or if) it should be handled. But have seen this warning in the wild lately.

lgedgar commented 2 years ago

Hm just in case you were gonna be quick to jump on this.. I think there are a couple more related tweaks I'd like to add, will try to get to them shortly.

lgedgar commented 2 years ago

Hm well the other issues seemed to have been solved by the same commit I guess. So feel free to merge or let me know what you think.

lgedgar commented 2 years ago

Actually one more thing that came up, not sure how best to handle. User entered 24..50 as a cost value for new product. Got a different SQL error for that one, about data being truncated. I suppose the best way to avoid is client-side JS? Seems like more of a rabbit hole than the original issue here. I might lean toward just ignoring that one for now but curious what you think.

lgedgar commented 1 year ago

Bump. This is pretty minor but I think removes confusion. Any reason not to do it? (And apologies for all the noise above..)