I'm trying to make an invoice application and I want to make it so that when an item is ordered, the available # of items drops by how ever many the person bought.
In example if someone ordered 2 items from 6 available, the next time someone orders the same thing I want the maximum available number to be only 4, and when there's 0 left the tool to be disabled. How would one go about writing the code for that?
In example if someone ordered 2 items from 6 available, the next time someone orders the same thing I want the maximum available number to be only 4, and when there's 0 left the tool to be disabled. How would one go about writing the code for that?