From 225d1f3531f02ad076d7ce4ac0e2db58f1212ff9 Mon Sep 17 00:00:00 2001 From: Claudio Date: Wed, 18 Sep 2024 11:14:23 +0200 Subject: [PATCH] Update 18-09-2024 adding NAS --- public/userarea/importify/add_analysis.php | 16 + .../userarea/importify/add_compunds_voc.php | 132 +- public/userarea/importify/add_synonim.php | 19 + public/userarea/importify/add_synonym.php | 19 + public/userarea/importify/analysisname.php | 504 ++++++++ public/userarea/importify/components.php | 238 ++++ public/userarea/importify/delete_analysis.php | 21 + .../userarea/importify/delete_component.php | 18 + public/userarea/importify/delete_synonym.php | 14 + .../userarea/importify/delete_synonymcomp.php | 17 + .../importify/get_component_synonyms.php | 16 + public/userarea/importify/get_synonyms.php | 16 + public/userarea/importify/reportdetails.php | 153 +++ public/userarea/importify/templatediv.php | 205 +++ public/userarea/include/filterselected.php | 16 + public/userarea/include/parsedatachart.php | 289 ++++- public/userarea/include/sessionmanagement.php | 53 + public/userarea/products/bckproducts.php | 227 ++++ public/userarea/products/get_analysis.php | 22 + public/userarea/products/get_reports.php | 15 + .../products/get_reports_and_analysis.php | 71 + public/userarea/products/products.php | 347 ++--- public/userarea/products/reportdetails.php | 419 ++++++ public/userarea/reports/bckreports.php | 228 ++++ .../reports/get_analysis_by_report.php | 54 + public/userarea/reports/reports.php | 316 ++--- public/userarea/reports/reportsnew.php | 260 ++++ public/userarea/statkpi/bck120924statkpi.php | 610 +++++++++ public/userarea/statkpi/bckstatkpi.php | 227 ++++ public/userarea/statkpi/parsedatachart.php | 176 +++ public/userarea/statkpi/statkpi.php | 633 ++++++++- public/userarea/statkpi/stats-levelone.php | 1137 +++++++++++++++++ 32 files changed, 5968 insertions(+), 520 deletions(-) create mode 100644 public/userarea/importify/add_analysis.php create mode 100644 public/userarea/importify/add_synonim.php create mode 100644 public/userarea/importify/add_synonym.php create mode 100644 public/userarea/importify/analysisname.php create mode 100644 public/userarea/importify/components.php create mode 100644 public/userarea/importify/delete_analysis.php create mode 100644 public/userarea/importify/delete_component.php create mode 100644 public/userarea/importify/delete_synonym.php create mode 100644 public/userarea/importify/delete_synonymcomp.php create mode 100644 public/userarea/importify/get_component_synonyms.php create mode 100644 public/userarea/importify/get_synonyms.php create mode 100644 public/userarea/importify/reportdetails.php create mode 100644 public/userarea/importify/templatediv.php create mode 100644 public/userarea/include/filterselected.php create mode 100644 public/userarea/include/sessionmanagement.php create mode 100644 public/userarea/products/bckproducts.php create mode 100644 public/userarea/products/get_analysis.php create mode 100644 public/userarea/products/get_reports.php create mode 100644 public/userarea/products/get_reports_and_analysis.php create mode 100644 public/userarea/products/reportdetails.php create mode 100644 public/userarea/reports/bckreports.php create mode 100644 public/userarea/reports/get_analysis_by_report.php create mode 100644 public/userarea/reports/reportsnew.php create mode 100644 public/userarea/statkpi/bck120924statkpi.php create mode 100644 public/userarea/statkpi/bckstatkpi.php create mode 100644 public/userarea/statkpi/parsedatachart.php create mode 100644 public/userarea/statkpi/stats-levelone.php diff --git a/public/userarea/importify/add_analysis.php b/public/userarea/importify/add_analysis.php new file mode 100644 index 0000000..abaf3a6 --- /dev/null +++ b/public/userarea/importify/add_analysis.php @@ -0,0 +1,16 @@ + +query($query)) { + echo json_encode(['success' => true]); + } else { + echo json_encode(['error' => true]); + } +} +?> diff --git a/public/userarea/importify/add_compunds_voc.php b/public/userarea/importify/add_compunds_voc.php index bff4950..c2ba263 100644 --- a/public/userarea/importify/add_compunds_voc.php +++ b/public/userarea/importify/add_compunds_voc.php @@ -1,79 +1,79 @@ setQuery("SELECT * FROM analysisvocabulary where nameanalysisvoc like '$analysis_name'"); - $arr_analysis_refdata->execute(); - $arr_analysis_ref = $arr_analysis_refdata->Results; - if(count($arr_analysis_ref) == 0) { - $analysis_refid = $arr_analysis_ref[0]['refid']; - } +$analysis_refid = 0; +if ($analysis_name != "") { + $arr_analysis_refdata = new WA_MySQLi_RS("rsl", $repnew, 0); + $arr_analysis_refdata->setQuery("SELECT * FROM analysisvocabulary where nameanalysisvoc like '$analysis_name'"); + $arr_analysis_refdata->execute(); + $arr_analysis_ref = $arr_analysis_refdata->Results; + if (count($arr_analysis_ref) > 0) { + $analysis_refid = $arr_analysis_ref[0]['refid']; + } +} + +if ($type == 0) { + $InsertQuery = new WA_MySQLi_Query($repnew); + $InsertQuery->Action = "insert"; + $InsertQuery->Table = "`compundsvocabulary`"; + $InsertQuery->bindColumn("namecompoundsvocabulary", "s", "" . $str_name, "WA_DEFAULT"); + $InsertQuery->bindColumn("cascompoundvocabulary", "s", "" . $str_kind, "WA_DEFAULT"); + $InsertQuery->bindColumn("analysisrefid", "i", "" . $analysis_refid, "WA_DEFAULT"); + $InsertQuery->bindColumn("refid", "i", "0", "WA_DEFAULT"); + $InsertQuery->bindColumn("preferred", "s", "Y", "WA_DEFAULT"); + $InsertQuery->saveInSession(""); + $InsertQuery->execute(); + + $inserted_query = new WA_MySQLi_RS("getquery", $repnew, 0); + $inserted_query->setQuery("SELECT * FROM compundsvocabulary WHERE namecompoundsvocabulary like '$str_name' and preferred like 'Y' and refid=0"); + $inserted_query->execute(); + + $inserted_data = $inserted_query->Results; + $ref_id = 0; + if (count($inserted_data) > 0) { + $ref_id = $inserted_data[0]['idcompoundsvocabulary']; } - if($type == 0) { - $InsertQuery = new WA_MySQLi_Query($repnew); - $InsertQuery->Action = "insert"; - $InsertQuery->Table = "`compundsvocabulary`"; - $InsertQuery->bindColumn("namecompoundsvocabulary", "s", "" . $str_name, "WA_DEFAULT"); - $InsertQuery->bindColumn("cascompoundvocabulary", "s", "" .$str_kind, "WA_DEFAULT"); - $InsertQuery->bindColumn("analysisrefid", "i", "".$analysis_refid, "WA_DEFAULT"); - $InsertQuery->bindColumn("refid", "i", "0", "WA_DEFAULT"); - $InsertQuery->bindColumn("preferred", "s", "Y", "WA_DEFAULT"); - $InsertQuery->saveInSession(""); - $InsertQuery->execute(); - - $inserted_query = new WA_MySQLi_RS("getquery", $repnew, 0); - $inserted_query->setQuery("SELECT * FROM compundsvocabulary WHERE namecompoundsvocabulary like '$str_name' and preferred like 'Y' and refid=0"); - $inserted_query->execute(); - - $inserted_data = $inserted_query->Results; - $ref_id = 0; - if(count($inserted_data) > 0) { - $ref_id = $inserted_data[0]['idcompoundsvocabulary']; - } - - if($ref_id > 0) { - $UpdateQuery = new WA_MySQLi_Query($repnew); - $UpdateQuery->Action = "update"; - $UpdateQuery->Table = "`compundsvocabulary`"; - $UpdateQuery->bindColumn("refid", "i", "" . $ref_id . "", "WA_DEFAULT"); - $UpdateQuery->addFilter("idcompoundsvocabulary", "=", "i", "" . ($ref_id) . ""); - $UpdateQuery->execute(); - - die(json_encode(array( - 'code' => "success", - 'info' => array( - 'name' => $str_name, - 'kind' => $str_kind, - 'ref_id' => $ref_id, - ) - ))); - } else { - die("error"); - } - } else { - $InsertQuery = new WA_MySQLi_Query($repnew); - $InsertQuery->Action = "insert"; - $InsertQuery->Table = "`compundsvocabulary`"; - $InsertQuery->bindColumn("namecompoundsvocabulary", "s", "" . $str_name, "WA_DEFAULT"); - $InsertQuery->bindColumn("analysisrefid", "i", "".$analysis_refid, "WA_DEFAULT"); - $InsertQuery->bindColumn("refid", "i", $type, "WA_DEFAULT"); - $InsertQuery->bindColumn("preferred", "s", "N", "WA_DEFAULT"); - $InsertQuery->saveInSession(""); - $InsertQuery->execute(); + if ($ref_id > 0) { + $UpdateQuery = new WA_MySQLi_Query($repnew); + $UpdateQuery->Action = "update"; + $UpdateQuery->Table = "`compundsvocabulary`"; + $UpdateQuery->bindColumn("refid", "i", "" . $ref_id . "", "WA_DEFAULT"); + $UpdateQuery->addFilter("idcompoundsvocabulary", "=", "i", "" . ($ref_id) . ""); + $UpdateQuery->execute(); die(json_encode(array( 'code' => "success", 'info' => array( 'name' => $str_name, 'kind' => $str_kind, - 'ref_id' => $type, + 'ref_id' => $ref_id, ) ))); - } \ No newline at end of file + } else { + die("error"); + } +} else { + $InsertQuery = new WA_MySQLi_Query($repnew); + $InsertQuery->Action = "insert"; + $InsertQuery->Table = "`compundsvocabulary`"; + $InsertQuery->bindColumn("namecompoundsvocabulary", "s", "" . $str_name, "WA_DEFAULT"); + $InsertQuery->bindColumn("analysisrefid", "i", "" . $analysis_refid, "WA_DEFAULT"); + $InsertQuery->bindColumn("refid", "i", $type, "WA_DEFAULT"); + $InsertQuery->bindColumn("preferred", "s", "N", "WA_DEFAULT"); + $InsertQuery->saveInSession(""); + $InsertQuery->execute(); + + die(json_encode(array( + 'code' => "success", + 'info' => array( + 'name' => $str_name, + 'kind' => $str_kind, + 'ref_id' => $type, + ) + ))); +} diff --git a/public/userarea/importify/add_synonim.php b/public/userarea/importify/add_synonim.php new file mode 100644 index 0000000..f4a9a16 --- /dev/null +++ b/public/userarea/importify/add_synonim.php @@ -0,0 +1,19 @@ +query($query)) { + echo json_encode(['success' => true]); + } else { + echo json_encode(['error' => $conn->error]); + } +} diff --git a/public/userarea/importify/add_synonym.php b/public/userarea/importify/add_synonym.php new file mode 100644 index 0000000..f4a9a16 --- /dev/null +++ b/public/userarea/importify/add_synonym.php @@ -0,0 +1,19 @@ +query($query)) { + echo json_encode(['success' => true]); + } else { + echo json_encode(['error' => $conn->error]); + } +} diff --git a/public/userarea/importify/analysisname.php b/public/userarea/importify/analysisname.php new file mode 100644 index 0000000..1c2fb3c --- /dev/null +++ b/public/userarea/importify/analysisname.php @@ -0,0 +1,504 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+ + + +
+ +
+ +
+
+
+
+ +
+

Importify

+
+
+
+ + +
+
+
+
+
Importify:
+

+
+ + + + + + + + + + + + + + + + + + query($query); + while ($row = $result->fetch_assoc()) { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + ?> + +
Analysis NameTypeActions
' . $row['nameanalysisvoc'] . '' . $row['kindanalysisvoc'] . ' + + + + +
+ +
+ + + + +
+
+
+
+ + + +
+ +
+ +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/userarea/importify/components.php b/public/userarea/importify/components.php new file mode 100644 index 0000000..dcafd4a --- /dev/null +++ b/public/userarea/importify/components.php @@ -0,0 +1,238 @@ + + + +query($query); + +// Recupera il nome dell'analisi +$analysisQuery = "SELECT nameanalysisvoc FROM analysisvocabulary WHERE idanalysisvocabulary = $analysisrefid AND preferred = 'Y'"; +$analysisResult = $conn->query($analysisQuery); +$analysisn = $analysisResult->fetch_assoc(); +$analysisName = $analysisn['nameanalysisvoc']; // Nome dell'analisi +?> + + + + + + + + + Components + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+
+
+

Components of Analysis:

+
+
+
+ +
+
+
+
+
+ + + + + + + + + + + fetch_assoc()) { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + ?> + +
Component NameCAS NumberActions
' . $row['namecompoundsvocabulary'] . '' . $row['cascompoundvocabulary'] . ' + + +
+ +
+
+
+
+
+ +
+
+
+ +
+
+ + + + + + \ No newline at end of file diff --git a/public/userarea/importify/delete_analysis.php b/public/userarea/importify/delete_analysis.php new file mode 100644 index 0000000..c3720a9 --- /dev/null +++ b/public/userarea/importify/delete_analysis.php @@ -0,0 +1,21 @@ +query($query1) && $conn->query($query2)) { + echo json_encode(['success' => true]); + } else { + echo json_encode(['error' => true]); + } +} diff --git a/public/userarea/importify/delete_component.php b/public/userarea/importify/delete_component.php new file mode 100644 index 0000000..5ede95d --- /dev/null +++ b/public/userarea/importify/delete_component.php @@ -0,0 +1,18 @@ +query($query1) && $conn->query($query2)) { + echo json_encode(['success' => true]); +} else { + echo json_encode(['error' => true]); +} diff --git a/public/userarea/importify/delete_synonym.php b/public/userarea/importify/delete_synonym.php new file mode 100644 index 0000000..aea83ca --- /dev/null +++ b/public/userarea/importify/delete_synonym.php @@ -0,0 +1,14 @@ + +query($query)) { + echo json_encode(['success' => true]); + } else { + echo json_encode(['error' => true]); + } +} +?> diff --git a/public/userarea/importify/delete_synonymcomp.php b/public/userarea/importify/delete_synonymcomp.php new file mode 100644 index 0000000..03a6c24 --- /dev/null +++ b/public/userarea/importify/delete_synonymcomp.php @@ -0,0 +1,17 @@ +query($query)) { + echo json_encode(['success' => true]); + } else { + echo json_encode(['error' => true]); + } +} diff --git a/public/userarea/importify/get_component_synonyms.php b/public/userarea/importify/get_component_synonyms.php new file mode 100644 index 0000000..302f253 --- /dev/null +++ b/public/userarea/importify/get_component_synonyms.php @@ -0,0 +1,16 @@ +query($query); + +$synonyms = []; +while ($row = $result->fetch_assoc()) { + $synonyms[] = $row; +} + +echo json_encode($synonyms); diff --git a/public/userarea/importify/get_synonyms.php b/public/userarea/importify/get_synonyms.php new file mode 100644 index 0000000..f54ad6f --- /dev/null +++ b/public/userarea/importify/get_synonyms.php @@ -0,0 +1,16 @@ + +query($query); + + $synonyms = []; + while ($row = $result->fetch_assoc()) { + $synonyms[] = $row; + } + + echo json_encode($synonyms); +} diff --git a/public/userarea/importify/reportdetails.php b/public/userarea/importify/reportdetails.php new file mode 100644 index 0000000..3a958b6 --- /dev/null +++ b/public/userarea/importify/reportdetails.php @@ -0,0 +1,153 @@ + +prepare($queryReportDetails); +$stmt->bind_param("i", $idreports); +$stmt->execute(); +$reportDetails = $stmt->get_result()->fetch_assoc(); + +// Query per ottenere le parti e i risultati del report +$queryPartsAndResults = " + SELECT rp.*, a.nameanalysisvoc AS testName, av.nameanalysisvoc AS analytsName + FROM result_project rp + LEFT JOIN analysisvocabulary a ON rp.result_TestName = a.idanalysisvocabulary + LEFT JOIN analysisvocabulary av ON rp.result_AnalytsName = av.idanalysisvocabulary + WHERE rp.idreports = ?"; +$stmtParts = $conn->prepare($queryPartsAndResults); +$stmtParts->bind_param("i", $idreports); +$stmtParts->execute(); +$partsAndResults = $stmtParts->get_result(); +?> + + + + + + + + + Report Details + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+
+
+

Report Details

+
+
+
+ + +
+
+
+
+
Report:
+

Report Date:

+

Product Ref:

+

Product Description:

+

Style:

+

Color:

+
+
+
+
+ + +
+
+
+
+
Parts and Results
+
+ + + + + + + + + + + + fetch_assoc()) { ?> + + + + + + + + + +
Part NumberTest NameAnalyts NameResult ValueRating
+
+
+
+
+
+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/userarea/importify/templatediv.php b/public/userarea/importify/templatediv.php new file mode 100644 index 0000000..1d985bb --- /dev/null +++ b/public/userarea/importify/templatediv.php @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + +
+ + + + + +
+ +
+ + + +
+ +
+ +
+
+
+
+ +
+

Importify

+
+
+
+ + +
+
+
+
+
Importify:
+

+
+ +
+ + +
+
+
+
+ + + +
+ +
+ +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/userarea/include/filterselected.php b/public/userarea/include/filterselected.php new file mode 100644 index 0000000..693156a --- /dev/null +++ b/public/userarea/include/filterselected.php @@ -0,0 +1,16 @@ +
+ + + + + +
\ No newline at end of file diff --git a/public/userarea/include/parsedatachart.php b/public/userarea/include/parsedatachart.php index 94536f5..24571c3 100644 --- a/public/userarea/include/parsedatachart.php +++ b/public/userarea/include/parsedatachart.php @@ -1,101 +1,248 @@ - - + 0) { + $percanalysisfail = round(($num_rows_analysis_fail / $num_rows_analysis) * 100, 1); +} else { + $percanalysisfail = 0; // Oppure un altro valore di default +} + +//create an array + +if (!function_exists('replaceSmartQuotes')) { + function replaceSmartQuotes($string) + { + $search = array(chr(145), chr(146), chr(147), chr(148), chr(151)); + $replace = array("'", "'", '"', '"', '-'); + return str_replace($search, $replace, $string); + } +} + +if (!function_exists('replaceSmartQuotesInArray')) { + function replaceSmartQuotesInArray($array) + { + foreach ($array as $key => $value) { + if (is_string($value)) { + $array[$key] = replaceSmartQuotes($value); + } elseif (is_array($value)) { + $array[$key] = replaceSmartQuotesInArray($value); + } + } + return $array; + } +} + +$reportsarray = array(); +while ($row = mysqli_fetch_assoc($result)) { + $reportsarray[] = replaceSmartQuotesInArray($row); +} +//$totalreport= +if ((!empty($num_rows)) && (!empty($num_rows_fail))) { + $perfail = round(($num_rows_fail / $num_rows) * 100, 1); +} +if ((!empty($num_rows)) && (!empty($num_rows_data))) { + $perdata = round(($num_rows_data / $num_rows) * 100, 1); +} +if ((!empty($num_rows)) && (isset($num_rows_fail)) && (!empty($num_rows_data))) { + $numpassres = ($num_rows - $num_rows_data - $num_rows_fail); +} +if ((!empty($perfail)) && (!empty($perdata))) { + $perpass = round(100 - $perfail - $perdata, 1); +} + +?> + + + \ No newline at end of file diff --git a/public/userarea/include/sessionmanagement.php b/public/userarea/include/sessionmanagement.php new file mode 100644 index 0000000..cca9a07 --- /dev/null +++ b/public/userarea/include/sessionmanagement.php @@ -0,0 +1,53 @@ + + + \ No newline at end of file diff --git a/public/userarea/products/bckproducts.php b/public/userarea/products/bckproducts.php new file mode 100644 index 0000000..32c341b --- /dev/null +++ b/public/userarea/products/bckproducts.php @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + +
+ + + + + +
+ +
+ + + +
+ +
+ +
+
+
+
+ +
+

Reports

+
+
+
+ + +
+
+
+
+
Products
+ Products + Dahboard + +

+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + setQuery("SELECT * FROM products"); + $productslist->execute(); + + $wa_startindex = 0; + while (!$productslist->atEnd()) { + $wa_startindex = $productslist->Index; + ?> + + + + + + + + + + + + + + moveNext(); + } + $productslist->moveFirst(); //return RS to first record + unset($wa_startindex); + unset($wa_repeatcount); + + ?> +
Ref. NumberDescriptionRef. NumberDescriptionTest OutRatingAction
getColumnVal("products_refnumber")); ?>getColumnVal("products_description")); ?>getColumnVal("products_refnumber")); ?>getColumnVal("products_description")); ?>getColumnVal("reportsDateOut")); ?>getColumnVal("reportsRating")); ?> + " role="button" data-toggle="tooltip" title="Go"> + " role="button" data-toggle="tooltip" title="Expand"> + +
+
+ +
+
+
+
+ + + +
+ +
+ +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/userarea/products/get_analysis.php b/public/userarea/products/get_analysis.php new file mode 100644 index 0000000..abcbc31 --- /dev/null +++ b/public/userarea/products/get_analysis.php @@ -0,0 +1,22 @@ +query($query); + + $analysis = []; + while ($row = $result->fetch_assoc()) { + $analysis[] = $row; + } + + echo json_encode($analysis); +} else { + echo json_encode([]); +} diff --git a/public/userarea/products/get_reports.php b/public/userarea/products/get_reports.php new file mode 100644 index 0000000..b0c9bb1 --- /dev/null +++ b/public/userarea/products/get_reports.php @@ -0,0 +1,15 @@ +query($query); + +$reports = []; +while ($row = $result->fetch_assoc()) { + $reports[] = $row; +} +echo json_encode($reports); diff --git a/public/userarea/products/get_reports_and_analysis.php b/public/userarea/products/get_reports_and_analysis.php new file mode 100644 index 0000000..c2fd933 --- /dev/null +++ b/public/userarea/products/get_reports_and_analysis.php @@ -0,0 +1,71 @@ +query($queryReports); + + $reports = []; + while ($report = $resultReports->fetch_assoc()) { + // Query per ottenere le analisi associate a ogni report con LEFT JOIN su analysisvocabulary + $reportId = $report['idreports']; + $queryAnalysis = " + SELECT rp.*, av.nameanalysisvoc + FROM result_project rp + LEFT JOIN analysisvocabulary av ON rp.result_TestName = av.idanalysisvocabulary + WHERE rp.idreports = $reportId"; + $resultAnalysis = $conn->query($queryAnalysis); + + // Mappa per aggregare i risultati delle analisi in base a 'result_TestName' e calcolare il peggior rating + $analysisGrouped = []; + while ($analysis = $resultAnalysis->fetch_assoc()) { + $testName = $analysis['nameanalysisvoc']; + + // Normalizza il rating per confrontare varianti diverse + $normalizedRating = strtoupper(trim($analysis['test_Rating'])); + + // Gestiamo anche varianti come "Complies", "Doesn't Comply", "//" e "N/A" + if ($normalizedRating === 'P' || $normalizedRating === 'PASS' || $normalizedRating === 'COMPLIES') { + $normalizedRating = 'PASS'; + } elseif ($normalizedRating === 'F' || $normalizedRating === 'FAIL' || $normalizedRating === 'DOESN\'T COMPLY') { + $normalizedRating = 'FAIL'; + } elseif ($normalizedRating === '//' || $normalizedRating === 'N/A') { + $normalizedRating = '//'; + } else { + $normalizedRating = 'N/A'; // Per valori non riconosciuti + } + + // Se l'analisi per questo test è già stata trovata, confronta i rating e prendi il peggiore + if (isset($analysisGrouped[$testName])) { + $currentRating = $analysisGrouped[$testName]['finalRating']; + // Logica di priorità: Fail > // > Pass + if ($currentRating === 'PASS' && ($normalizedRating === 'FAIL' || $normalizedRating === '//')) { + $analysisGrouped[$testName]['finalRating'] = $normalizedRating; + } elseif ($currentRating === '//' && $normalizedRating === 'FAIL') { + $analysisGrouped[$testName]['finalRating'] = 'FAIL'; // Peggiora il rating + } + } else { + // Prima occorrenza dell'analisi, aggiungila alla mappa + $analysisGrouped[$testName] = [ + 'name' => $testName, + 'finalRating' => $normalizedRating + ]; + } + } + + // Aggiungi le analisi raggruppate al report + $report['analysis'] = array_values($analysisGrouped); // Converte la mappa in un array + $reports[] = $report; + } + + // Restituisci i report e le analisi in formato JSON + echo json_encode(['reports' => $reports]); +} else { + echo json_encode(['error' => 'Product ID not provided']); +} diff --git a/public/userarea/products/products.php b/public/userarea/products/products.php index 32c341b..8a397f6 100644 --- a/public/userarea/products/products.php +++ b/public/userarea/products/products.php @@ -1,6 +1,14 @@ - + +query($query); ?> + @@ -8,220 +16,241 @@ - + Products - + + - + + + + + + - + - -
-
-
-
-
- -
- - - -
-
- - -
- +
-
- -
-

Reports

+

Products

-
-
Products
- Products - Dahboard - -

-
- - -
- -
- +
- - - - - - - - - - - - - + + + + + + + - setQuery("SELECT * FROM products"); - $productslist->execute(); - - $wa_startindex = 0; - while (!$productslist->atEnd()) { - $wa_startindex = $productslist->Index; - ?> - - - - - - - - - - + fetch_assoc()) { ?> + + + + + + + - - moveNext(); - } - $productslist->moveFirst(); //return RS to first record - unset($wa_startindex); - unset($wa_repeatcount); - - ?> + +
Ref. NumberDescriptionRef. NumberDescriptionTest OutRatingActionProduct RefDescriptionStyleColorSeasonMarketAction
getColumnVal("products_refnumber")); ?>getColumnVal("products_description")); ?>getColumnVal("products_refnumber")); ?>getColumnVal("products_description")); ?>getColumnVal("reportsDateOut")); ?>getColumnVal("reportsRating")); ?>
- " role="button" data-toggle="tooltip" title="Go"> - " role="button" data-toggle="tooltip" title="Expand"> - +
-
- +
- -
- -
- -
- +
+
- - - - + - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/userarea/products/reportdetails.php b/public/userarea/products/reportdetails.php new file mode 100644 index 0000000..cd6e789 --- /dev/null +++ b/public/userarea/products/reportdetails.php @@ -0,0 +1,419 @@ + +prepare($queryReportDetails); +$stmt->bind_param("i", $idreports); +$stmt->execute(); +$reportDetails = $stmt->get_result()->fetch_assoc(); + +// Query per ottenere le parti e i risultati del report con il nome dell'analista e delle parti +$queryPartsAndResults = " + SELECT rp.*, + a.nameanalysisvoc AS testName, + cv.namecompoundsvocabulary AS analytsName, + pr.partsDescription + FROM result_project rp + LEFT JOIN analysisvocabulary a ON rp.result_TestName = a.idanalysisvocabulary + LEFT JOIN compundsvocabulary cv ON rp.result_AnalytsName = cv.idcompoundsvocabulary + LEFT JOIN parts pr ON rp.idPart = pr.idParts + WHERE rp.idreports = ? + ORDER BY rp.result_TestName, rp.idPart"; +$stmtParts = $conn->prepare($queryPartsAndResults); +$stmtParts->bind_param("i", $idreports); +$stmtParts->execute(); +$partsAndResults = $stmtParts->get_result(); +?> + + + + + + + + + Report Details + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+
+
+

Report Details

+
+
+
+ + +
+
+
+
+
+
Report:
+ + + + + + + + + + + + + + + + + + + + + +
Report Date:
Product Ref:
Product Description:
Style:
Color:
+
+
+
+
+
+ + + +
+
+ +
+
+ +
+
+ +
+
+ + + +
+
+
+
+
Parts and Results
+
+ fetch_assoc()) { + // Debug: Stampa i dati di ogni riga + // Questo serve per stampare i risultati in modo più leggibile e debuggare + + $previousPart = ''; + + + // Se il nome dell'analisi cambia, crea una nuova sezione + if ($currentTestName != $row['testName']) { + if ($currentTestName != '') { + echo ''; // Chiude la tabella precedente + } + $currentTestName = $row['testName']; + echo '
Analysis: ' . $currentTestName . '
'; + } + + // Verifica se la parte corrente è diversa dalla precedente per evitare duplicazioni + $currentPart = $row['partsDescription'] ?? 'Unknown Part'; + if ($currentPart != $previousPart) { + // Stampa il titolo della parte solo se cambia + echo '
Part: ' . (!empty($row['partsDescription']) ? $currentPart : 'Part Not Specified') . '
'; + + // Apri una nuova tabella per la parte + echo ''; + echo ''; + echo ''; + + + // Aggiorna la variabile di controllo per la parte + $previousPart = $currentPart; + } + + // Classificazione del rating + $ratingClass = ''; + if (strtoupper($row['test_Rating']) == 'FAIL' || strtoupper($row['test_Rating']) == "DOESN'T COMPLY") { + $ratingClass = 'rating-fail'; + } elseif (strtoupper($row['test_Rating']) == 'PASS' || strtoupper($row['test_Rating']) == 'COMPLIES') { + $ratingClass = 'rating-pass'; + } else { + $ratingClass = 'rating-ambiguous'; + } + + // Stampa i dettagli della riga + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + if ($currentTestName != '') { + echo '
Analyts NameResult ValueRating
' . (!empty($row['analytsName']) ? $row['analytsName'] . ' (ID: ' . $row['result_AnalytsName'] . ')' : ' ') . '' . (!empty($row['result_Value']) ? htmlspecialchars($row['result_Value'], ENT_QUOTES, 'UTF-8') : ' ') . '' . (!empty($row['test_Rating']) ? htmlspecialchars($row['test_Rating'], ENT_QUOTES, 'UTF-8') : ' ') . '
'; // Chiude l'ultima tabella + } + ?> +
+
+
+
+
+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/userarea/reports/bckreports.php b/public/userarea/reports/bckreports.php new file mode 100644 index 0000000..7a402f5 --- /dev/null +++ b/public/userarea/reports/bckreports.php @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + +
+ + + + + +
+ +
+ + + +
+ +
+ +
+
+
+
+ +
+

Reports

+
+
+
+ + +
+
+
+
+
Reports
+ Reports Dahboard + Dahboard + +

+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + setQuery("SELECT * FROM reports LEFT JOIN products ON reports.idproducts=products.idproducts ORDER BY reports.reportsDateOut "); + $reportslist->execute(); + + $wa_startindex = 0; + while (!$reportslist->atEnd()) { + $wa_startindex = $reportslist->Index; + ?> + + + + + + + + + + + + + + + moveNext(); + } + $reportslist->moveFirst(); //return RS to first record + unset($wa_startindex); + unset($wa_repeatcount); + + ?> +
Report N.LabRef. NumberDescriptionTest OutRatingAction
getColumnVal("reportsNumberLab")); ?>getColumnVal("lab")); ?>getColumnVal("products_refnumber")); ?>getColumnVal("products_description"), 0, 50); ?>getColumnVal("reportsDateOut")); ?>getColumnVal("reportsRating")); ?> + " role="button" data-toggle="tooltip" title="Go"> + " role="button" data-toggle="tooltip" title="Expand"> + +
+
+ +
+
+
+
+ + + +
+ +
+ +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/userarea/reports/get_analysis_by_report.php b/public/userarea/reports/get_analysis_by_report.php new file mode 100644 index 0000000..4e3cc56 --- /dev/null +++ b/public/userarea/reports/get_analysis_by_report.php @@ -0,0 +1,54 @@ +prepare($query); +$stmt->bind_param("i", $reportId); +$stmt->execute(); +$result = $stmt->get_result(); + +// Array per raccogliere le analisi e le relative valutazioni (rating) +$analysis = []; + +// Raggruppa le analisi e seleziona il rating più restrittivo +while ($row = $result->fetch_assoc()) { + $name = $row['name']; + $rating = strtoupper($row['finalRating']); // Normalizziamo tutto in maiuscolo per uniformità + + if (!isset($analysis[$name])) { + // Se l'analisi non è ancora presente, la aggiungiamo + $analysis[$name] = $rating; + } else { + // Applica il rating più restrittivo: Fail > N/A > Pass + if ($analysis[$name] != 'FAIL' && ($rating == 'FAIL' || $rating == "DOESN'T COMPLY")) { + $analysis[$name] = 'FAIL'; + } elseif ($analysis[$name] != 'FAIL' && $analysis[$name] != 'N/A' && ($rating == 'N/A' || $rating == '//')) { + $analysis[$name] = 'N/A'; + } elseif ($analysis[$name] == 'PASS' && ($rating == 'PASS' || $rating == 'COMPLIES')) { + $analysis[$name] = 'PASS'; + } + } +} + +// Trasforma i dati in un array +$finalAnalysis = []; +foreach ($analysis as $name => $finalRating) { + $finalAnalysis[] = [ + 'name' => $name, + 'finalRating' => $finalRating + ]; +} + +// Restituisci i dati come JSON +echo json_encode($finalAnalysis); diff --git a/public/userarea/reports/reports.php b/public/userarea/reports/reports.php index 7a402f5..f1c8869 100644 --- a/public/userarea/reports/reports.php +++ b/public/userarea/reports/reports.php @@ -1,6 +1,16 @@ query($query); ?> + @@ -8,221 +18,211 @@ - + Reports - + + - + + + + + + - + - -
-
-
-
-
- -
- - - -
-
- - -
- +
-
- -

Reports

-
-
Reports
- Reports Dahboard - Dahboard - -

-
- - -
- -
- +
- - - - - - - - - - - - - + + + + + + - setQuery("SELECT * FROM reports LEFT JOIN products ON reports.idproducts=products.idproducts ORDER BY reports.reportsDateOut "); - $reportslist->execute(); - - $wa_startindex = 0; - while (!$reportslist->atEnd()) { - $wa_startindex = $reportslist->Index; - ?> - - - - - - - - - - - + fetch_assoc()) { ?> + + + + + + - - moveNext(); - } - $reportslist->moveFirst(); //return RS to first record - unset($wa_startindex); - unset($wa_repeatcount); - - ?> + +
Report N.LabRef. NumberDescriptionTest OutRatingActionReport NumberReport DateProduct RefProduct DescriptionRatingAction
getColumnVal("reportsNumberLab")); ?>getColumnVal("lab")); ?>getColumnVal("products_refnumber")); ?>getColumnVal("products_description"), 0, 50); ?>getColumnVal("reportsDateOut")); ?>getColumnVal("reportsRating")); ?>
- " role="button" data-toggle="tooltip" title="Go"> - " role="button" data-toggle="tooltip" title="Expand"> - +
-
- +
- -
- -
- -
- +
+
- - - - + - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/userarea/reports/reportsnew.php b/public/userarea/reports/reportsnew.php new file mode 100644 index 0000000..7d2d0ce --- /dev/null +++ b/public/userarea/reports/reportsnew.php @@ -0,0 +1,260 @@ + +query($query); +?> + + + + + + + + + Reports + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+
+
+

Reports

+
+
+
+ +
+
+
+
+
+ + + + + + + + + + + + + fetch_assoc()) { ?> + + + + + + + + + + +
Report NumberReport DateProduct RefProduct DescriptionRatingAction
+ +
+
+
+
+
+
+ +
+
+
+ +
+
+ + + + + + \ No newline at end of file diff --git a/public/userarea/statkpi/bck120924statkpi.php b/public/userarea/statkpi/bck120924statkpi.php new file mode 100644 index 0000000..7eb0564 --- /dev/null +++ b/public/userarea/statkpi/bck120924statkpi.php @@ -0,0 +1,610 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + +
+ + + + + +
+ +
+ + + +
+ +
+ +
+
+
+
+ +
+

Importify

+
+
+
+ + +
+
+
+
+
Importify:
+ + +
+
+
+
+ + +
+
+
+
+ + + +
+
+
+
+
Products
+

0

+
+
+
+
+
+
+
Reports
+

0

+
+
+
+
+
+
+
Failed Reports
+
+

0

+ (0%) +
+
+
+
+
+
+
+
Total Tests
+

0

+
+
+
+
+
+
+
Failed Tests
+
+

0

+ (0%) +
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
Reports Overview
+
+
+
+
+
+
+
+
Worst Analysis
+
+
+
+
+
+ +
+
+
+
+
Worst Suppliers by Failed Report Percentage
+
+
+
+
+
+ +
+
+
+
+
Number of Products by Supplier
+
+
+
+
+
+ + + +
+ +
+ +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/userarea/statkpi/bckstatkpi.php b/public/userarea/statkpi/bckstatkpi.php new file mode 100644 index 0000000..b9fffa9 --- /dev/null +++ b/public/userarea/statkpi/bckstatkpi.php @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + +
+ + + + + +
+ +
+ + + +
+ +
+ +
+
+
+
+ +
+

StatKPI

+
+
+
+ + +
+
+
+
+
Products
+ Products + Dahboard + +

+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + setQuery("SELECT * FROM products"); + $productslist->execute(); + + $wa_startindex = 0; + while (!$productslist->atEnd()) { + $wa_startindex = $productslist->Index; + ?> + + + + + + + + + + + + + + moveNext(); + } + $productslist->moveFirst(); //return RS to first record + unset($wa_startindex); + unset($wa_repeatcount); + + ?> +
Ref. NumberDescriptionRef. NumberDescriptionTest OutRatingAction
getColumnVal("products_refnumber")); ?>getColumnVal("products_description")); ?>getColumnVal("products_refnumber")); ?>getColumnVal("products_description")); ?>getColumnVal("reportsDateOut")); ?>getColumnVal("reportsRating")); ?> + " role="button" data-toggle="tooltip" title="Go"> + " role="button" data-toggle="tooltip" title="Expand"> + +
+
+ +
+
+
+
+ + + +
+ +
+ +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/userarea/statkpi/parsedatachart.php b/public/userarea/statkpi/parsedatachart.php new file mode 100644 index 0000000..85293b6 --- /dev/null +++ b/public/userarea/statkpi/parsedatachart.php @@ -0,0 +1,176 @@ + +query($totalProductsQuery); +$totalProducts = $totalProductsResult->fetch_assoc()['totalProducts']; + +// Statistic 2: Total number of reports +$totalReportsQuery = " + SELECT COUNT(DISTINCT r.idreports) AS totalReports + FROM reports r + LEFT JOIN products p ON r.idproducts = p.idproducts + $filters +"; +$totalReportsResult = $conn->query($totalReportsQuery); +$totalReports = $totalReportsResult->fetch_assoc()['totalReports']; + +// Statistic 3: Number of 'fail' reports and percentage compared to total +$failedReportsQuery = " + SELECT COUNT(DISTINCT r.idreports) AS failedReports + FROM reports r + LEFT JOIN products p ON r.idproducts = p.idproducts + $filters AND UPPER(r.reportsRating) IN ('FAIL', 'F', 'DOESN\'T COMPLY') +"; +$failedReportsResult = $conn->query($failedReportsQuery); +$failedReports = $failedReportsResult->fetch_assoc()['failedReports']; +$failedReportsPercent = ($totalReports > 0) ? ($failedReports / $totalReports) * 100 : 0; + +// Statistic 4: Total number of tests performed (distinct tests) +$totalTestsQuery = " + SELECT COUNT(DISTINCT rp.idreports, rp.idPart, rp.result_TestName) AS totalTests + FROM result_project rp + LEFT JOIN reports r ON rp.idreports = r.idreports + LEFT JOIN products p ON r.idproducts = p.idproducts + $filters +"; +$totalTestsResult = $conn->query($totalTestsQuery); +$totalTests = $totalTestsResult->fetch_assoc()['totalTests']; + +// Statistic 5: Number of 'fail' tests and percentage (case-insensitive for rating fail) +$failedTestsQuery = " + SELECT COUNT(DISTINCT rp.idreports, rp.idPart, rp.result_TestName) AS failedTests + FROM result_project rp + LEFT JOIN reports r ON rp.idreports = r.idreports + LEFT JOIN products p ON r.idproducts = p.idproducts + $filters AND UPPER(rp.result_Rating) IN ('FAIL', 'F', 'DOESN\'T COMPLY') +"; +$failedTestsResult = $conn->query($failedTestsQuery); +$failedTests = $failedTestsResult->fetch_assoc()['failedTests']; +$failedTestsPercent = ($totalTests > 0) ? ($failedTests / $totalTests) * 100 : 0; + +// Pie Chart Data for Reports (Fail, Pass, Others) +$failReportsPieQuery = " + SELECT COUNT(*) AS failReports + FROM reports r + LEFT JOIN products p ON r.idproducts = p.idproducts + $filters AND UPPER(r.reportsRating) IN ('FAIL', 'F', 'DOESN\'T COMPLY') +"; +$failReportsPieResult = $conn->query($failReportsPieQuery); +$failReportsPie = $failReportsPieResult->fetch_assoc()['failReports']; + +$passReportsPieQuery = " + SELECT COUNT(*) AS passReports + FROM reports r + LEFT JOIN products p ON r.idproducts = p.idproducts + $filters AND UPPER(r.reportsRating) IN ('PASS', 'P', 'COMPLIES') +"; +$passReportsPieResult = $conn->query($passReportsPieQuery); +$passReportsPie = $passReportsPieResult->fetch_assoc()['passReports']; + +$otherReportsPieQuery = " + SELECT COUNT(*) AS otherReports + FROM reports r + LEFT JOIN products p ON r.idproducts = p.idproducts + $filters AND UPPER(r.reportsRating) NOT IN ('FAIL', 'F', 'DOESN\'T COMPLY', 'PASS', 'P', 'COMPLIES') +"; +$otherReportsPieResult = $conn->query($otherReportsPieQuery); +$otherReportsPie = $otherReportsPieResult->fetch_assoc()['otherReports']; + +// Query to get the top 10 analyses with the most 'Fail' results +$topFailingAnalysisQuery = " + SELECT a.nameanalysisvoc AS analysisName, COUNT(DISTINCT rp.idreports, rp.idPart, rp.result_TestName) AS failCount + FROM result_project rp + LEFT JOIN reports r ON rp.idreports = r.idreports + LEFT JOIN products p ON r.idproducts = p.idproducts + LEFT JOIN analysisvocabulary a ON rp.result_TestName = a.idanalysisvocabulary + $filters AND UPPER(rp.result_Rating) IN ('FAIL', 'F', 'DOESN\'T COMPLY') + GROUP BY rp.result_TestName + ORDER BY failCount DESC + LIMIT 10 +"; +$topFailingAnalysisResult = $conn->query($topFailingAnalysisQuery); +$topFailingAnalysis = []; +while ($row = $topFailingAnalysisResult->fetch_assoc()) { + $analysisName = (strlen($row['analysisName']) > 80) ? substr($row['analysisName'], 0, 80) . '...' : $row['analysisName']; + $topFailingAnalysis[] = ['name' => $analysisName, 'failCount' => $row['failCount']]; +} + +// Statistic for worst suppliers based on % of failed reports +$worstSuppliersQuery = " + SELECT p.namesupplier AS supplier, COUNT(r.idreports) AS totalReports, + SUM(CASE WHEN UPPER(r.reportsRating) IN ('FAIL', 'F', 'DOESN\'T COMPLY') THEN 1 ELSE 0 END) AS failedReports, + (SUM(CASE WHEN UPPER(r.reportsRating) IN ('FAIL', 'F', 'DOESN\'T COMPLY') THEN 1 ELSE 0 END) / COUNT(r.idreports)) * 100 AS failPercentage + FROM reports r + LEFT JOIN products p ON r.idproducts = p.idproducts + $filters + GROUP BY p.namesupplier + ORDER BY failPercentage DESC + LIMIT 10 +"; +$worstSuppliersResult = $conn->query($worstSuppliersQuery); +$worstSuppliers = []; +while ($row = $worstSuppliersResult->fetch_assoc()) { + $worstSuppliers[] = [ + 'supplier' => $row['supplier'], + 'failPercentage' => round($row['failPercentage'], 2), + 'totalReports' => $row['totalReports'], + 'failedReports' => $row['failedReports'] + ]; +} + +// Statistic for products by suppliers +$productBySupplierQuery = " + SELECT p.namesupplier AS supplier, COUNT(p.idproducts) AS totalProducts + FROM products p + WHERE p.namesupplier IS NOT NULL + GROUP BY p.namesupplier + ORDER BY totalProducts DESC"; +$productBySupplierResult = $conn->query($productBySupplierQuery); +$productBySupplier = []; +while ($row = $productBySupplierResult->fetch_assoc()) { + $productBySupplier[] = [ + 'supplier' => $row['supplier'], + 'totalProducts' => $row['totalProducts'] + ]; +} + +// Ora controlliamo se è una richiesta AJAX +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + // Rispondi ai dati aggiornati tramite AJAX + echo json_encode([ + 'totalProducts' => $totalProducts, + 'totalReports' => $totalReports, + 'failedReports' => $failedReports, + 'failedReportsPercent' => $failedReportsPercent, + 'totalTests' => $totalTests, + 'failedTests' => $failedTests, + 'failedTestsPercent' => $failedTestsPercent, + 'failReportsPie' => $failReportsPie, + 'passReportsPie' => $passReportsPie, + 'otherReportsPie' => $otherReportsPie, + 'topFailingAnalysis' => $topFailingAnalysis, + 'worstSuppliers' => $worstSuppliers, + 'productBySupplier' => $productBySupplier + ]); + exit; // Ferma l'esecuzione del resto dello script dopo aver risposto all'AJAX +} diff --git a/public/userarea/statkpi/statkpi.php b/public/userarea/statkpi/statkpi.php index b9fffa9..a8f29c8 100644 --- a/public/userarea/statkpi/statkpi.php +++ b/public/userarea/statkpi/statkpi.php @@ -1,5 +1,6 @@ @@ -20,12 +21,49 @@ + + + + + + + + + + + @@ -74,6 +208,8 @@ + +
@@ -97,91 +233,162 @@
-

StatKPI

+

Importify

+ +
-
Products
- Products - Dahboard - -

-
- +
Importify:
+ +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + -
-
- - - - - - - - - - - - - - - - - - - - setQuery("SELECT * FROM products"); - $productslist->execute(); - - $wa_startindex = 0; - while (!$productslist->atEnd()) { - $wa_startindex = $productslist->Index; - ?> - - - - - - - - - - - - - - moveNext(); - } - $productslist->moveFirst(); //return RS to first record - unset($wa_startindex); - unset($wa_repeatcount); - - ?> -
Ref. NumberDescriptionRef. NumberDescriptionTest OutRatingAction
getColumnVal("products_refnumber")); ?>getColumnVal("products_description")); ?>getColumnVal("products_refnumber")); ?>getColumnVal("products_description")); ?>getColumnVal("reportsDateOut")); ?>getColumnVal("reportsRating")); ?> - " role="button" data-toggle="tooltip" title="Go"> - " role="button" data-toggle="tooltip" title="Expand"> - -
-
+
+
+
+
+
+ + + +
+
+
+
+
Products
+

0

+
+
+
+
+
+
+
Reports
+

0

+
+
+
+
+
+
+
Failed Reports
+
+

0

+ (0%) +
+
+
+
+
+
+
+
Total Tests
+

0

+
+
+
+
+
+
+
Failed Tests
+
+

0

+ (0%) +
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
Reports Overview
+
+
+
+
+
+
+
+
Worst Analysis
+
+
+
+
+
+ +
+
+
+
+
Worst Suppliers by Failed Report Percentage
+
+
+
+
+
+ +
+
+
+
+
Number of Products by Supplier
+
+
+
+
+
+ +
@@ -198,12 +405,304 @@ + + + + + + + + + + - @@ -214,12 +713,14 @@ + + diff --git a/public/userarea/statkpi/stats-levelone.php b/public/userarea/statkpi/stats-levelone.php new file mode 100644 index 0000000..e3ca742 --- /dev/null +++ b/public/userarea/statkpi/stats-levelone.php @@ -0,0 +1,1137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+ + + +
+ +
+ +
+
+
+
+ +
+

StatKPI

+
+
+
+ + + + +
+ + +
+
+ +
+ + +

+
+
+
+ +
+
+ +
+ + setQuery("SELECT DISTINCT namesupplier FROM products WHERE products.idcompany='$idcompany' ORDER BY products.namesupplier"); + $manufacturerlist->execute(); + ?> +
+
+ +
+ + + + + + + +
+
+
+ + + +
+
+ +
+
+ + +
+
+ + +
+
+
+ + + + + + + + + +
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
Total Report
+
+ +
+ +
+
+ +
+

+

Data not found. Please modify your filters

+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+ +
+
Failed Reports
+
+ +
+ +
+
+ +
+

( % of total reports )

+

Data not found. Please modify your filters

+
+
+
+
+
+ + + +
+
+
+
+
+
+
+ +
+
+ +
+
Total Analysis
+
+ +
+ +
+
+ +
+

+

Data not found. Please modify your filters

+
+
+
+
+
+ + +
+
+
+
+
+
+
+ +
+
+ +
+
Failed Analysis
+
+ +
+ +
+
+ +
+

( %of total analysis )

+

Data not found. Please modify your filters

+
+
+
+
+
+
+
+
+ + +
+
+
+
+

Reports Pie

+
+
+ +
+
+
+
+

Data not found. Please modify your filters

+
+
+
+ + + +
+
+
+

Highest Fail 10 Analysis

+
+
+
+
+
+ +
+
+ + +
+
+
+

Highest Fail 10 Analysis

+
+
+
+
+
+ +
+
+ +
+ + + + +
+
+
+

Highest Fail "10 Supplier"

+
+
+
+
+
+ +
+
+ + + + +
+ + +
+ + +
+ +
+
+
+

Reports Results

+
+
+
+
+ + + + + +
+ +
+ +
+ + + +
+
+
+
+
Importify:
+ Insert new template + Import File + + + +

+ + + +
+
+
+
+ + + +
+ +
+ +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file