Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. if (body.productList.length > 0) { //dataliost from react
  2. let results = 0;
  3. for(let todos = body.productList.length -1; todos >=0; todos--) {
  4. // for(let yet = body.)
  5. let prod = await product.stockes(body.productList[todos].temp_id_product)
  6. let stock = prod.data[0].prod_stock
  7. results = await mutation.add(
  8. body.id_transaction,
  9. body.productList[todos].temp_id_product,
  10. stock,
  11. body.productList[todos].temp_prod_amount,
  12. body.productList[todos].temp_prod_amount
  13. )
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement