Below is my code to update currentQuantity of stock document.
for an example;
Instance 1
previously requested stock qty =