check OQS edit process

This commit is contained in:
phyusin
2017-12-01 16:23:50 +06:30
parent 24284b4361
commit 6bbac9d14c
4 changed files with 8 additions and 24 deletions

View File

@@ -99,11 +99,12 @@
<script type="text/javascript">
$(document).ready(function(){
original_value = $('#qty').val();
console.log(original_value);
// Qty update for OQS Edit Controller
$('#qty-update').on('click', function(){
var qty_weight = $("input[name='qty_weight']").val();
if(qty_weight > original_value){
console.log(qty_weight);
if(parseInt(qty_weight) > parseInt(original_value)){
swal("Alert!", "Not allowed over quantity", "warning");
return;
}
@@ -116,7 +117,7 @@ $(document).ready(function(){
url: '/oqs/' + order_items_id,
data: params,
success: function(result){
alert("Updated!");
// alert("Updated!");
window.location.href = '/oqs';
}
});