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:
@ -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 ?? '',
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user