mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
feat(BE): update foreign key constraints for project_chickins and adjust service logic for project flock kandang retrieval
This commit is contained in:
@@ -118,10 +118,9 @@ func (s *adjustmentService) Adjustment(c *fiber.Ctx, req *validation.Create) (*e
|
||||
var createdLogId uint
|
||||
|
||||
var projectFlockKandangID *uint
|
||||
pfk, err := s.ProjectFlockKandangRepo.GetActiveByKandangID(ctx, uint(req.WarehouseID))
|
||||
if err == nil && pfk != nil {
|
||||
idCopy := uint(pfk.Id)
|
||||
projectFlockKandangID = &idCopy
|
||||
pfkID, err := s.getActiveProjectFlockKandangID(ctx, uint(req.WarehouseID))
|
||||
if err == nil && pfkID > 0 {
|
||||
projectFlockKandangID = &pfkID
|
||||
}
|
||||
|
||||
pw, err := s.ProductWarehouseRepo.FindByProductWarehouseAndPfk(
|
||||
|
||||
Reference in New Issue
Block a user