diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index ab0f6875279..746fc434d33 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -415,7 +415,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire) { $langs->load("propal"); - $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total_ht, p.ref, p.fk_statut, ".$db->pdate("p.datep")." as dp"; + $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, ".$db->pdate("p.datep")." as dp"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -464,11 +464,11 @@ if ($conf->propal->enabled && $user->rights->propale->lire) print "rowid."\">".img_object($langs->trans("ShowCompany"),"company")." ".dolibarr_trunc($obj->nom,44)."\n"; print ""; print dolibarr_print_date($obj->dp,'day')."\n"; - print "".price($obj->total_ht).""; + print "".price($obj->total_ttc).""; print "".$propalstatic->LibStatut($obj->fk_statut,3)."\n"; print "\n"; $i++; - $total += $obj->total_ht; + $total += $obj->total_ttc; } if ($total>0) { print ''.$langs->trans("Total")."".price($total)." "; diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index a925f27cd35..183eb678ba0 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2006 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -166,7 +166,7 @@ if ($conf->agenda->enabled) show_array_actions_to_do(10); */ if ($conf->propal->enabled && $user->rights->propale->lire) { - $sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.price, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid"; + $sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.total as total_ttc, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -199,7 +199,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire) print "socid."\">".img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom."\n"; print ""; print dolibarr_print_date($obj->dp)."\n"; - print "".price($obj->price)."\n"; + print "".price($obj->total_ttc)."\n"; $i++; $total += $obj->price; } @@ -209,6 +209,10 @@ if ($conf->propal->enabled && $user->rights->propale->lire) print "
"; } } + else + { + dolibarr_print_error($db); + } } /*