diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index c326b115c17..848ac60d822 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3144,7 +3144,7 @@ class Propal extends CommonObject $clause = " WHERE"; - $sql = "SELECT p.rowid, p.ref, p.datec as datec, p.fin_validite as datefin"; + $sql = "SELECT p.rowid, p.ref, p.datec as datec, p.fin_validite as datefin, p.total_ht"; $sql.= " FROM ".MAIN_DB_PREFIX."propal as p"; if (!$user->rights->societe->client->voir && !$user->societe_id) { @@ -3188,6 +3188,8 @@ class Propal extends CommonObject while ($obj=$this->db->fetch_object($resql)) { $response->nbtodo++; + $response->total+=$obj->total_ht; + if ($mode == 'opened') { $datelimit = $this->db->jdate($obj->datefin); diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 941c061eea1..8ee90b6d583 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3243,7 +3243,7 @@ class Commande extends CommonOrder $clause = " WHERE"; - $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.date_livraison as delivery_date, c.fk_statut"; + $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.date_livraison as delivery_date, c.fk_statut, c.total_ht"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; if (!$user->rights->societe->client->voir && !$user->societe_id) { @@ -3270,6 +3270,7 @@ class Commande extends CommonOrder while ($obj=$this->db->fetch_object($resql)) { $response->nbtodo++; + $response->total+= $obj->total_ht; $generic_commande->statut = $obj->fk_statut; $generic_commande->date_commande = $this->db->jdate($obj->date_commande); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index b09c0435bcd..af3597de447 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3726,7 +3726,7 @@ class Facture extends CommonInvoice $clause = " WHERE"; - $sql = "SELECT f.rowid, f.date_lim_reglement as datefin,f.fk_statut"; + $sql = "SELECT f.rowid, f.date_lim_reglement as datefin,f.fk_statut, f.total"; $sql.= " FROM ".MAIN_DB_PREFIX."facture as f"; if (!$user->rights->societe->client->voir && !$user->societe_id) { @@ -3759,6 +3759,7 @@ class Facture extends CommonInvoice $generic_facture->statut = $obj->fk_statut; $response->nbtodo++; + $response->total += $obj->total; if ($generic_facture->hasDelay()) { $response->nbtodolate++; diff --git a/htdocs/core/class/workboardresponse.class.php b/htdocs/core/class/workboardresponse.class.php index 13de74281ff..62d84e11186 100644 --- a/htdocs/core/class/workboardresponse.class.php +++ b/htdocs/core/class/workboardresponse.class.php @@ -1,6 +1,7 @@ + * Copyright (C) 2018 Charlene Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -66,4 +67,10 @@ class WorkboardResponse */ public $nbtodolate = 0; -} \ No newline at end of file + /** + * total price of items + * @var int + */ + public $total = 0; + +} diff --git a/htdocs/index.php b/htdocs/index.php index 902ea6882a6..df1c18176e7 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -565,6 +565,10 @@ if (! empty($valid_dashboardlines)) $sep=($conf->dol_use_jmobile?'
':' '); $boxwork .= ''.$board->img.' '.$board->label.'
'; $boxwork .= ''.$board->nbtodo.''; + if ($board->total > 0 && ! empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) + { + $boxwork .= ' / '.price($board->total) .''; + } $boxwork .= ''; if ($board->nbtodolate > 0) {