Jump to content

[SOLVED]Question about invoice


Recommended Posts

Well i got one problem and one question.

My problem as you can see in the picture is that the invoice at the end says:

Total ( tax incl )
Total ( tax excl )

Normally it should be first tax excl and then tax incl.

How can i change this so it is written down right?

My question:

In the same picture you see that the "tax details" are directly bellow the total price..
For the customer that can be quiet confusing so is it possible to move it a bit lower
or even at the footer of the invoice?

Thnx already,

Mike (Holland) Using Prestashop 1.3.2.3

36343_ygHXBkKDjZLEZDfVGhn0_t

Link to comment
Share on other sites

To switch the totals, change lines 532-537 of classes/PDF.php from:

$pdf->Cell($width, 0, self::l('Total').' '.(self::$_priceDisplayMethod == PS_TAX_EXC ? self::l(' (tax incl.)') : self::l(' (tax excl.)')).' : ', 0, 0, 'R');
$pdf->Cell(0, 0, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice((self::$_priceDisplayMethod == PS_TAX_EXC ? $priceBreakDown['totalWithTax'] : $priceBreakDown['totalWithoutTax']), self::$currency, true, false)), 0, 0, 'R');
$pdf->Ln(4);
$pdf->Cell($width, 0, self::l('Total').' '.(self::$_priceDisplayMethod == PS_TAX_EXC ? self::l(' (tax excl.)') : self::l(' (tax incl.)')).' : ', 0, 0, 'R');
$pdf->Cell(0, 0, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice((self::$_priceDisplayMethod == PS_TAX_EXC ? $priceBreakDown['totalWithoutTax'] : $priceBreakDown['totalWithTax']), self::$currency, true, false)), 0, 0, 'R');
$pdf->Ln(4);



to:

$pdf->Cell($width, 0, self::l('Total').' '.(self::$_priceDisplayMethod == PS_TAX_EXC ? self::l(' (tax excl.)') : self::l(' (tax incl.)')).' : ', 0, 0, 'R');
$pdf->Cell(0, 0, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice((self::$_priceDisplayMethod == PS_TAX_EXC ? $priceBreakDown['totalWithoutTax'] : $priceBreakDown['totalWithTax']), self::$currency, true, false)), 0, 0, 'R');
$pdf->Ln(4);
$pdf->Cell($width, 0, self::l('Total').' '.(self::$_priceDisplayMethod == PS_TAX_EXC ? self::l(' (tax incl.)') : self::l(' (tax excl.)')).' : ', 0, 0, 'R');
$pdf->Cell(0, 0, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice((self::$_priceDisplayMethod == PS_TAX_EXC ? $priceBreakDown['totalWithTax'] : $priceBreakDown['totalWithoutTax']), self::$currency, true, false)), 0, 0, 'R');
$pdf->Ln(4);

Link to comment
Share on other sites

Change line 876-878 of classes/PDF.php from:

$this->SetFont(self::fontname(), 'B', 8);
for($i = 0; $i < sizeof($header); $i++)
   $this->Cell($w[$i], 5, $header[$i], 0, 0, 'R');



to:

$this->Ln(48);
$this->SetFont(self::fontname(), 'B', 8);
for($i = 0; $i < sizeof($header); $i++)
   $this->Cell($w[$i], 5, $header[$i], 0, 0, 'R');



This will add a new line of height 48 above the tax detail section. You can adjust 48 until you are happy with the amount of space.

Link to comment
Share on other sites

  • 2 months later...

Hi All,

I need help for the VAT calcualtion please?

As I have showed in the picture, i need some adjustment, I dont mind paying someone reasonable fee, thanks



Change line 876-878 of classes/PDF.php from:

$this->SetFont(self::fontname(), 'B', 8);
for($i = 0; $i < sizeof($header); $i++)
   $this->Cell($w[$i], 5, $header[$i], 0, 0, 'R');



to:

$this->Ln(48);
$this->SetFont(self::fontname(), 'B', 8);
for($i = 0; $i < sizeof($header); $i++)
   $this->Cell($w[$i], 5, $header[$i], 0, 0, 'R');



This will add a new line of height 48 above the tax detail section. You can adjust 48 until you are happy with the amount of space.

40595_KUg5duUjOmBAwPHuNoCm_t

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...