add receipt no for member
This commit is contained in:
@@ -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 });
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user