From 633bf3034f5678e67e554b9fb89142c198e84d9a Mon Sep 17 00:00:00 2001 From: BENKE Charlene Date: Thu, 5 Jul 2018 11:52:58 +0200 Subject: [PATCH 1/6] new add total price on dashboard --- htdocs/core/class/workboardresponse.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; + +} From c169ff4b973722dc992e1ca74e4a61063a919965 Mon Sep 17 00:00:00 2001 From: BENKE Charlene Date: Thu, 5 Jul 2018 12:01:48 +0200 Subject: [PATCH 2/6] Update facture.class.php --- htdocs/compta/facture/class/facture.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index c6e43206c78..e7ea8877d97 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3712,7 +3712,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) { @@ -3745,6 +3745,7 @@ class Facture extends CommonInvoice $generic_facture->statut = $obj->fk_statut; $response->nbtodo++; + $response->total += $obj->total; if ($generic_facture->hasDelay()) { $response->nbtodolate++; From 9539adfffbedb4281f0a52d6a69c58e19aa3fb6c Mon Sep 17 00:00:00 2001 From: BENKE Charlene Date: Thu, 5 Jul 2018 12:02:38 +0200 Subject: [PATCH 3/6] Update index.php --- htdocs/index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/index.php b/htdocs/index.php index 2843289c557..6125823b4d3 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -565,6 +565,9 @@ if (! empty($valid_dashboardlines)) $sep=($conf->dol_use_jmobile?'
':' '); $boxwork .= ''.$board->img.' '.$board->label.'
'; $boxwork .= ''.$board->nbtodo.''; + if ($board->total > 0) { + $boxwork .= ' / '.price($board->total) .''; + } $boxwork .= ''; if ($board->nbtodolate > 0) { From 5a6cfd5efe7448cb4f0cf27738c964255893a5ff Mon Sep 17 00:00:00 2001 From: BENKE Charlene Date: Thu, 5 Jul 2018 12:08:59 +0200 Subject: [PATCH 4/6] Update commande.class.php --- htdocs/commande/class/commande.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 17e4387c4de..4ab9beaaf9e 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3237,7 +3237,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) { @@ -3264,6 +3264,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); From bfe7cd0d9f3a8af843d7b59f233e8bf57a6a23b4 Mon Sep 17 00:00:00 2001 From: BENKE Charlene Date: Thu, 5 Jul 2018 12:11:20 +0200 Subject: [PATCH 5/6] Update propal.class.php --- htdocs/comm/propal/class/propal.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 562032de9fa..99c5d1e747e 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3137,7 +3137,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) { @@ -3181,6 +3181,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); From edb210d7ccd071ecb269757492db5f4d021c8b95 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 21 Aug 2018 13:33:07 +0200 Subject: [PATCH 6/6] Update index.php --- htdocs/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/index.php b/htdocs/index.php index 6125823b4d3..b4aa821ccd0 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -565,7 +565,8 @@ if (! empty($valid_dashboardlines)) $sep=($conf->dol_use_jmobile?'
':' '); $boxwork .= ''.$board->img.' '.$board->label.'
'; $boxwork .= ''.$board->nbtodo.''; - if ($board->total > 0) { + if ($board->total > 0 && ! empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) + { $boxwork .= ' / '.price($board->total) .''; } $boxwork .= '';