For this week, I’ve coded out the basic functionalities of the pick module which is the pick and pick all functions. While the pick function refer to when the user had enter the amount to pick, a pick data will be generate which contains the line item ID that picked, picked quantity and the user ID that perform the pick.
Before the pick is saved into database, it need to update with the stock quantity database table which increment the amount of stock and decrement in the stock quantity. For the pick all function it perform the same with the pick function with just the pick quantity is set to the line item quantity on button clicked.
After that, I’ve add in with the color indicator function which alert the user on the sales order list on which order is completely picked while which haven’t. Different line items will be indicated with their respective unique colors.
The color indicator is been called in the LoadingRow event which fired when the datagridview is generated and inserting the row into it. It read the current row cell which is the sales order first, and retrieve all the line items inside the sales order. The color indicator determine the color to set by comparing all the pick quantity with the line item quantity, when the pick quantity is equal to line item quantity, the variable picked++.
Lastly, if the picked amount is equal with the line item list count, it means all the line item inside this sales order is picked, with correct colour indicator.
