Jump to content

[Solved] Remove "Reference" from invoice


DK-Peter

Recommended Posts

Dear all

Can anyone help me remove (rem out) "Reference" from header and each product on the invoice? See attached image for reference.

I know this should be done in PDF.php in classes, but doing so is a little above my skills.

Any help is much appreciated! Thanks, br Peter

NB: Pls. ignore incorrect characters on invoice; it has been corrected.post-284724-0-82067100-1329170944_thumb.jpg

Link to comment
Share on other sites

For the header:

Back Office, Tools, Translations, select PDF Translations, then click on your language flag

 

Once the page opens, search for the text and then enter spaces in the block next to it

 

Scroll down and Update Translations.

 

If you don't use the reference field, just make sure it is blank in every product you save.

Link to comment
Share on other sites

Hello,

 

You can modify PDF.php,

 

change:

$header = array(
  array(self::l('Description'), 'L'),
  array(self::l('Reference'), 'L'),
  array(self::l('Qty'), 'C')
 );

 

to

 

$header = array(
  array(self::l('Description'), 'L'),
  array(self::l('Qty'), 'C')
 );

 

and remove from the same function line:

 

$this->Cell($w[1], $lineSize, ($product['product_reference'] != '' ? Tools::iconv('utf-8', self::encoding(), $product['product_reference']) : '---'), 'B');

  • Like 1
Link to comment
Share on other sites

@ Rhapsody: Thanks for your suggested work-around, but I do use the "Reference" field (but more as a sales text) so I can't just not use it.

@ CartExpert.net: Thank you very much - just the help I needed! I'll implement straight away.

Thanks again both of ya!

Link to comment
Share on other sites

@ CartExpert.net: Hmm, it does remove "Reference" from the headline, but aligns Unit price, Qty and Amount to the left, so it no longer aligns with rows below. Also, it does not remove "Reference" from the individual product description(s)!

 

Am I doing something wrong? My edited PDF.php attached for reference....

PDF.php

Link to comment
Share on other sites

Sorry, I have looked at the wrong line.

 

You do not need to restore the old function, as if a product is returned the reference will be shown on the invoice generated.

 

1. Locate function: ProdTabHeader()

2. In both cases in the first 'if' statement remove: array(self::l('Reference'), 'L'),

3. Change: $w = array(100, 15, 30, 15, 30); to $w = array(145, 15, 30);

4. Change: $w = array(120, 30, 10); to $w = array(150, 10);

5. Locate function: public function ProdTab($delivery = false)

6. Change: $w = array(100, 15, 30, 15, 30); to $w = array(145, 15, 30);

7. Change: $w = array(120, 30, 10); to $w = array(150, 10);

8. In the same function remove: $this->Cell($w[++$i], $lineSize, $product['product_reference'], 'B');

9. In the same function remove: $this->Cell($w[++$i], $lineSize, ($product['product_reference'] ? Tools::iconv('utf-8', self::encoding(), $product['product_reference']) : '--'), 'B');

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