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