update for first bill

This commit is contained in:
Aung Myo
2018-02-06 10:43:59 +06:30
parent 62ef44fd2a
commit 1cbcab75b4
2 changed files with 10 additions and 7 deletions

View File

@@ -45,8 +45,8 @@ class Origami::PaymentsController < BaseOrigamiController
rebate = MembershipSetting.find_by_rebate(1)
if customer.membership_id != nil && rebate
member_info = Customer.get_member_account(customer)
# current_balance = SaleAudit.paymal_search(sale_id)
current_balance = 0
current_balance = SaleAudit.paymal_search(sale_id)
# current_balance = 0
end
# get printer info
print_settings=PrintSetting.find_by_unique_code(unique_code)

View File

@@ -476,12 +476,15 @@
receipt_no = ($("#receipt_no").html()).trim();
}
// console.log(checkReceiptNoInFirstBillData(receipt_no));
discount="<%= @membership.discount%>"
membership_id="<%= @obj_sale.customer.membership_id%>"
if ($("#server_mode").val() != "cloud") { // first bill not used in cloud
if(checkReceiptNoInFirstBillData(receipt_no,"")){
$("#pay").show();
}else{
$("#pay").hide();
if (discount && membership_id) {
if(checkReceiptNoInFirstBillData(receipt_no,"")){
$("#pay").show();
}else{
$("#pay").hide();
}
}
}
/* end check first bill or not*/