mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 05:21:57 +00:00
Merge branch 'fix/BE/fifo-recording-and-closing-perhitungan-sapronak' into 'development'
[FEAT/BE] add product flags in stock See merge request mbugroup/lti-api!328
This commit is contained in:
@@ -861,6 +861,7 @@ func (r *RecordingRepositoryImpl) ValidateFeedProductWarehouses(ctx context.Cont
|
||||
return 0, nil
|
||||
}
|
||||
var invalidIDs []uint
|
||||
feedFlags := []string{"PAKAN", "OVK"}
|
||||
if err := r.DB().WithContext(ctx).
|
||||
Table("product_warehouses pw").
|
||||
Where("pw.id IN ?", ids).
|
||||
@@ -868,8 +869,8 @@ func (r *RecordingRepositoryImpl) ValidateFeedProductWarehouses(ctx context.Cont
|
||||
SELECT 1 FROM flags f
|
||||
WHERE f.flagable_type = 'products'
|
||||
AND f.flagable_id = pw.product_id
|
||||
AND UPPER(f.name) = 'PAKAN'
|
||||
)`).
|
||||
AND UPPER(f.name) IN ?
|
||||
)`, feedFlags).
|
||||
Pluck("pw.id", &invalidIDs).Error; err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user