Topic: Customer invoices database example and calculated field

The main screen of the sample shows date, name and executor.

Lets say we want to show the total (sum of the services for that invoice)

When I try to add bills.total (calculated field) to the Action [SEARCH], the clients are displayed as many times as services billed.

patrick  30
patrick  99
leonardo 198
leonardo 796

is there any choice to show the sum of the services (same value as bills.total) and not the separate services?

like:

29/01/2014  Patrick Smith  Will Smith  $129
and the same with leonardo, with sum $994

thanks in advance.

Re: Customer invoices database example and calculated field

uhm.. I will use a query:

SELECT
clients.firstname,
clients.lastname,
sum(services.cost*bills.countserv) as total
FROM
clients
INNER JOIN bills ON clients.id = bills.id_clients
INNER JOIN services ON bills.id_services = services.id
GROUP BY
clients.id

still learning how to use MVD... :-)

Re: Customer invoices database example and calculated field

Hello,


issue resolved?

Dmitry.

Re: Customer invoices database example and calculated field

Yes. Works fine smile