mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix for scanIntoLocation function
This commit is contained in:
parent
7dae05acc5
commit
782a0f3576
@ -359,7 +359,7 @@ function unlinkBarcode(stockitem) {
|
|||||||
/*
|
/*
|
||||||
* Display dialog to check multiple stock items in to a stock location.
|
* Display dialog to check multiple stock items in to a stock location.
|
||||||
*/
|
*/
|
||||||
function barcodeCheckIn(location_id) {
|
function barcodeCheckIn(location_id, options={}) {
|
||||||
|
|
||||||
var modal = '#modal-form';
|
var modal = '#modal-form';
|
||||||
|
|
||||||
@ -489,15 +489,11 @@ function barcodeCheckIn(location_id) {
|
|||||||
success: function(response, status) {
|
success: function(response, status) {
|
||||||
// Hide the modal
|
// Hide the modal
|
||||||
$(modal).modal('hide');
|
$(modal).modal('hide');
|
||||||
if (status == 'success' && 'success' in response) {
|
|
||||||
|
|
||||||
addCachedAlert(response.success);
|
if (options.success) {
|
||||||
location.reload();
|
options.success(response);
|
||||||
} else {
|
} else {
|
||||||
showMessage('{% trans "Error transferring stock" %}', {
|
location.reload();
|
||||||
style: 'danger',
|
|
||||||
icon: 'fas fa-times-circle',
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user