Olá
Eu mudaria isso:
CASE WHEN ISNULL(SUM(T0.TOTALSINIVA),0) = 0 THEN 0 ELSE
Atenciosamente
Agustín
Avalados por :
Como você está? Você poderia me ajudar com esta consulta? Mesmo que eu tenha modificado, não consigo remover esse erro:
SELECT
T0.NOMES,
T0.SERIESNAME AS 'SUCURSAL',
T0.SLPCODE,
T0.SLPNAME,
T0.CardCode,
T0.CardName,
T1.U_IMPORTE 'OBJETIVO MES',
T1.U_OBJETIVOMU 'OBJETIVO MU',
SUM(ISNULL(T0.TOTALSINIVA,0)) AS 'VENTA NETA', SUM(ISNULL(T0.UTILIDAD,0)) AS 'MU',
CASE WHEN SUM(T0.TOTALSINIVA)=0 THEN 0 ELSE
(SUM(ISNULL(T0.UTILIDAD,0))/SUM(ISNULL(T0.TOTALSINIVA,0)))*100 END AS 'PORCENTAJE MU',
(SELECT ISNULL(SUM(T5.DOCTOTAL),0) AS 'VENCE' FROM OINV T5
WHERE T5.CardName=T0.CARDNAME AND MONTH(T5.DocDueDate)=T0.NOMES AND T5.SlpCode=T0.SLPCODE) AS 'SI VENCE',
(SELECT ISNULL(SUM(T5.DocTotal)-(SUM(T5.DOCTOTAL)-SUM(PaidToDate)) ,0) AS 'RECUPERADO' FROM OINV T5
WHERE T5.CardName=T0.CARDNAME AND MONTH(T5.DocDueDate)=T0.NOMES AND T5.SlpCode=T0.SLPCODE
Olá
Eu mudaria isso:
CASE WHEN ISNULL(SUM(T0.TOTALSINIVA),0) = 0 THEN 0 ELSE
Atenciosamente
Agustín
contacto@primeinstitute.com
(+51) 1641 9379
(+57) 1489 6964
© 2024 Copyright. Todos los derechos reservados.
Desarrollado por Prime Institute