mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-06-09 15:07:49 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f64839dfe1 |
@@ -2127,7 +2127,7 @@ func (s chickinService) UpdateChickInDate(ctx *fiber.Ctx, req *validation.Update
|
||||
return fiber.NewError(fiber.StatusNotFound, "Project flock kandang tidak ditemukan")
|
||||
}
|
||||
|
||||
return s.Repository.DB().WithContext(ctx.Context()).Transaction(func(tx *gorm.DB) error {
|
||||
if err := s.Repository.DB().WithContext(ctx.Context()).Transaction(func(tx *gorm.DB) error {
|
||||
if err := s.Repository.UpdateChickInDateByProjectFlockKandangID(ctx.Context(), tx, req.ProjectFlockKandangId, newDate); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -2139,5 +2139,10 @@ func (s chickinService) UpdateChickInDate(ctx *fiber.Ctx, req *validation.Update
|
||||
WHERE project_flock_kandangs_id = ?
|
||||
AND deleted_at IS NULL
|
||||
`, req.ChickInDate, req.ProjectFlockKandangId).Error
|
||||
})
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s.invalidateDepreciationSnapshots(ctx.Context(), nil, []uint{req.ProjectFlockKandangId}, newDate)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user