change js format in origami
This commit is contained in:
@@ -526,7 +526,7 @@ $(function() {
|
||||
}
|
||||
});
|
||||
if (active) {
|
||||
$(this).revoveClass('selected-option');
|
||||
$(this).removeClass('selected-option');
|
||||
}else{
|
||||
$(this).addClass('selected-option');
|
||||
}
|
||||
|
||||
@@ -151,7 +151,6 @@ function checkReceiptNoInFirstBillData(receipt_no,payment=null) {
|
||||
if((receipt_no!=undefined) && (receipt_no!="")){
|
||||
if(localStorage.hasOwnProperty("receipt_lists")===true){
|
||||
var arr_data = JSON.parse(localStorage.getItem("receipt_lists"));
|
||||
console.log(arr_data)
|
||||
if (payment) {
|
||||
var json_data = arr_data.filter(function(e) { return e.receipt_no == receipt_no });
|
||||
}else{
|
||||
@@ -178,12 +177,12 @@ function createReceiptNoInFirstBillData(receipt_no,payment=null) {
|
||||
json_data = arr_data.filter(function(e) { return e.receipt_no == receipt_no });
|
||||
if (payment) {
|
||||
jdata = arr_data.filter(function(e) { return e.receipt_no !== receipt_no });
|
||||
jdata.push({'receipt_no':receipt_no,'payment':payment});
|
||||
jdata.push({receipt_no:receipt_no, payment:payment});
|
||||
localStorage.setItem("receipt_lists",JSON.stringify(jdata));
|
||||
}
|
||||
}
|
||||
if(((arr_data.length == 0) && (json_data.length == 0)) || ((arr_data.length > 0) && (json_data.length == 0))){
|
||||
arr_data.push({'receipt_no':receipt_no,'payment':payment});
|
||||
arr_data.push({receipt_no:receipt_no, payment:payment});
|
||||
localStorage.setItem("receipt_lists",JSON.stringify(arr_data));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user