From fbeccf4cdc3899f83fe8ae9da3096846d4cd37b7 Mon Sep 17 00:00:00 2001 From: giovanni Date: Sat, 17 Jan 2026 11:01:08 +0700 Subject: [PATCH] fix query outgoing sapronak --- .../modules/closings/repositories/closing.repository.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/modules/closings/repositories/closing.repository.go b/internal/modules/closings/repositories/closing.repository.go index 582a1207..507d7c88 100644 --- a/internal/modules/closings/repositories/closing.repository.go +++ b/internal/modules/closings/repositories/closing.repository.go @@ -534,6 +534,13 @@ JOIN products prod ON prod.id = pw.product_id JOIN uoms u ON u.id = prod.uom_id JOIN warehouses w ON w.id = pw.warehouse_id WHERE pw.project_flock_kandang_id IN ? + AND EXISTS ( + SELECT 1 + FROM flags f + WHERE f.flagable_id = pw.product_id + AND f.flagable_type = 'products' + AND UPPER(f.name) NOT IN ('DOC', 'LAYER', 'PULLET') + ) ` )