mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 12:36:45 +00:00
Remove calls to "exportStock"
This commit is contained in:
parent
51de436d42
commit
8bf84ec217
@ -283,9 +283,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#stock-export").click(function() {
|
$("#stock-export").click(function() {
|
||||||
exportStock({
|
downloadTableData($("#stock-table"));
|
||||||
supplier: {{ company.id }}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
{% if company.is_manufacturer %}
|
{% if company.is_manufacturer %}
|
||||||
|
@ -309,11 +309,7 @@ loadStockTable($("#stock-table"), {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#stock-export").click(function() {
|
$("#stock-export").click(function() {
|
||||||
|
downloadTableData($("#stock-table"));
|
||||||
exportStock({
|
|
||||||
supplier_part: {{ part.pk }},
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#item-create").click(function() {
|
$("#item-create").click(function() {
|
||||||
|
@ -834,9 +834,7 @@
|
|||||||
|
|
||||||
$("#stock-export").click(function() {
|
$("#stock-export").click(function() {
|
||||||
|
|
||||||
exportStock({
|
downloadTableData($("#stock-table"));
|
||||||
part: {{ part.pk }}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#item-create').click(function () {
|
$('#item-create').click(function () {
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
duplicateStockItem,
|
duplicateStockItem,
|
||||||
editStockItem,
|
editStockItem,
|
||||||
editStockLocation,
|
editStockLocation,
|
||||||
exportStock,
|
|
||||||
findStockItemBySerialNumber,
|
findStockItemBySerialNumber,
|
||||||
installStockItem,
|
installStockItem,
|
||||||
loadInstalledInTable,
|
loadInstalledInTable,
|
||||||
@ -506,49 +505,6 @@ function stockStatusCodes() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Export stock table
|
|
||||||
*/
|
|
||||||
function exportStock(params={}) {
|
|
||||||
|
|
||||||
constructFormBody({}, {
|
|
||||||
title: '{% trans "Export Stock" %}',
|
|
||||||
fields: {
|
|
||||||
format: {
|
|
||||||
label: '{% trans "Format" %}',
|
|
||||||
help_text: '{% trans "Select file format" %}',
|
|
||||||
required: true,
|
|
||||||
type: 'choice',
|
|
||||||
value: 'csv',
|
|
||||||
choices: exportFormatOptions(),
|
|
||||||
},
|
|
||||||
sublocations: {
|
|
||||||
label: '{% trans "Include Sublocations" %}',
|
|
||||||
help_text: '{% trans "Include stock items in sublocations" %}',
|
|
||||||
type: 'boolean',
|
|
||||||
value: 'true',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onSubmit: function(fields, form_options) {
|
|
||||||
|
|
||||||
var format = getFormFieldValue('format', fields['format'], form_options);
|
|
||||||
var cascade = getFormFieldValue('sublocations', fields['sublocations'], form_options);
|
|
||||||
|
|
||||||
// Hide the modal
|
|
||||||
$(form_options.modal).modal('hide');
|
|
||||||
|
|
||||||
var url = `{% url "stock-export" %}?format=${format}&cascade=${cascade}`;
|
|
||||||
|
|
||||||
for (var key in params) {
|
|
||||||
url += `&${key}=${params[key]}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
location.href = url;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign multiple stock items to a customer
|
* Assign multiple stock items to a customer
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user