update rounding adj

This commit is contained in:
Aung Myo
2017-07-01 18:19:41 +06:30
parent 40a2347c1b
commit 740f585a31
17 changed files with 230 additions and 15 deletions

View File

@@ -112,6 +112,10 @@
<tr>
<td class="charges-name"><strong>Tax:</strong></td>
<td class="item-attr"><strong id="order-Tax"><%= @sale.total_tax rescue 0%></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Rounding Adj:</strong></td>
<td class="item-attr"><strong id="order-round-adj"><%= @sale.rounding_adjustment rescue 0%></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Grand Total:</strong></td>
@@ -139,7 +143,17 @@ $(document).ready(function(){
});
$('#pay').on('click',function() {
window.location.href = '/origami/sale/<%= @sale.id %>/payment';
var sale_id = '<%= @sale.id %>';
var url = '/origami/sale/'+ sale_id + "/rounding_adj" ;
alert(url)
$.ajax({
type: "POST",
url: '/origami/sale/'+ sale_id + "/rounding_adj",
success:function(result){
window.location.href = '/origami/sale/'+ sale_id + "/payment";
}
});
});
$('#back').on('click',function(){
window.location.href = '/origami/table/<%= @room.id %>';