FIX : progress size
This commit is contained in:
parent
307c06dfc3
commit
1886e68731
@ -129,7 +129,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$this->posxqty=145;
|
$this->posxqty=145;
|
||||||
}
|
}
|
||||||
$this->posxdiscount=162;
|
$this->posxdiscount=162;
|
||||||
$this->posxprogress=132; // Only displayed for situation invoices
|
$this->posxprogress=126; // Only displayed for situation invoices
|
||||||
$this->postotalht=174;
|
$this->postotalht=174;
|
||||||
if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
|
if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
|
||||||
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
|
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
|
||||||
@ -313,7 +313,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if ($object->situation_cycle_ref)
|
if ($object->situation_cycle_ref)
|
||||||
{
|
{
|
||||||
$this->situationinvoice = True;
|
$this->situationinvoice = True;
|
||||||
$progress_width = 14;
|
$progress_width = 18;
|
||||||
$this->posxtva -= $progress_width;
|
$this->posxtva -= $progress_width;
|
||||||
$this->posxup -= $progress_width;
|
$this->posxup -= $progress_width;
|
||||||
$this->posxqty -= $progress_width;
|
$this->posxqty -= $progress_width;
|
||||||
@ -443,7 +443,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$curX = $this->posxdesc-1;
|
$curX = $this->posxdesc-1;
|
||||||
|
|
||||||
$pdf->startTransaction();
|
$pdf->startTransaction();
|
||||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxpicture-$curX,3,$curX,$curY,$hideref,$hidedesc);
|
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxpicture-$curX-$progress_width,3,$curX,$curY,$hideref,$hidedesc);
|
||||||
$pageposafter=$pdf->getPage();
|
$pageposafter=$pdf->getPage();
|
||||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||||
{
|
{
|
||||||
@ -507,7 +507,12 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
|
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
|
||||||
$pdf->SetXY($this->posxqty, $curY);
|
$pdf->SetXY($this->posxqty, $curY);
|
||||||
// Enough for 6 chars
|
// Enough for 6 chars
|
||||||
if($conf->global->PRODUCT_USE_UNITS)
|
|
||||||
|
if ($this->situationinvoice)
|
||||||
|
{
|
||||||
|
$pdf->MultiCell($this->posxprogress-$this->posxqty-0.8, 4, $qty, 0, 'R');
|
||||||
|
}
|
||||||
|
else if($conf->global->PRODUCT_USE_UNITS)
|
||||||
{
|
{
|
||||||
$pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R');
|
$pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R');
|
||||||
}
|
}
|
||||||
@ -521,7 +526,18 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
$progress = pdf_getlineprogress($object, $i, $outputlangs, $hidedetails);
|
$progress = pdf_getlineprogress($object, $i, $outputlangs, $hidedetails);
|
||||||
$pdf->SetXY($this->posxprogress, $curY);
|
$pdf->SetXY($this->posxprogress, $curY);
|
||||||
$pdf->MultiCell($this->postotalht-$this->posxprogress, 3, $progress, 0, 'R');
|
if($conf->global->PRODUCT_USE_UNITS)
|
||||||
|
{
|
||||||
|
$pdf->MultiCell($this->posxunit-$this->posxprogress-1, 3, $progress, 0, 'R');
|
||||||
|
}
|
||||||
|
else if ($this->atleastonediscount)
|
||||||
|
{
|
||||||
|
$pdf->MultiCell($this->posxdiscount-$this->posxprogress-1, 3, $progress, 0, 'R');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$pdf->MultiCell($this->postotalht-$this->posxprogress-1, 3, $progress, 0, 'R');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unit
|
// Unit
|
||||||
@ -1399,15 +1415,15 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY($this->posxprogress, $tab_top+1);
|
$pdf->SetXY($this->posxprogress, $tab_top+1);
|
||||||
if($conf->global->PRODUCT_USE_UNITS)
|
if($conf->global->PRODUCT_USE_UNITS)
|
||||||
{
|
{
|
||||||
$pdf->MultiCell($this->posxunit-$this->posxprogress+1,2, $outputlangs->transnoentities("ProgressShort"),'','C');
|
$pdf->MultiCell($this->posxunit-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C');
|
||||||
}
|
}
|
||||||
else if ($this->atleastonediscount)
|
else if ($this->atleastonediscount)
|
||||||
{
|
{
|
||||||
$pdf->MultiCell($this->posxdiscount-$this->posxprogress+1,2, $outputlangs->transnoentities("ProgressShort"),'','C');
|
$pdf->MultiCell($this->posxdiscount-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pdf->MultiCell($this->postotalht-$this->posxprogress+1,2, $outputlangs->transnoentities("ProgressShort"),'','C');
|
$pdf->MultiCell($this->postotalht-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user