Skip to content

Commit

Permalink
Merge branch 'release/v1.8.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
namnhce committed Oct 15, 2024
2 parents b3f3bd5 + febb387 commit 8849540
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/handler/payroll/payroll_calculator.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ func (h *handler) calculatePayrolls(users []*model.Employee, batchDate time.Time
}
users = append(users, quang)
}
if batch == 15 {
inno, err := h.store.Employee.OneByEmail(h.repo.DB(), "[email protected]")
if err != nil {
h.logger.Error(err, "Can't insert inno into 15th payroll batch")
return nil, err
}
users = append(users, inno)
}
dueDate := batchDate.AddDate(0, 1, 0)
var expenses []bcModel.Todo
woodlandID := consts.PlaygroundID
Expand Down Expand Up @@ -116,7 +124,7 @@ func (h *handler) calculatePayrolls(users []*model.Employee, batchDate time.Time
var total model.VietnamDong
var baseSalary, contract int64
if users[i].BaseSalary.Batch != batchDate.Day() {
if users[i].TeamEmail != "[email protected]" {
if users[i].TeamEmail != "[email protected]" && users[i].TeamEmail != "[email protected]" {
continue
} else {
users[i].BaseSalary.PersonalAccountAmount = 0
Expand Down

0 comments on commit 8849540

Please sign in to comment.