Jump to content

Invoice customising


robinast

Recommended Posts

I would need to have both prices - with VAT and without - for every single product on the invoices while products' references are not must be. Is there any not very complicated way to achieve this? Modifying the PDF.php in 'classes' maybe? But unfortunately it's far beyond my competence...

I'm using the version 1.3.7.0

Link to comment
Share on other sites

Hello,

 

Yes, you need to modify the PDF.php file.

 

Go to : public function ProdTabHeader($delivery = false)

 

Modify:

array(self::l('Reference'), 'L'),
array(self::l('U. price'), 'R'),

 

to:

array(self::l('U. price tax excl.'), 'R'),
array(self::l('U. price tax incl'), 'R'),

 

 

Modify:

$w = array(100, 15, 30, 15, 30);

 

to:

$w = array(90, 30, 30, 10, 30);

 

 

Go to: public function ProdTab($delivery = false)

Modify:

$this->Cell($w[++$i], $lineSize, $product['product_reference'], 'B');
 if (!$delivery)
  $this->Cell($w[++$i], $lineSize, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice($unit_price, self::$currency, true, false)), 'B', 0, 'R');

 

to

 

if (!$delivery)
 {
  $this->Cell($w[++$i], $lineSize, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice(&$unit_without_tax, self::$currency, true, false)), 'B', 0, 'R');
  $this->Cell($w[++$i], $lineSize, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice(&$unit_with_tax, self::$currency, true, false)), 'B', 0, 'R');
 }

 

 

Modify:

$this->Cell($w[++$i], $lineSize, ($product['product_reference'] ? $product['product_reference'] : '--'), 'B');
 if (!$delivery)
  $this->Cell($w[++$i], $lineSize, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice($unit_price, self::$currency, true, false)), 'B', 0, 'R');

 

to

 

if (!$delivery)
 {
  $this->Cell($w[++$i], $lineSize, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice(&$unit_without_tax, self::$currency, true, false)), 'B', 0, 'R');
  $this->Cell($w[++$i], $lineSize, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice(&$unit_with_tax, self::$currency, true, false)), 'B', 0, 'R');
 }

Link to comment
Share on other sites

  • 4 weeks later...

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...