update discount message

This commit is contained in:
Aung Myo
2017-07-11 15:45:01 +06:30
parent 1e329d1c5f
commit 28c51300cf
2 changed files with 64 additions and 36 deletions

View File

@@ -491,42 +491,66 @@ $(document).ready(function(){
// Selected Account
var account_types = JSON.stringify(get_selected_account_types());
var params = {'sale_id':sale_id, 'sub_total':sub_total, 'account_types':account_types };
$.ajax({
type: "POST",
url: ajax_url,
data: params,
success:function(result){
if($('.accounts-type').hasClass('selected-account') == true){
if (result.url_status == false) {
status = result.url_message
}else{
status = result.status
}
$.confirm({
title: 'Infomation!',
content: status,
buttons: {
confirm: {
text: 'Ok',
btnClass: 'btn-green',
action: function(){
if(result.table_type == "Table"){
window.location.href = "/origami/table/" + result.table_id
}
else {
window.location.href = "/origami/room/" + result.table_id
}
}
}
}
});
}
});
});
var params = {'sale_id':sale_id, 'sub_total':sub_total, 'account_types':account_types };
$.ajax({
type: "POST",
url: ajax_url,
data: params,
success:function(result){
if (result.url_status == false) {
status = result.url_message
type = 'red'
btn_color = 'btn-red'
}else{
status = result.status
type = ''
btn_color = 'btn-green'
}
$.confirm({
title: 'Infomation!',
content: status,
columnClass: 'small',
type: type,
buttons: {
confirm: {
text: 'Ok',
btnClass: btn_color,
action: function(){
if(result.table_type == "Table"){
window.location.href = "/origami/table/" + result.table_id
}
else {
window.location.href = "/origami/room/" + result.table_id
}
}
}
}
});
}
});
}else{
$.confirm({
title: 'Alert !',
content: 'Please Select Account',
type: 'red',
typeAnimated: true,
buttons: {
confirm: {
text: 'Ok',
btnClass: 'btn-danger',
}
}
});
}
});//end member discount
});
/* Remove Selection */