Результаты экспорта совпадают с результатом запроса
Код:
SQL> SELECT SUM(totalsumnotax),SUM(totalvat),10 FROM Supermag.FFSpec WHERE docdate='05.01.2009' AND (ndoc IN (SELECT ndoc FROM Supermag.FFDocuments WHERE locationfrom=6)) AND DocType = 'CS' AND vatrate=10
UNION
SELECT SUM(totalsumnotax),SUM(totalvat),18 FROM Supermag.FFSpec WHERE docdate='05.01.2009' AND (ndoc IN (SELECT ndoc FROM Supermag.FFDocuments WHERE locationfrom=6)) AND DocType = 'CS' AND vatrate=18
UNION
SELECT SUM(totalsumnotax),SUM(totalvat),0 FROM Supermag.FFSpec WHERE docdate='05.01.2009' AND (ndoc IN (SELECT ndoc FROM Supermag.FFDocuments WHERE locationfrom=6)) AND DocType = 'CS' AND vatrate=0;
SUM(TOTALSUMNOTAX) SUM(TOTALVAT) 10
------------------ ------------- ----------
369,16 0 0
29181,95 2918,08 10
35452,11 6381,45 18
А ниже результаты отчета "Товарный отчет и налоги"