Hi guys i having some problem, why is my vendor proposal Amount not showing at my PDF form, anybody could help me
Thank You.
Hi guys i having some problem, why is my vendor proposal Amount not showing at my PDF form, anybody could help me
Thank You.
Apparently it is by design. I do not agree with this appproach and I said as much elsewhere (see this thread).
I had to go into the pdf creating php and alter the code to have it appear.
Hey @Peterromao could you share which code should i change in the pdf creating php? It would help alot thanks.
Sure Matthew,
in htdocs/core/modules/supplier_proposal/doc/ open pdf_aurore.modules.php and find the following code at line 526:
// VAT Rate
/*
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxtva, $curY);
$pdf->MultiCell($this->posxup-$this->posxtva-3, 3, $vat_rate, 0, 'R');
}
// Unit price before discount
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxup, $curY);
if ($up_excl_tax > 0)
$pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0);
*/
As you can see these lines are commented out I just simply commented the comment lines
and put some parentheses around the VAT tax to be easier on the eyes.
// VAT Rate
//PR/*
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxtva, $curY);
//PR put Parenthesis around tax
$pdf->MultiCell($this->posxup-$this->posxtva-3, 3, '('.$vat_rate.')', 0, 'R');
}
// Unit price before discount
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxup, $curY);
if ($up_excl_tax > 0)
$pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0);
//PR*/
Then did a similar thing to lines starting around 553 to get the discount and the Total HT line back into the proposal.
I am yet to do something better which is to make my own template file based on these alterations so that in a future upgrade my templates are still there and separate. This direct editing stuff is not the way to go. If you do that you could save me a few minutes and explain it how you did it as I didn’t get around to do that as I have other more urgent matters and this is now working.
Cheers,
This is how it looks now btw.
I still have to put the tax in its own collumn and see what changes I made there as it is not very cool to have total and tax in parentheses in the same column. I might have rushed this but for now its enough.
It is recommended to make a new template with a new name based on the original one (i.e. you can use the content of the original file for the new template) and make the changes in the new template. Otherwise, all changes will be lost upon Dolibarr version upgrade.
To do this:
pdf_aurore.modules.php as pdf_newtemplate.modules.php
class pdf_aurore to class pdf_newtemplate
$this->name = "aurore"; to $this->name = "newtemplate";
Lol, that simple huh?
Thanks for that. I’ll do that asap.
![]()
Thanks Guys @Peterromao @milenmk