fixed conflix payment page

This commit is contained in:
Aung Myo
2018-03-11 16:37:33 +06:30
24 changed files with 948 additions and 13 deletions

View File

@@ -501,6 +501,7 @@ var customer_name = "<%= @customer.name %>";
$("#back").on('click', function() {
localStorage.removeItem('cash');
customer_display_view(null,"reload");
if (cashier_type=="cashier") {
window.location.href = '/origami/table/'+ dining_id;
}else{
@@ -608,6 +609,7 @@ var customer_name = "<%= @customer.name %>";
$("#changed_amount").text('Changed amount ' + parseFloat($('#balance').text() * (-1)));
<% end %>
}
customer_display_view(null,"reload");
//PDF lightbox data
// if($('#balance').text() < 0){
// swal({
@@ -684,6 +686,7 @@ var customer_name = "<%= @customer.name %>";
url: ajax_url,
data: "remark="+ remark + "&sale_id=" + sale_id,
success: function () {
customer_display_view(null,"reload");
if (cashier_type=="cashier") {
window.location.href = '/origami';
}else{
@@ -841,6 +844,7 @@ var customer_name = "<%= @customer.name %>";
}
});
function update_balance(){
var cash = $('#cash').text();
var credit = $('#credit').text();
@@ -884,7 +888,8 @@ var customer_name = "<%= @customer.name %>";
type: "POST",
url: "<%= origami_payment_foc_path %>",
data: params,
success:function(result){
success:function(result){
customer_display_view(null,"reload");
if (cash >= 0) {
swal({
title: "Information!",
@@ -907,6 +912,16 @@ var customer_name = "<%= @customer.name %>";
}
});
function customer_display_view(data,status) {
$.ajax({
type: "POST",
url: '../../../customer_view',
data: {"data":data,"status":status},
dataType: "json",
success:function(result){
}
});
}
function calculate_member_discount(sale_id) {
var sub_total = $('#sub-total').text();
var member_id = $('#membership_id').text();