feat/BE/US-33/TASK-292,293,Adjust Project Flock status (add status Selesai), Validate with restriction when expense not finish and stock is not used

This commit is contained in:
ragilap
2025-12-05 17:47:03 +07:00
parent c593df661c
commit 6572176cca
8 changed files with 229 additions and 17 deletions
@@ -258,7 +258,10 @@ func (r *ProductWarehouseRepositoryImpl) GetByFlagAndWarehouseID(ctx context.Con
Joins("JOIN flags ON flags.flagable_id = products.id AND flags.flagable_type = 'products'").
Where("flags.name = ? AND product_warehouses.warehouse_id = ?", flagName, warehouseId).
Order("product_warehouses.id DESC").
Preload("Product").Preload("Warehouse").
Preload("Product").
Preload("Product.ProductCategory").
Preload("Product.Uom").
Preload("Warehouse").
Find(&productWarehouses).Error
if err != nil {
return nil, err