Merge pull request #8606 from atm-greg/Add_hooks_on_supplier_docs

add hooks on supplier documents
This commit is contained in:
Laurent Destailleur 2018-04-17 09:43:51 +02:00 committed by GitHub
commit bcecc25401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -398,15 +398,16 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0);
// Quantity
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxqty, $curY);
// Enough for 6 chars
if($conf->global->PRODUCT_USE_UNITS)
{
$pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $object->lines[$i]->qty, 0, 'R');
$pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R');
}
else
{
$pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $object->lines[$i]->qty, 0, 'R');
$pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R');
}
// Unit
@ -421,7 +422,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetXY($this->posxdiscount, $curY);
if ($object->lines[$i]->remise_percent)
{
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $object->lines[$i]->remise_percent."%", 0, 'R');
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails);
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent."%", 0, 'R');
}
// Total HT line

View File

@ -405,15 +405,16 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0);
// Quantity
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxqty, $curY);
// Enough for 6 chars
if($conf->global->PRODUCT_USE_UNITS)
{
$pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $object->lines[$i]->qty, 0, 'R');
$pdf->MultiCell($this->posxunit-$this->posxqty-0.8, 4, $qty, 0, 'R');
}
else
{
$pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $object->lines[$i]->qty, 0, 'R');
$pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R');
}
// Unit
@ -428,7 +429,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetXY($this->posxdiscount, $curY);
if ($object->lines[$i]->remise_percent)
{
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $object->lines[$i]->remise_percent."%", 0, 'R');
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails);
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent."%", 0, 'R');
}
// Total HT line