Merge branch 'codex/sales-at-farm-level' into 'development'

codex/fix: store stocks on farm warehouse when recording egg

See merge request mbugroup/lti-api!392
This commit is contained in:
Adnan Zahir
2026-04-04 11:22:31 +07:00
3 changed files with 403 additions and 4 deletions
@@ -347,7 +347,10 @@ func (r *projectFlockKandangRepositoryImpl) GetByID(ctx context.Context, id uint
func (r *projectFlockKandangRepositoryImpl) GetByIDLight(ctx context.Context, id uint) (*entity.ProjectFlockKandang, error) {
record := new(entity.ProjectFlockKandang)
if err := r.db.WithContext(ctx).
Preload("Kandang").
Preload("Kandang.Location").
Preload("ProjectFlock").
Preload("ProjectFlock.Location").
First(record, id).Error; err != nil {
return nil, err
}