check flag

This commit is contained in:
phyusin
2018-09-26 11:51:43 +06:30
parent 75118f5982
commit 786dd8c490
3 changed files with 4 additions and 1 deletions

View File

@@ -790,7 +790,7 @@
<script>
var cashier_type = "cashier";
$(document).ready(function () {
// localStorage.removeItem("tax_type");
localStorage.removeItem("trans_flag");
/* check webview loaded*/
var webview = <%= @webview %>;
showHideNavbar(webview);

View File

@@ -1151,6 +1151,7 @@ var trans_flag = <%= @trans_flag %>;
if (pdf_view ==1) {
var flag = localStorage.getItem("trans_flag");
localStorage.removeItem("trans_flag");
if((flag!=null) && (flag != "true")){
window.location.href = "/transactions/sales/"+sale_id;
}else{
@@ -1186,6 +1187,7 @@ var trans_flag = <%= @trans_flag %>;
allowOutsideClick: false
}, function () {
var flag = localStorage.getItem("trans_flag");
localStorage.removeItem("trans_flag");
if((flag!=null) && (flag != "true")){
window.location.href = '/transactions/sales/'+sale_id;
}else{

View File

@@ -840,6 +840,7 @@
var cashier_type = "cashier";
$(document).ready(function(){
// localStorage.removeItem("tax_type");
localStorage.removeItem("trans_flag");
/* check webview loaded*/
var webview = <%= @webview %>;
showHideNavbar(webview);