2
0
forked from Wavyzz/dolibarr

Fix: possibility to hide details

This commit is contained in:
Regis Houssin
2011-04-13 09:35:51 +00:00
parent c5307243c8
commit d434dcc85b
7 changed files with 75 additions and 61 deletions

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -203,7 +203,7 @@ class pdf_edison extends ModelePDFCommandes
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
// Description de la ligne produit
pdf_writelinedesc($pdf,$object,$i,$outputlangs,100,3,30,$curY,1);
pdf_writelinedesc($pdf,$object,$i,$outputlangs,100,3,30,$curY,1,GETPOST('hidedesc'));
//$pdf->writeHTMLCell(100, 3, 30, $curY, $outputlangs->convToOutputCharset($libelleproduitservice), 0, 1);
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
@@ -213,19 +213,19 @@ class pdf_edison extends ModelePDFCommandes
$pdf->SetXY (10, $curY);
$pdf->MultiCell(20, 3, $ref, 0, 'C');
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs);
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, GETPOST('hidedetails'));
$pdf->SetXY (133, $curY);
$pdf->MultiCell(12, 3, $vat_rate, 0, 'C');
$qty = pdf_getlineqty($object, $i, $outputlangs);
$qty = pdf_getlineqty($object, $i, $outputlangs, GETPOST('hidedetails'));
$pdf->SetXY (145, $curY);
$pdf->MultiCell(10, 3, $qty, 0, 'C');
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs);
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, GETPOST('hidedetails'));
$pdf->SetXY (156, $curY);
$pdf->MultiCell(18, 3, $up_excl_tax, 0, 'R', 0);
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs);
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, GETPOST('hidedetails'));
$pdf->SetXY (174, $curY);
$pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0);

View File

@@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
/* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
*
* 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
@@ -251,7 +251,7 @@ class pdf_einstein extends ModelePDFCommandes
// Description of product line
$curX = $this->posxdesc-1;
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY);
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,GETPOST('hideref'),GETPOST('hidedesc'));
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
$nexY = $pdf->GetY();
@@ -259,18 +259,18 @@ class pdf_einstein extends ModelePDFCommandes
// TVA
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs);
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, GETPOST('hidedetails'));
$pdf->SetXY ($this->posxtva, $curY);
$pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R');
}
// Prix unitaire HT avant remise
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs);
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, GETPOST('hidedetails'));
$pdf->SetXY ($this->posxup, $curY);
$pdf->MultiCell($this->posxqty-$this->posxup-1, 3, $up_excl_tax, 0, 'R', 0);
// Quantity
$qty = pdf_getlineqty($object, $i, $outputlangs);
$qty = pdf_getlineqty($object, $i, $outputlangs, GETPOST('hidedetails'));
$pdf->SetXY ($this->posxqty, $curY);
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $qty, 0, 'R');
@@ -278,12 +278,12 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetXY ($this->posxdiscount, $curY);
if ($object->lines[$i]->remise_percent)
{
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs);
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, GETPOST('hidedetails'));
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent, 0, 'R');
}
// Total HT ligne
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs);
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, GETPOST('hidedetails'));
$pdf->SetXY ($this->postotalht, $curY);
$pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0);