NEW Add SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME and
SHIPPING_PDF_HIDE_QTYTOSHIP
This commit is contained in:
parent
15dd2b3e35
commit
055a55b900
@ -146,7 +146,7 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
$this->posxqtytoship=$this->page_largeur - $this->marge_droite - 28;
|
$this->posxqtytoship=$this->page_largeur - $this->marge_droite - 28;
|
||||||
$this->posxpuht=$this->page_largeur - $this->marge_droite;
|
$this->posxpuht=$this->page_largeur - $this->marge_droite;
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_PDF_SHIPPING_DISPLAY_AMOUNT_HT)) {
|
if (!empty($conf->global->SHIPPING_PDF_DISPLAY_AMOUNT_HT)) { // Show also the prices
|
||||||
|
|
||||||
$this->posxweightvol=$this->page_largeur - $this->marge_droite - 118;
|
$this->posxweightvol=$this->page_largeur - $this->marge_droite - 118;
|
||||||
$this->posxqtyordered=$this->page_largeur - $this->marge_droite - 96;
|
$this->posxqtyordered=$this->page_largeur - $this->marge_droite - 96;
|
||||||
@ -533,8 +533,11 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
$voltxt=round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuring_units_string($object->lines[$i]->volume_units?$object->lines[$i]->volume_units:0,"volume");
|
$voltxt=round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuring_units_string($object->lines[$i]->volume_units?$object->lines[$i]->volume_units:0,"volume");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME))
|
||||||
|
{
|
||||||
$pdf->writeHTMLCell($this->posxqtyordered - $this->posxweightvol + 2, 3, $this->posxweightvol - 1, $curY, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt, 0, 0, false, true, 'C');
|
$pdf->writeHTMLCell($this->posxqtyordered - $this->posxweightvol + 2, 3, $this->posxweightvol - 1, $curY, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt, 0, 0, false, true, 'C');
|
||||||
//$pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 3, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt,'','C');
|
//$pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 3, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt,'','C');
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED))
|
if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED))
|
||||||
{
|
{
|
||||||
@ -542,10 +545,13 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
$pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked,'','C');
|
$pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked,'','C');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($conf->global->SHIPPING_PDF_HIDE_QTYTOSHIP))
|
||||||
|
{
|
||||||
$pdf->SetXY($this->posxqtytoship, $curY);
|
$pdf->SetXY($this->posxqtytoship, $curY);
|
||||||
$pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 3, $object->lines[$i]->qty_shipped,'','C');
|
$pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 3, $object->lines[$i]->qty_shipped,'','C');
|
||||||
|
}
|
||||||
|
|
||||||
if(!empty($conf->global->MAIN_PDF_SHIPPING_DISPLAY_AMOUNT_HT))
|
if(!empty($conf->global->SHIPPING_PDF_DISPLAY_AMOUNT_HT))
|
||||||
{
|
{
|
||||||
$pdf->SetXY($this->posxpuht, $curY);
|
$pdf->SetXY($this->posxpuht, $curY);
|
||||||
$pdf->MultiCell(($this->posxtotalht - $this->posxpuht-1), 3, price($object->lines[$i]->subprice, 0, $outputlangs),'','R');
|
$pdf->MultiCell(($this->posxtotalht - $this->posxpuht-1), 3, price($object->lines[$i]->subprice, 0, $outputlangs),'','R');
|
||||||
@ -720,18 +726,24 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
$pdf->MultiCell($this->posxqtytoship - $this->posxqtyordered, $tab2_hl, $totalOrdered, 0, 'C', 1);
|
$pdf->MultiCell($this->posxqtytoship - $this->posxqtyordered, $tab2_hl, $totalOrdered, 0, 'C', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($conf->global->SHIPPING_PDF_HIDE_QTYTOSHIP))
|
||||||
|
{
|
||||||
$pdf->SetXY($this->posxqtytoship, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($this->posxqtytoship, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($this->posxpuht - $this->posxqtytoship, $tab2_hl, $totalToShip, 0, 'C', 1);
|
$pdf->MultiCell($this->posxpuht - $this->posxqtytoship, $tab2_hl, $totalToShip, 0, 'C', 1);
|
||||||
|
}
|
||||||
|
|
||||||
if(!empty($conf->global->MAIN_PDF_SHIPPING_DISPLAY_AMOUNT_HT)) {
|
if (!empty($conf->global->SHIPPING_PDF_DISPLAY_AMOUNT_HT)) {
|
||||||
|
|
||||||
$pdf->SetXY($this->posxpuht, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($this->posxpuht, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($this->posxtotalht - $this->posxpuht, $tab2_hl, '', 0, 'C', 1);
|
$pdf->MultiCell($this->posxtotalht - $this->posxpuht, $tab2_hl, '', 0, 'C', 1);
|
||||||
|
|
||||||
$pdf->SetXY($this->posxtotalht, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($this->posxtotalht, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxtotalht, $tab2_hl, price($object->total_ht, 0, $outputlangs), 0, 'C', 1);
|
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxtotalht, $tab2_hl, price($object->total_ht, 0, $outputlangs), 0, 'C', 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME))
|
||||||
|
{
|
||||||
// Total Weight
|
// Total Weight
|
||||||
if ($totalWeighttoshow)
|
if ($totalWeighttoshow)
|
||||||
{
|
{
|
||||||
@ -748,6 +760,7 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
$index++;
|
$index++;
|
||||||
}
|
}
|
||||||
if (! $totalWeighttoshow && ! $totalVolumetoshow) $index++;
|
if (! $totalWeighttoshow && ! $totalVolumetoshow) $index++;
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
|
||||||
@ -794,12 +807,15 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
$pdf->MultiCell($this->posxqtyordered - $this->posxdesc, 2, $outputlangs->transnoentities("Description"), '', 'L');
|
$pdf->MultiCell($this->posxqtyordered - $this->posxdesc, 2, $outputlangs->transnoentities("Description"), '', 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME))
|
||||||
|
{
|
||||||
$pdf->line($this->posxweightvol-1, $tab_top, $this->posxweightvol-1, $tab_top + $tab_height);
|
$pdf->line($this->posxweightvol-1, $tab_top, $this->posxweightvol-1, $tab_top + $tab_height);
|
||||||
if (empty($hidetop))
|
if (empty($hidetop))
|
||||||
{
|
{
|
||||||
$pdf->SetXY($this->posxweightvol-1, $tab_top+1);
|
$pdf->SetXY($this->posxweightvol-1, $tab_top+1);
|
||||||
$pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 2, $outputlangs->transnoentities("WeightVolShort"),'','C');
|
$pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 2, $outputlangs->transnoentities("WeightVolShort"),'','C');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED))
|
if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED))
|
||||||
{
|
{
|
||||||
@ -811,14 +827,17 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($conf->global->SHIPPING_PDF_HIDE_QTYTOSHIP))
|
||||||
|
{
|
||||||
$pdf->line($this->posxqtytoship-1, $tab_top, $this->posxqtytoship-1, $tab_top + $tab_height);
|
$pdf->line($this->posxqtytoship-1, $tab_top, $this->posxqtytoship-1, $tab_top + $tab_height);
|
||||||
if (empty($hidetop))
|
if (empty($hidetop))
|
||||||
{
|
{
|
||||||
$pdf->SetXY($this->posxqtytoship, $tab_top+1);
|
$pdf->SetXY($this->posxqtytoship, $tab_top+1);
|
||||||
$pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 2, $outputlangs->transnoentities("QtyToShip"),'','C');
|
$pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 2, $outputlangs->transnoentities("QtyToShip"),'','C');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!empty($conf->global->MAIN_PDF_SHIPPING_DISPLAY_AMOUNT_HT)) {
|
if (!empty($conf->global->SHIPPING_PDF_DISPLAY_AMOUNT_HT)) {
|
||||||
|
|
||||||
$pdf->line($this->posxpuht-1, $tab_top, $this->posxpuht-1, $tab_top + $tab_height);
|
$pdf->line($this->posxpuht-1, $tab_top, $this->posxpuht-1, $tab_top + $tab_height);
|
||||||
if (empty($hidetop))
|
if (empty($hidetop))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user