Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -264,7 +264,29 @@
|
||||
url: '<%= inventory_stock_check_save_path %>',
|
||||
data: 'stock_item=' + jsonStr + '&reason=' + reason,
|
||||
success: function (data) {
|
||||
window.location.href = '/inventory/stock_checks/' + data['stock_id'];
|
||||
if (data['stock_id']) {
|
||||
check_id = data['stock_id'];
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<%= inventory_save_to_journal_path %>',
|
||||
data: 'data=' + check_id,
|
||||
success: function () {
|
||||
swal({
|
||||
title: "Information!",
|
||||
text: "Successfully saved to journal",
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
// window.location.href = '/inventory';
|
||||
window.location.href = '/inventory/stock_checks/' + check_id;
|
||||
});
|
||||
}
|
||||
})
|
||||
// window.location.href = '/inventory/stock_checks/' + data['stock_id'];
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}else{
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
|
||||
|
||||
<div class="body">
|
||||
<button id="save_to_journal" type="button" class="btn btn-block btn-primary"> <%= t("views.right_panel.button.save_to_journal") %></button>
|
||||
<!-- <button id="save_to_journal" type="button" class="btn btn-block btn-primary"> <%= t("views.right_panel.button.save_to_journal") %></button> -->
|
||||
<button id="print" type="button" class="btn btn-block btn-primary"> <%= t :print %></button>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user