Fix: Bad values for properties

This commit is contained in:
Laurent Destailleur 2008-06-14 10:53:12 +00:00
parent 8d27412bd0
commit 3e0cd4a9b4
5 changed files with 12 additions and 11 deletions

View File

@ -724,7 +724,8 @@ class Expedition extends CommonObject
$ligne->desc=$langs->trans("Description")." ".$xnbp; $ligne->desc=$langs->trans("Description")." ".$xnbp;
$ligne->libelle=$langs->trans("Description")." ".$xnbp; $ligne->libelle=$langs->trans("Description")." ".$xnbp;
$ligne->qty=10; $ligne->qty=10;
$ligne->qty_expedition=5; $ligne->qty_asked=5;
$ligne->qty_shipped=4;
$prodid = rand(1, $num_prods); $prodid = rand(1, $num_prods);
$ligne->fk_product=$prodids[$prodid]; $ligne->fk_product=$prodids[$prodid];
$xnbp++; $xnbp++;
@ -743,11 +744,11 @@ class ExpeditionLigne
// From llx_expeditiondet // From llx_expeditiondet
var $qty; var $qty;
var $qty_expedition; var $qty_shipped;
var $fk_product; var $fk_product;
// From llx_commandedet or llx_propaldet // From llx_commandedet or llx_propaldet
var $qty_asking; var $qty_asked;
var $libelle; // Label produit var $libelle; // Label produit
var $product_desc; // Description produit var $product_desc; // Description produit
var $ref; var $ref;

View File

@ -243,10 +243,10 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
$pdf->writeHTMLCell(150, 3, $this->posxdesc, $curY, $libelleproduitservice, 0, 1); $pdf->writeHTMLCell(150, 3, $this->posxdesc, $curY, $libelleproduitservice, 0, 1);
$pdf->SetXY (160, $curY); $pdf->SetXY (160, $curY);
$pdf->MultiCell(30, 3, $this->expe->lignes[$i]->qty_commande); $pdf->MultiCell(30, 3, $this->expe->lignes[$i]->qty_asked);
$pdf->SetXY (186, $curY); $pdf->SetXY (186, $curY);
$pdf->MultiCell(30, 3, $this->expe->lignes[$i]->qty_expedition); $pdf->MultiCell(30, 3, $this->expe->lignes[$i]->qty_shipped);
} }
$pdf->AliasNbPages(); $pdf->AliasNbPages();

View File

@ -34,7 +34,7 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='')
{ {
global $db, $conf, $langs, $bc; global $db, $conf, $langs, $bc;
$sql = "SELECT obj.rowid, obj.fk_product, obj.description, obj.qty as qty_asking"; $sql = "SELECT obj.rowid, obj.fk_product, obj.description, obj.qty as qty_asked";
$sql.= ", ed.qty as qty_shipped, ed.fk_expedition as expedition_id"; $sql.= ", ed.qty as qty_shipped, ed.fk_expedition as expedition_id";
$sql.= ", e.ref, ".$db->pdate("e.date_expedition")." as date_expedition"; $sql.= ", e.ref, ".$db->pdate("e.date_expedition")." as date_expedition";
if ($conf->livraison_bon->enabled) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref"; if ($conf->livraison_bon->enabled) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref";

View File

@ -500,7 +500,7 @@ else
} }
print '<td align="center">'.$livraison->lignes[$i]->qty_asked.'</td>'; print '<td align="center">'.$livraison->lignes[$i]->qty_asked.'</td>';
print '<td align="center">'.$livraison->lignes[$i]->qty_delivered.'</td>'; print '<td align="center">'.$livraison->lignes[$i]->qty_shipped.'</td>';
print "</tr>"; print "</tr>";

View File

@ -619,8 +619,8 @@ class Livraison extends CommonObject
$this->lignes = array(); $this->lignes = array();
$sql = "SELECT p.label, p.ref,"; $sql = "SELECT p.label, p.ref,";
$sql.= " l.description, l.fk_product, l.subprice, l.total_ht, l.qty as qtyliv"; $sql.= " l.description, l.fk_product, l.subprice, l.total_ht, l.qty as qty_shipped";
//$sql.= ", c.qty as qtycom"; //$sql.= ", c.qty as qty_asked";
$sql.= " FROM ".MAIN_DB_PREFIX."livraisondet as l"; $sql.= " FROM ".MAIN_DB_PREFIX."livraisondet as l";
//$sql .= " , ".MAIN_DB_PREFIX."commandedet as c"; //$sql .= " , ".MAIN_DB_PREFIX."commandedet as c";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on p.rowid = l.fk_product"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on p.rowid = l.fk_product";
@ -640,8 +640,8 @@ class Livraison extends CommonObject
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
$ligne->fk_product = $obj->fk_product; $ligne->fk_product = $obj->fk_product;
$ligne->qty_asked = $obj->qtycom; $ligne->qty_asked = $obj->qty_asked;
$ligne->qty_delivered = $obj->qtyliv; $ligne->qty_shipped = $obj->qty_shipped;
$ligne->ref = $obj->ref; $ligne->ref = $obj->ref;
$ligne->label = stripslashes(nl2br($obj->label)); $ligne->label = stripslashes(nl2br($obj->label));
$ligne->description = stripslashes(nl2br($obj->description)); $ligne->description = stripslashes(nl2br($obj->description));