Add comment column

This commit is contained in:
Laurent Destailleur 2008-09-02 12:19:00 +00:00
parent e854036459
commit bae3a3590d
2 changed files with 37 additions and 16 deletions

View File

@ -513,7 +513,7 @@ class Livraison extends CommonObject
function addline( $id, $qty ) function addline( $id, $qty )
{ {
$num = sizeof($this->lignes); $num = sizeof($this->lignes);
$ligne = new livraisonLigne($this->db); $ligne = new LivraisonLigne($this->db);
$ligne->commande_ligne_id = $id; $ligne->commande_ligne_id = $id;
$ligne->qty = $qty; $ligne->qty = $qty;
@ -716,7 +716,7 @@ class Livraison extends CommonObject
{ {
global $user,$langs; global $user,$langs;
// Charge tableau des id de soci<EFBFBD>t<EFBFBD> socids // Charge tableau des id de societe socids
$socids = array(); $socids = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client=1 LIMIT 10"; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client=1 LIMIT 10";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
@ -757,6 +757,18 @@ class Livraison extends CommonObject
$this->socid = $socids[$socid]; $this->socid = $socids[$socid];
$this->date_livraison = time(); $this->date_livraison = time();
$this->note_public='SPECIMEN'; $this->note_public='SPECIMEN';
$i=0;
$ligne=new LivraisonLigne($this->db);
$ligne->fk_product = $prodids[0];
$ligne->qty_asked = 10;
$ligne->qty_shipped = 9;
$ligne->ref = 'REFPROD';
$ligne->label = 'Specimen';
$ligne->description = 'Description';
$ligne->price = 100;
$ligne->total_ht = 100;
$this->lignes[$i] = $ligne;
} }
} }

View File

@ -1,8 +1,9 @@
<?php <?php
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* * Copyright (C) 2008 Chiptronik
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
@ -20,11 +21,11 @@
*/ */
/** /**
\file htdocs/livraison/mods/pdf/pdf_typhon.modules.php * \file htdocs/livraison/mods/pdf/pdf_typhon.modules.php
\ingroup livraison * \ingroup livraison
\brief Fichier de la classe permettant de g<EFBFBD>n<EFBFBD>rer les bons de livraison au mod<EFBFBD>le Typho * \brief Fichier de la classe permettant de g<EFBFBD>n<EFBFBD>rer les bons de livraison au mod<EFBFBD>le Typho
\author Laurent Destailleur * \author Laurent Destailleur
\version $Id$ * \version $Id$
*/ */
require_once(DOL_DOCUMENT_ROOT."/livraison/mods/modules_livraison.php"); require_once(DOL_DOCUMENT_ROOT."/livraison/mods/modules_livraison.php");
@ -33,8 +34,8 @@ require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
/** /**
\class pdf_typhon * \class pdf_typhon
\brief Classe permettant de g<EFBFBD>n<EFBFBD>rer les bons de livraison au mod<EFBFBD>le Typho * \brief Classe permettant de g<EFBFBD>n<EFBFBD>rer les bons de livraison au mod<EFBFBD>le Typho
*/ */
class pdf_typhon extends ModelePDFDeliveryOrder class pdf_typhon extends ModelePDFDeliveryOrder
@ -81,9 +82,10 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// Defini position des colonnes // Defini position des colonnes
$this->posxdesc=$this->marge_gauche+1; $this->posxdesc=$this->marge_gauche+1;
$this->posxcomm=120;
$this->posxtva=121; $this->posxtva=121;
$this->posxup=132; $this->posxup=132;
$this->posxqty=151; $this->posxqty=168;
$this->posxdiscount=162; $this->posxdiscount=162;
$this->postotalht=177; $this->postotalht=177;
@ -256,7 +258,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
*/ */
// Quantity // Quantity
$pdf->SetXY ($this->posxqty, $curY); $pdf->SetXY ($this->posxqty, $curY);
$pdf->MultiCell(40, 4, $delivery->lignes[$i]->qty_shipped, 0, 'R'); $pdf->MultiCell(30, 4, $delivery->lignes[$i]->qty_shipped, 0, 'R');
/* /*
// Remise sur ligne // Remise sur ligne
$pdf->SetXY ($this->posxdiscount, $curY); $pdf->SetXY ($this->posxdiscount, $curY);
@ -355,10 +357,17 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetFont('Arial','',10); $pdf->SetFont('Arial','',10);
$pdf->SetXY ($this->posxdesc-1, $tab_top+2); $pdf->SetXY ($this->posxdesc-1, $tab_top+2);
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L'); $pdf->MultiCell(80,2, $outputlangs->transnoentities("Designation"),'','L');
// Modif SEB pour avoir une col en plus pour les commentaires clients
$pdf->line($this->posxcomm, $tab_top, $this->posxcomm, $tab_top + $tab_height);
$pdf->SetXY ($this->posxcomm, $tab_top+2);
$pdf->MultiCell(80,2, $outputlangs->transnoentities("Comments"),'','L');
// Qty
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height); $pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxqty-1, $tab_top+2); $pdf->SetXY ($this->posxqty-1, $tab_top+2);
$pdf->MultiCell(40, 2, $outputlangs->transnoentities("QtyShipped"),'','R'); $pdf->MultiCell(30, 2, $outputlangs->transnoentities("QtyShipped"),'','R');
// Modif Seb cadres signatures // Modif Seb cadres signatures
$pdf->SetFont('Arial','',10); $pdf->SetFont('Arial','',10);