add req and fix for shift

This commit is contained in:
Yan
2017-07-07 17:19:14 +06:30
parent 1b0bcbffea
commit 3fe0f708bd
9 changed files with 104 additions and 25 deletions

View File

@@ -191,7 +191,7 @@
<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>
<hr />
<button id="member-discount" class="btn green 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>

View File

@@ -222,6 +222,22 @@ $('#pay').on('click',function() {
$('#back').on('click',function(){
window.location.href = '/origami/';
})
$('#void').on('click',function () {
var sure = confirm("Are you sure want to Void");
if (sure == true) {
var sale_id = $('#sale_id').val();
var ajax_url = "/origami/sale/" + sale_id + '/void';
$.ajax({
type: 'POST',
url: ajax_url,
success: function () {
window.location.href = '/origami/';
}
});
}
});
$('#re-print').click(function() {
var sale_id = $('#sale_id').val();
window.location.href = '/origami/'+ sale_id + "/reprint"