Modif calcul prix de la propale

This commit is contained in:
Rodolphe Quiedeville 2003-09-05 19:46:54 +00:00
parent 4f10641bc6
commit f06fee38b7
2 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,7 @@ require("./lib.inc.php");
function propals ($db, $year, $month) {
global $bc;
$sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price - p.remise as price, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid";
$sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid";
$sql .= " FROM llx_societe as s, llx_propal as p, c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id";
$sql .= " AND c.id in (1,2,4)";
$sql .= " AND date_format(p.datep, '%Y') = $year ";
@ -243,7 +243,7 @@ function ppt ($db, $year, $socidp)
print "<tr><td valign=\"top\" width=\"30%\">";
$sql = "SELECT sum(f.price - f.remise) as sum, round(date_format(f.datep,'%m')) as dm";
$sql = "SELECT sum(f.price) as sum, round(date_format(f.datep,'%m')) as dm";
$sql .= " FROM llx_propal as f WHERE fk_statut in (1,2,4) AND date_format(f.datep,'%Y') = $year ";
if ($socidp)

View File

@ -94,7 +94,7 @@ print '<table width="100%">';
print '<tr><td valign="top">';
$sql = "SELECT sum(f.price - f.remise) as amount, date_format(f.datep,'%Y-%m') as dm";
$sql = "SELECT sum(f.price) as amount, date_format(f.datep,'%Y-%m') as dm";
$sql .= " FROM llx_propal as f WHERE fk_statut in $in";
if ($socidp)
{
@ -106,7 +106,7 @@ pt($db, $sql, "Mois");
print '</td><td valign="top">';
$sql = "SELECT sum(f.price - f.remise) as amount, year(f.datep) as dm";
$sql = "SELECT sum(f.price) as amount, year(f.datep) as dm";
$sql .= " FROM llx_propal as f WHERE fk_statut in $in";
if ($socidp)
{
@ -118,7 +118,7 @@ pt($db, $sql, "Ann
print "<P>";
$sql = "SELECT sum(f.price - f.remise) as amount, month(f.datep) as dm";
$sql = "SELECT sum(f.price) as amount, month(f.datep) as dm";
$sql .= " FROM llx_propal as f WHERE fk_statut in $in";
if ($socidp)
{