change js fun: in origami
This commit is contained in:
@@ -148,8 +148,8 @@ $(document).on('turbolinks:load', function() {
|
||||
function checkReceiptNoInFirstBillData(receipt_no) {
|
||||
var status = false;
|
||||
if((receipt_no!=undefined) && (receipt_no!="")){
|
||||
var arr_data = JSON.parse(localStorage.getItem("receipt_lists"));
|
||||
if((arr_data!=undefined) && (arr_data!=null)){
|
||||
if((localStorage.getItem("receipt_lists")!=undefined) && (localStorage.getItem("receipt_lists")!=null)){
|
||||
var arr_data = JSON.parse(localStorage.getItem("receipt_lists"));
|
||||
var json_data = arr_data.filter(function(e) { return e.receipt_no !== receipt_no });
|
||||
if((arr_data.length) > (json_data.length)){
|
||||
status = true;
|
||||
@@ -175,8 +175,8 @@ function createReceiptNoInFirstBillData(receipt_no) {
|
||||
}
|
||||
|
||||
function deleteReceiptNoInFirstBillData(receipt_no) {
|
||||
var arr_data = JSON.parse(localStorage.getItem("receipt_lists"));
|
||||
if((arr_data!=undefined) && (arr_data!=null)){
|
||||
if((localStorage.getItem("receipt_lists")!=undefined) && (localStorage.getItem("receipt_lists")!=null)){
|
||||
var arr_data = JSON.parse(localStorage.getItem("receipt_lists"));
|
||||
var json_data = arr_data.filter(function(e) { return e.receipt_no !== receipt_no });
|
||||
localStorage.setItem("receipt_lists",JSON.stringify(json_data));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user