2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-17 20:55:26 +00:00

Stock transfer now works

This commit is contained in:
Oliver Walters
2020-04-18 22:39:57 +10:00
parent af104717ab
commit c4d8b5ce1c
2 changed files with 33 additions and 4 deletions

View File

@ -218,6 +218,20 @@ class InvenTreeStockItem extends InvenTreeModel {
});
}
Future<http.Response> transferStock(double q, int location, {String notes}) async {
if ((q == null) || (q > quantity)) q = quantity;
return api.post("/stock/transfer/", body: {
"item": {
"pk": "${pk}",
"quantity": "${q}",
},
"location": "${location}",
"notes": notes ?? '',
});
}
}