Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Incident Reports » Incident Reports Addressed for Version 2.33 » View Incident Report |
Serious |
Reported By: Fernando Dias Reported On: 9/10/2020 For: Version 2.32 Build 1 |
SELECT *, (SELECT Nome FROM Fornecedores WHERE CodFornecedor = tmpV.CodFornecedor) AS NomeFornecedor, (SELECT CAST(LIST(DISTINCT (CL.TipoDoc + '-' + CAST(NumReg AS VARCHAR)), ', ') AS VARCHAR(80)) FROM ComLin CL WHERE (CL.AnoVou, CL.SerieVou, CL.NumVou) = (tmpV.AnoDoc, tmpV.SerieDoc, tmpV.NumVoucher)) AS DocsFornecedor, (SELECT SUM(CL.Valor + COALESCE(CL.TotalTaxas,0)) FROM ComLin CL WHERE (CL.AnoVou, CL.SerieVou, CL.NumVou) = (tmpV.AnoDoc, tmpV.SerieDoc, tmpV.NumVoucher)) AS ValorDocsFornecedor FROM ( SELECT V.*, B.NumCliente, B.Nome AS NomeCliente, B.CriadoPor, CAST(LIST(DISTINCT (BL.SerieFac + '/' + CAST(BL.NumFac AS VARCHAR)), ', ') AS VARCHAR(80)) AS DocsCliente, SUM(BL.Qt*(BL.PCusto*((100+BL.PctIvaPCusto)/100) + BL.Taxas+BL.TaxaYP+BL.TaxaPT)) AS ValorDocsCliente FROM Vouchers V LEFT OUTER JOIN BolLin BL ON (BL.AnoDoc, BL.SerieDoc, BL.NumDoc, BL.NumVoucher) = (V.AnoDoc, V.SerieDoc, V.NumDoc, V.NumVoucher) LEFT OUTER JOIN BolCab B ON (B.AnoDoc, B.SerieDoc, B.NumDoc) = (V.AnoDoc, V.SerieDoc, V.NumDoc) GROUP BY V.AnoDoc, V.SerieDoc, V.NumVoucher ) AS tmpV ORDER BY AnoDoc, SerieDoc, NumVoucher
This web page was last updated on Wednesday, October 30, 2024 at 11:41 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |