2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 05:46:34 +00:00

Refactor all "adjustment" forms to use the new API approach

This commit is contained in:
Oliver
2021-07-12 20:38:54 +10:00
parent 74e5b2cd3f
commit 9fc7976569
6 changed files with 56 additions and 83 deletions

View File

@ -273,13 +273,25 @@
});
$("#part-count").click(function() {
launchModalForm("/stock/adjust/", {
data: {
action: "count",
inventreeGet(
'{% url "api-stock-list" %}',
{
part: {{ part.id }},
in_stock: true,
allow_variants: true,
part_detail: true,
location_detail: true,
},
reload: true,
});
{
success: function(items) {
adjustStock('count', items, {
onSuccess: function() {
location.reload();
}
});
},
}
);
});
$("#price-button").click(function() {