Skip to content

Commit

Permalink
pointscalculation
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlosb committed Aug 25, 2024
1 parent 6a31751 commit df9b611
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 3 additions & 6 deletions application/controllers/Inspection.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,9 @@ public function inspection_save()
$this->itindata_model->upd_inspection($this->input->post('inspectionid_insres'), array("en_rmrk_inspection" => $insupd['en_rmrk_inspection'], "rmrk_inspection" => $insupd['rmrk_inspection']));


$pointsforscore = $_POST['checkpoint'];
if (array_key_exists('97', $pointsforscore)) {
unset($pointsforscore[97]);
}
//$points = $_POST['checkpoint'];
$points = $pointsforscore;

$points = $_POST['checkpoint'];
//$points = $pointsforscore;
if (isset($_POST['remark'])) {
$remarks = $_POST['remark'];
}
Expand Down
2 changes: 2 additions & 0 deletions application/models/Itindata_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ public function get_sectionscore($inspid, $sectid) {
$this->db->select_sum('chpointscore_insres');
$this->db->where('inspectionid_insres', $inspid);
$this->db->where('chkpointsect_insres', $sectid);
$this->db->where('chkpointid_insres <>', 97);

$query = $this->db->get('inspectionresults_tbl');
if ($query -> num_rows() > 0) {
foreach ($query->result() as $row) {
Expand Down

0 comments on commit df9b611

Please sign in to comment.