Fix: champ price obsolete

This commit is contained in:
Regis Houssin 2007-10-12 16:01:48 +00:00
parent 7151adeb41
commit 31b50a8908
11 changed files with 13 additions and 15 deletions

View File

@ -133,7 +133,7 @@ if ($conf->contrat->enabled)
*/
if ($conf->propal->enabled && $user->rights->propale->lire)
{
$sql = "SELECT p.rowid, p.ref, p.price, s.rowid as socid, s.nom";
$sql = "SELECT p.rowid, p.ref, p.total_ht, s.rowid as socid, s.nom";
if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@ -163,7 +163,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
$var=!$var;
print '<tr '.$bc[$var].'><td nowrap>'."<a href=\"".DOL_URL_ROOT."/comm/propal.php?propalid=".$obj->rowid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref.'</a></td>';
print '<td><a href="fiche.php?socid='.$obj->socid.'">'.dolibarr_trunc($obj->nom,18).'</a></td>';
print '<td align="right" nowrap="nowrap">'.price($obj->price).'</td></tr>';
print '<td align="right" nowrap="nowrap">'.price($obj->total_ht).'</td></tr>';
$i++;
$total += $obj->price;
}

View File

@ -192,7 +192,7 @@ class pdf_edison extends ModelePDFCommandes
$pdf->MultiCell(18, 5, price($com->lignes[$i]->price), 0, 'R', 0);
$pdf->SetXY (174, $curY );
$total = price($com->lignes[$i]->price * $com->lignes[$i]->qty);
$total = price($com->lignes[$i]->total_ht);
$pdf->MultiCell(26, 5, $total, 0, 'R', 0);
$pdf->line(10, $curY, 200, $curY );

View File

@ -318,7 +318,7 @@ class pdf_einstein extends ModelePDFCommandes
// Total HT ligne
$pdf->SetXY ($this->postotalht, $curY);
$total = price($com->lignes[$i]->price * $com->lignes[$i]->qty);
$total = price($com->lignes[$i]->total_ht);
$pdf->MultiCell(23, 4, $total, 0, 'R', 0);
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva

View File

@ -327,7 +327,7 @@ class pdf_crabe extends ModelePDFFactures
// Total HT ligne
$pdf->SetXY ($this->postotalht, $curY);
$total = price($fac->lignes[$i]->price * $fac->lignes[$i]->qty);
$total = price($fac->lignes[$i]->total_ht);
$pdf->MultiCell(23, 4, $total, 0, 'R', 0);
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva

View File

@ -183,7 +183,7 @@ class pdf_huitre extends ModelePDFFactures
$pdf->MultiCell(18, 5, price($fac->lignes[$i]->price), 0, 'R', 0);
$pdf->SetXY (174, $curY);
$total = price($fac->lignes[$i]->price * $fac->lignes[$i]->qty);
$total = price($fac->lignes[$i]->total_ht);
$pdf->MultiCell(26, 5, $total, 0, 'R', 0);
if ($nexY > 200 && $i < $nblignes - 1)

View File

@ -236,7 +236,7 @@ class pdf_oursin extends ModelePDFFactures
// Total HT
$pdf->SetXY ($this->marges['g']+168, $curY);
$total = price($fac->lignes[$i]->price * $fac->lignes[$i]->qty);
$total = price($fac->lignes[$i]->total_ht);
$pdf->MultiCell(21, 5, $total, 0, 'R', 0);

View File

@ -315,7 +315,7 @@ class pdf_propale_azur extends ModelePDFPropales
// Total HT ligne
$pdf->SetXY ($this->postotalht, $curY);
$total = price($propale->lignes[$i]->price * $propale->lignes[$i]->qty);
$total = price($propale->lignes[$i]->total_ht);
$pdf->MultiCell(23, 4, $total, 0, 'R', 0);
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
@ -899,8 +899,7 @@ class pdf_propale_azur extends ModelePDFPropales
$arrayidcontact=$object->getIdContact('external','CUSTOMER');
if (sizeof($arrayidcontact) > 0)
{
print_r($arrayidcontact);
$usecontact=true;
$usecontact=true;
$result=$object->fetch_contact($arrayidcontact[0]);
}
}

View File

@ -184,7 +184,7 @@ class pdf_propale_bleu extends ModelePDFPropales
$pdf->MultiCell(18, 5, price($propale->lignes[$i]->price), 0, 'R', 0);
$pdf->SetXY (174, $curY );
$total = price($propale->lignes[$i]->price * $propale->lignes[$i]->qty);
$total = price($propale->lignes[$i]->total_ht);
$pdf->MultiCell(26, 5, $total, 0, 'R', 0);
$pdf->line(10, $curY, 200, $curY );

View File

@ -164,7 +164,6 @@ class pdf_propale_jaune extends ModelePDFPropales
for ($i = 0 ; $i < $nblignes ; $i++)
{
$curY = $nexY;
$total = price($propale->lignes[$i]->price * $propale->lignes[$i]->qty);
$pdf->SetXY (30, $curY );
$pdf->MultiCell(102, 5, $propale->lignes[$i]->desc, 0, 'J', 0);
@ -184,7 +183,7 @@ class pdf_propale_jaune extends ModelePDFPropales
$pdf->MultiCell(22, 5, price($propale->lignes[$i]->price), 0, 'R', 0);
$pdf->SetXY (176, $curY );
$pdf->MultiCell(24, 5, $total, 0, 'R', 0);
$pdf->MultiCell(24, 5, price($propale->lignes[$i]->total_ht), 0, 'R', 0);
$pdf->line(10, $curY, 200, $curY );

View File

@ -182,7 +182,7 @@ class pdf_propale_rouge extends ModelePDFPropales
$pdf->MultiCell(18, 5, price($propale->lignes[$i]->price), 0, 'R', 0);
$pdf->SetXY (174, $curY );
$total = price($propale->lignes[$i]->price * $propale->lignes[$i]->qty);
$total = price($propale->lignes[$i]->total_ht);
$pdf->MultiCell(26, 5, $total, 0, 'R', 0);
$pdf->line(10, $curY, 200, $curY );

View File

@ -190,7 +190,7 @@ class pdf_propale_vert extends ModelePDFPropales
$pdf->MultiCell(14, 5, $propale->lignes[$i]->remise_percent."%", 0, 'R', 0);
$pdf->SetXY (180, $curY );
$total = price($propale->lignes[$i]->price * $propale->lignes[$i]->qty);
$total = price($propale->lignes[$i]->total_ht);
$pdf->MultiCell(20, 5, $total, 0, 'R', 0);
$pdf->line(10, $curY, 200, $curY );