Jump to content

[HELP] Please, how to.. hide delivery address if the PDF is an invoice?


josias

Recommended Posts

I know modifications should be in classes/pdf.php, but I have no idea how to do.

I want:

If PDF is a ivoice, show only the invoice address, and hide the delivery address.

If the PDF is a delivery_slip show both address

 

Somebody can help me please?

Thank you!

Link to comment
Share on other sites

Hello,

 

You should create an override of the PDF class for the 'invoice' function.

 

In the 'invoice' function check if $delivery is false.

 

If not false display $pdf->Cell($width, 10, self::l('Delivery'), 0, 'L'); if false do not display.

 

If not false

$addressType = array(
  'delivery' => array(),
  'invoice' => array(),
 );

 

if false

 

$addressType = array(
  'invoice' => array(),
 );

 

We didn't test this, but should work.

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