date CustomerID DocType debcre ammount 01.01.2005 0001 Invoice + 100.00 01.02.2005 0001 Payment - 20.00 01.03.2005 0001 Invoice + 50.00 01.01.2006 0001 Payment - 30.00 01.02.2006 0001 Invoice + 100.00 .... 0002 .... 0003..... .....all Customers Movements Result: Customer 0001 date deb cre Last Years 150 20 01.01.2006 Payment 30 01.02.2006 Invoice 100 Customer 0002.... These result can by filtered between dates and customersJoão Batista