add receipt no for member

This commit is contained in:
phyusin
2017-12-21 16:46:59 +06:30
parent 1330be36a5
commit 483d45b8e6
4 changed files with 9 additions and 2 deletions

View File

@@ -148,7 +148,6 @@ $(document).on('turbolinks:load', function() {
function checkReceiptNoInFirstBillData(receipt_no) {
var status = false;
if((receipt_no!=undefined) && (receipt_no!="")){
console.log(localStorage.length);
if(localStorage.hasOwnProperty("receipt_lists")===true){
var arr_data = JSON.parse(localStorage.getItem("receipt_lists"));
var json_data = arr_data.filter(function(e) { return e.receipt_no !== receipt_no });

View File

@@ -179,7 +179,7 @@ class SalePayment < ApplicationRecord
self.outstanding_amount = self.sale.grand_total.to_f - self.received_amount.to_f
self.payment_status = "paid"
payment_method = self.save!
sale_update_payment_status(self.received_amount,true)
sale_update_payment_status(self.received_amount)
return payment_status
end

View File

@@ -594,6 +594,10 @@
url: ajax_url,
success: function (result) {
$( "#loading_wrapper" ).hide();
receipt_no = ($("#receipt_no").html()).trim();
if((receipt_no!=undefined) && (receipt_no!=""))
createReceiptNoInFirstBillData(receipt_no);
location.reload();
}
});

View File

@@ -604,6 +604,10 @@ $(".choose_payment").on('click', function () {
url: ajax_url,
success: function (result) {
$( "#loading_wrapper" ).hide();
receipt_no = ($("#receipt_no").html()).trim();
if((receipt_no!=undefined) && (receipt_no!=""))
createReceiptNoInFirstBillData(receipt_no);
location.reload();
}
});