Backend error fixed

This commit is contained in:
Torsten Schulz (local)
2025-12-20 15:06:43 +01:00
parent ac45a2ba26
commit fcbb903839

View File

@@ -212,7 +212,7 @@ async function calcRegionalSellPrice(product, knowledgeFactor, regionId, worthPe
JOIN falukant_type.region rt2 ON rt2.id = reg.region_type_id
JOIN ancestors a ON reg.id = a.parent_id
)
SELECT COALESCE(SUM(CASE WHEN ${exemptTypesString} && ARRAY[region_type] THEN 0 ELSE tax_percent END),0) AS total FROM ancestors;`,
SELECT COALESCE(SUM(CASE WHEN ${exemptTypesString} && ARRAY[region_type]::text[] THEN 0 ELSE tax_percent END),0) AS total FROM ancestors;`,
{
replacements: { id: regionId },
type: sequelize.QueryTypes.SELECT