mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-25 15:55:44 +00:00
implement fifo-v2 to transfer stock pakan
This commit is contained in:
@@ -199,18 +199,18 @@ func (s *fifoStockV2Service) buildGatherSubquery(rule routeRule, trait traitRule
|
||||
}
|
||||
|
||||
if rule.ScopeSQL != nil && strings.TrimSpace(*rule.ScopeSQL) != "" {
|
||||
whereParts = append(whereParts, fmt.Sprintf("(%s)", strings.TrimSpace(*rule.ScopeSQL)))
|
||||
whereParts = append(whereParts, fmt.Sprintf("(%s)", normalizeScopeSQL(*rule.ScopeSQL)))
|
||||
}
|
||||
|
||||
subquery := fmt.Sprintf(`
|
||||
SELECT
|
||||
? AS source_table,
|
||||
? AS legacy_type_key,
|
||||
? AS function_code,
|
||||
?::text AS source_table,
|
||||
?::text AS legacy_type_key,
|
||||
?::text AS function_code,
|
||||
src.%s AS source_id,
|
||||
src.%s AS product_warehouse_id,
|
||||
%s AS sort_at,
|
||||
? AS sort_priority,
|
||||
?::int AS sort_priority,
|
||||
%s AS quantity,
|
||||
%s AS used_quantity,
|
||||
%s AS pending_quantity,
|
||||
|
||||
Reference in New Issue
Block a user