mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Bug fix - duplicate stock transfer action
This commit is contained in:
parent
27a6025c32
commit
432558678d
2 changed files with 11 additions and 17 deletions
|
|
@ -484,23 +484,18 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
quantity = this.quantity;
|
||||
}
|
||||
|
||||
Map<String, dynamic> data = {
|
||||
"item": {
|
||||
"pk": "${pk}",
|
||||
final response = await api.post(
|
||||
"/stock/transfer/",
|
||||
body: {
|
||||
"item": {
|
||||
"pk": "${pk}",
|
||||
"quantity": "${quantity}",
|
||||
},
|
||||
"location": "${location}",
|
||||
"notes": notes ?? "",
|
||||
},
|
||||
"location": "${location}",
|
||||
"notes": notes ?? '',
|
||||
};
|
||||
|
||||
if (quantity != null) {
|
||||
data["item"]["quantity"] = "${quantity}";
|
||||
}
|
||||
|
||||
print("transfer stock!");
|
||||
|
||||
final response = await api.post("/stock/transfer/", body: data);
|
||||
|
||||
print("transfer response: ${response}");
|
||||
expectedStatusCode: 200
|
||||
);
|
||||
|
||||
return response != null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue