update for first bill
This commit is contained in:
@@ -45,8 +45,8 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
rebate = MembershipSetting.find_by_rebate(1)
|
rebate = MembershipSetting.find_by_rebate(1)
|
||||||
if customer.membership_id != nil && rebate
|
if customer.membership_id != nil && rebate
|
||||||
member_info = Customer.get_member_account(customer)
|
member_info = Customer.get_member_account(customer)
|
||||||
# current_balance = SaleAudit.paymal_search(sale_id)
|
current_balance = SaleAudit.paymal_search(sale_id)
|
||||||
current_balance = 0
|
# current_balance = 0
|
||||||
end
|
end
|
||||||
# get printer info
|
# get printer info
|
||||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||||
|
|||||||
@@ -476,14 +476,17 @@
|
|||||||
receipt_no = ($("#receipt_no").html()).trim();
|
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 ($("#server_mode").val() != "cloud") { // first bill not used in cloud
|
||||||
|
if (discount && membership_id) {
|
||||||
if(checkReceiptNoInFirstBillData(receipt_no,"")){
|
if(checkReceiptNoInFirstBillData(receipt_no,"")){
|
||||||
$("#pay").show();
|
$("#pay").show();
|
||||||
}else{
|
}else{
|
||||||
$("#pay").hide();
|
$("#pay").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* end check first bill or not*/
|
/* end check first bill or not*/
|
||||||
|
|
||||||
$('.invoicedetails').on('click', function () {
|
$('.invoicedetails').on('click', function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user