From bb340935e0d50a406ff7a8b4785e0beb60d5ac10 Mon Sep 17 00:00:00 2001 From: velz2020 Date: Sat, 24 Feb 2018 13:06:23 +0530 Subject: [PATCH] INPROCESS ISSUES FIXED --- application/controllers/inprocess.php | 17 ++++++++++++++++- application/views/editInprocessReport.php | 9 +++++++-- application/views/editNissanInprocessReport.php | 8 ++++++-- application/views/newinprocessreport.php | 6 +++++- application/views/newnissaninprocessreport.php | 6 +++++- 5 files changed, 39 insertions(+), 7 deletions(-) diff --git a/application/controllers/inprocess.php b/application/controllers/inprocess.php index 85949be8..5b1ae023 100755 --- a/application/controllers/inprocess.php +++ b/application/controllers/inprocess.php @@ -299,10 +299,17 @@ class inprocess extends BaseController if(!empty($_FILES['rfile']['name'])) { + + if(!empty($document)){ $file = getcwd()."\\uploads\INPROCESS\\".$document; - if(unlink($file)){ echo "sucess";}else{ echo "Failed";} + if(unlink($file)){ + //echo "sucess"; + }else{ + //echo "Failed"; + } + } $fs = $this->uploadFile(); $document = $fs; @@ -753,6 +760,14 @@ function updateNissanInprocessTestReportData() { + if(!empty($document)){ + $file = getcwd()."\\uploads\INPROCESS\\".$document; + + + if(unlink($file)){ //echo "success"; + }else{// echo "Failed"; + } + } $fs = $this->uploadFile(); $document = $fs; diff --git a/application/views/editInprocessReport.php b/application/views/editInprocessReport.php index 5285b489..3279cab0 100755 --- a/application/views/editInprocessReport.php +++ b/application/views/editInprocessReport.php @@ -716,9 +716,10 @@ function calculateMaster1(id,pid) - + var firsttimecallingloi = 0; function calculateLOI(pid,cid,cvalue) { + var cid = cid; var cvalue = cvalue; var pid = pid; @@ -776,7 +777,10 @@ function calculateMaster1(id,pid) for(var i=1;i<=8;i++) { var id = 'loicoatedsand'+ i; - document.getElementById(id).style.backgroundColor = 'white'; + if(firsttimecallingloi == 0) + { + document.getElementById(id).style.backgroundColor = 'white'; + } document.getElementById(id).contentEditable = "false"; } @@ -856,6 +860,7 @@ function calculateMaster1(id,pid) //FOR BACKGROUND COLOR CHANGE IN TESTREPORT1 TABLE COATED SAND LOI FINAL VALUE } + firsttimecallingloi++; } diff --git a/application/views/editNissanInprocessReport.php b/application/views/editNissanInprocessReport.php index aeafbada..11b457e2 100755 --- a/application/views/editNissanInprocessReport.php +++ b/application/views/editNissanInprocessReport.php @@ -1082,7 +1082,7 @@ function calculateMaster1(id,pid) - + var firsttimecallingloi = 0; function calculateLOI(pid,cid,cvalue) { var cid = cid; @@ -1142,7 +1142,10 @@ function calculateMaster1(id,pid) for(var i=1;i<=8;i++) { var id = 'loicoatedsand'+ i; - document.getElementById(id).style.backgroundColor = 'white'; + if(firsttimecallingloi == 0) + { + document.getElementById(id).style.backgroundColor = 'white'; + } document.getElementById(id).contentEditable = "false"; } @@ -1222,6 +1225,7 @@ function calculateMaster1(id,pid) //FOR BACKGROUND COLOR CHANGE IN TESTREPORT1 TABLE COATED SAND LOI FINAL VALUE } + firsttimecallingloi++; } diff --git a/application/views/newinprocessreport.php b/application/views/newinprocessreport.php index 8232cacd..baf3ced6 100755 --- a/application/views/newinprocessreport.php +++ b/application/views/newinprocessreport.php @@ -852,7 +852,7 @@ function calculateMaster1(id,pid) - + var firsttimecallingloi = 0; function calculateLOI(pid,cid,cvalue) { var cid = cid; @@ -912,7 +912,10 @@ function calculateMaster1(id,pid) for(var i=1;i<=8;i++) { var id = 'loicoatedsand'+ i; + if(firsttimecallingloi == 0) + { document.getElementById(id).style.backgroundColor = 'white'; + } document.getElementById(id).contentEditable = "false"; } @@ -992,6 +995,7 @@ function calculateMaster1(id,pid) //FOR BACKGROUND COLOR CHANGE IN TESTREPORT1 TABLE COATED SAND LOI FINAL VALUE } + firsttimecallingloi++; } diff --git a/application/views/newnissaninprocessreport.php b/application/views/newnissaninprocessreport.php index aa6b80f7..3178d768 100755 --- a/application/views/newnissaninprocessreport.php +++ b/application/views/newnissaninprocessreport.php @@ -1112,7 +1112,7 @@ function calculateMaster1(id,pid) - + var firsttimecallingloi = 0; function calculateLOI(pid,cid,cvalue) { var cid = cid; @@ -1172,7 +1172,10 @@ function calculateMaster1(id,pid) for(var i=1;i<=8;i++) { var id = 'loicoatedsand'+ i; + if(firsttimecallingloi == 0) + { document.getElementById(id).style.backgroundColor = 'white'; + } document.getElementById(id).contentEditable = "false"; } @@ -1252,6 +1255,7 @@ function calculateMaster1(id,pid) //FOR BACKGROUND COLOR CHANGE IN TESTREPORT1 TABLE COATED SAND LOI FINAL VALUE } + firsttimecallingloi++; }