user()->employee_id; return $data; } public function assignUpdatedBy(array $data) { $data['data']['updated_by'] = auth()->user()->employee_id; return $data; } public function getEmpPayInDedByEmpPayIdSchedIdIsIncome($empPayId, $paySchedId, $isIncome) { $builder = $this->db->table('emp_pay_inded'); $builder->select('*'); $builder->join('pay_income_deduction', 'pay_income_deduction.inded_id = emp_pay_inded.inded_id'); $builder->where([ 'emp_pay_inded.emppay_id' => $empPayId, 'pay_income_deduction.is_income' => $isIncome, 'emp_pay_inded.payschedule_id' => $paySchedId ]); return $builder->get()->getResult(); } public function getEmpPayInDedByEmpPayIdSchedId($empPayId, $paySchedId) { $builder = $this->db->table('emp_pay_inded'); $builder->select('*'); $builder->join('pay_income_deduction', 'pay_income_deduction.inded_id = emp_pay_inded.inded_id'); $builder->where([ 'emp_pay_inded.emppay_id' => $empPayId, 'emp_pay_inded.payschedule_id' => $paySchedId ]); return $builder->get()->getResult(); } }