mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Stock transfer now works
This commit is contained in:
parent
af104717ab
commit
c4d8b5ce1c
2 changed files with 33 additions and 4 deletions
|
|
@ -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 ?? '',
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue