personal
This commit is contained in:
parent
fd04d1ebc3
commit
15f77196f6
|
@ -39,6 +39,7 @@ type UpdateSalaryReq struct {
|
|||
Id string `json:"id"`
|
||||
OtherIncome string `json:"other_income"`
|
||||
OtherDeduct string `json:"other_deduct"`
|
||||
PersonalDeduct string `json:"personal_deduct"`
|
||||
}
|
||||
|
||||
type ListSalaryReq struct {
|
||||
|
|
|
@ -106,6 +106,9 @@ func (s *StaffSalary) Update(sess *session.AdminSession, req *api.UpdateSalaryRe
|
|||
if req.OtherDeduct != "" {
|
||||
salary.OtherDeduct = cast.ToFloat64(req.OtherDeduct)
|
||||
}
|
||||
if req.PersonalDeduct != "" {
|
||||
salary.PersonalDeduct = cast.ToFloat64(req.PersonalDeduct)
|
||||
}
|
||||
err = dao.NewStaffSalaryDao().Update(salary)
|
||||
session.CheckDBError(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue