diff --git a/app/Models/Monthlypay_model.php b/app/Models/Monthlypay_model.php index bfdb24f9..8e380491 100755 --- a/app/Models/Monthlypay_model.php +++ b/app/Models/Monthlypay_model.php @@ -210,17 +210,17 @@ class Monthlypay_model extends Model $count = $res[0]['count']; } - + if ($count == 0) { $builder = $this->db->table('t_monthly_pay_inputs'); $builder->insert($data); $i = $this->db->affectedRows(); return $i; } elseif ($count == 1) { - $this->db->table('t_monthly_pay_inputs') // ->where('H_date', $data['H_Date']) // ask velmurugan H_Date public hoilday table la irukku ->where('EmpID', $data['EmpID']) // temp solution + ->where('Month_Year', $data['Month_Year']) ->update($data); $i = $this->db->affectedRows();