In this week, the accept command of the stock take was further improve on. Firstly, the command will get both the existing item list with the line item for the stock take. From there, the algorithm will compare both the existing item and the new line item. After that, it will update the quantity to the new quantity. The item with zero quantity will automatically be remove from the existing.
Next, I need to rework the function which will update the item list. First, I need to change the parameter that it takes to a list. From there, I need to rework the logic so that I can take the list as the input and update all items at once. Moving on from there, I need to ensure that the update function transaction only run once after being called.
Lastly, I need to change the logic for the updating the existing and matching item so that the last checked date and the last checked by property will match the one in the stock take itself. I then need to do the unit testing to ensure that everything is working fine and as intended. I also completed the testing for most of the logic of the accept command.
