Buenas noches estimado yo utilizo la siguiente formula para obtener el subtotal de algunos formularios :
case a.DocCur when 'USD' then
(a.DocTotalFC - a.VatSumFC) when 'SOL' then (a.DocTotal - a.VatSum)
when 'EUR' then
(a.DocTotalFC - a.VatSumFC)
else null end,
Saludos.