inventory, added discount rate on new_item

fix various mysql input null / empty string bugs