@@ -111,7 +111,7 @@ class LeFilamentTdb(models.Model):
...
@@ -111,7 +111,7 @@ class LeFilamentTdb(models.Model):
SELECT
SELECT
(select count(*) from account_invoice) as id,
(select count(*) from account_invoice) as id,
(select sum(amount_untaxed) from account_invoice where state!='draft' and type='out_invoice' and date >= date_trunc('year', current_date) ) as facture,
(select sum(amount_untaxed) from account_invoice where state!='draft' and type='out_invoice' and date >= date_trunc('year', current_date) ) as facture,
(select sum(residual_company_signed) from account_invoice where state!='draft' and type='out_invoice'and date >= date_trunc('year', current_date) ) as a_encaisser,
(select sum(residual_company_signed) from account_invoice where state!='draft' and type='out_invoice' ) as a_encaisser,
(select sum(planned_revenue*probability/100) from crm_lead where active=True) as pipe,
(select sum(planned_revenue*probability/100) from crm_lead where active=True) as pipe,
(select sum(amount) from account_bank_statement_line ) as tresorerie,
(select sum(amount) from account_bank_statement_line ) as tresorerie,
(select sum(amount) from account_bank_statement_line where amount > 0 and date >= date_trunc('year', current_date) ) as entree,
(select sum(amount) from account_bank_statement_line where amount > 0 and date >= date_trunc('year', current_date) ) as entree,