other income
This commit is contained in:
parent
8184ba2f16
commit
b0019d8837
|
@ -36,7 +36,7 @@ type CreateSalaryReq struct {
|
||||||
|
|
||||||
type UpdateSalaryReq struct {
|
type UpdateSalaryReq struct {
|
||||||
Id string `json:"month"`
|
Id string `json:"month"`
|
||||||
OtherSalary string `json:"other_salary"`
|
OtherIncome string `json:"other_income"`
|
||||||
OtherDeduct string `json:"other_deduct"`
|
OtherDeduct string `json:"other_deduct"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,8 +69,8 @@ func (s *StaffSalary) Update(sess *session.AdminSession, req *api.UpdateSalaryRe
|
||||||
salary, err := dao.NewStaffSalaryDao().Get(cast.ToInt64(req.Id))
|
salary, err := dao.NewStaffSalaryDao().Get(cast.ToInt64(req.Id))
|
||||||
session.CheckDBError(err)
|
session.CheckDBError(err)
|
||||||
session.CheckNilError(salary, "工资单不存在")
|
session.CheckNilError(salary, "工资单不存在")
|
||||||
if req.OtherSalary != "" {
|
if req.OtherIncome != "" {
|
||||||
salary.OtherSalary = cast.ToFloat64(req.OtherSalary)
|
salary.OtherSalary = cast.ToFloat64(req.OtherIncome)
|
||||||
}
|
}
|
||||||
if req.OtherDeduct != "" {
|
if req.OtherDeduct != "" {
|
||||||
salary.OtherDeduct = cast.ToFloat64(req.OtherDeduct)
|
salary.OtherDeduct = cast.ToFloat64(req.OtherDeduct)
|
||||||
|
|
Loading…
Reference in New Issue