remove deving member dis
This commit is contained in:
@@ -190,8 +190,8 @@
|
|||||||
<button id="remove-item-discount" class="btn btn-warning btn-block action-btn">RemoveItem Discount</button>
|
<button id="remove-item-discount" class="btn btn-warning btn-block action-btn">RemoveItem Discount</button>
|
||||||
<button id="remove-all" class="btn btn-warning btn-block action-btn">Remove All</button>
|
<button id="remove-all" class="btn btn-warning btn-block action-btn">Remove All</button>
|
||||||
<button id="pay-discount" class="btn btn-danger btn-block action-btn">Enter</button>
|
<button id="pay-discount" class="btn btn-danger btn-block action-btn">Enter</button>
|
||||||
<hr />
|
<!-- <hr />
|
||||||
<button id="member-discount" class="btn btn-success btn-block action-btn">Member Discount</button>
|
<button id="member-discount" class="btn btn-success btn-block action-btn">Member Discount</button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -422,31 +422,31 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Pay Discount for membership
|
// Pay Discount for membership
|
||||||
$("#member-discount").on('click', function(e){
|
// $("#member-discount").on('click', function(e){
|
||||||
e.preventDefault();
|
// e.preventDefault();
|
||||||
var sale_id = $('#sale-id').text();
|
// var sale_id = $('#sale-id').text();
|
||||||
var sub_total = $('#order-sub-total').text();
|
// var sub_total = $('#order-sub-total').text();
|
||||||
var ajax_url = "/origami/" + sale_id + "/member_discount";
|
// var ajax_url = "/origami/" + sale_id + "/member_discount";
|
||||||
|
|
||||||
// Selected Account
|
// // Selected Account
|
||||||
var account_types = JSON.stringify(get_selected_account_types());
|
// var account_types = JSON.stringify(get_selected_account_types());
|
||||||
var params = {'sale_id':sale_id, 'sub_total':sub_total, 'account_types':account_types };
|
// var params = {'sale_id':sale_id, 'sub_total':sub_total, 'account_types':account_types };
|
||||||
|
|
||||||
$.ajax({
|
// $.ajax({
|
||||||
type: "POST",
|
// type: "POST",
|
||||||
url: ajax_url,
|
// url: ajax_url,
|
||||||
data: params,
|
// data: params,
|
||||||
success:function(result){
|
// success:function(result){
|
||||||
alert("Successfully Discount!");
|
// alert("Successfully Discount!");
|
||||||
if(result.table_type == "Table"){
|
// if(result.table_type == "Table"){
|
||||||
window.location.href = "/origami/table/" + result.table_id
|
// window.location.href = "/origami/table/" + result.table_id
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
window.location.href = "/origami/room/" + result.table_id
|
// window.location.href = "/origami/room/" + result.table_id
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Remove Selection */
|
/* Remove Selection */
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ Rails.application.routes.draw do
|
|||||||
post "/:id/remove_discount_items" => "discounts#remove_discount_items"
|
post "/:id/remove_discount_items" => "discounts#remove_discount_items"
|
||||||
|
|
||||||
# Discount for Member
|
# Discount for Member
|
||||||
post "/:id/member_discount" => "discounts#member_discount"
|
# post "/:id/member_discount" => "discounts#member_discount"
|
||||||
|
|
||||||
get "/:id/request_bills" => "request_bills#print",:as => "request_bill"
|
get "/:id/request_bills" => "request_bills#print",:as => "request_bill"
|
||||||
get '/:sale_id/reprint' => 'payments#reprint' ,:defaults => { :format => 'json' }
|
get '/:sale_id/reprint' => 'payments#reprint' ,:defaults => { :format => 'json' }
|
||||||
|
|||||||
Reference in New Issue
Block a user