feat(BE): enhance chickin and transfer laying services with product warehouse validation and stockable support

This commit is contained in:
aguhh18
2026-01-07 14:02:39 +07:00
parent 9336289573
commit 375e057e7c
3 changed files with 68 additions and 28 deletions
@@ -52,13 +52,14 @@ func (ChickinModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *
PendingQuantity: "pending_usage_qty",
CreatedAt: "created_at",
},
ExcludedStockables: []fifo.StockableKey{fifo.StockableKeyProjectFlockPopulation},
}); err != nil {
if !strings.Contains(strings.ToLower(err.Error()), "already registered") {
panic(fmt.Sprintf("failed to register chickin usable workflow: %v", err))
}
}
if err := fifoService.RegisterStockable(fifo.StockableConfig{
Key: fifo.StockableKeyProjectFlockPopulation,
Table: "project_flock_populations",