Por eso siempre es bueno identar el script.
Código SQL:
Ver originalSELECT B.Docdate, B.docduedate, B.taxdate,A.Cardcode, B.Cardname, B.docnum,
B.Acctcode, B.ocrCode, B.doctotal, C.Sumatoria
FROM (
SELECT t1.cardcode
FROM OCRD t0
INNER JOIN OINV T1 ON t0.Cardcode = T1.cardcode
WHERE t0.cardtype = 'C'
) A
LEFT JOIN (
SELECT t1.docdate 'Fecha de Contabilizacion', t1.docduedate 'Fecha de Vencimiento',
t1.taxdate 'Fecha de Documento', t1.Cardcode 'Codigo de Cliente',
t1.Cardname 'Nombre de Cliente', t1.docnum 'Numero de documento',
t2.AcctCode 'Cuenta de Mayor', t2.OcrCode 'Centro de beneficio', t1.doctotal 'Total deuda'
FROM OINV t1
INNER JOIN INV1 t2 ON t1.DocEntry = t2.Docentry
WHERE t1.DocStatus = 'O'
) B ON A.cardcode = B.cardcode
LEFT JOIN (
SELECT t1.cardcode, SUM(t1.doctotal) sumatoria
FROM OCRD t0
INNER JOIN OINV t1 ON t0.Cardcode = t1.cardcode
WHERE t0.cardtype = 'C' AND t1.DocStatus = 'O'
GROUP BY t1.cardcode
) C ON C.cardcode = A.cardcode
GROUP BY B.Docdate, B.docduedate, B.taxdate,A.cardcode, B.Cardname, B.docnum,
B.Acctcode, B.ocrCode, B.doctotal, C.Sumatoria
Solo no entiendo tu group by, donde esta el operador de agregacion, es decir, SUM, COUNT, etc.?