Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
company logo on invoice
10-11-2012, 06:14 PM,
company logo on invoice
First of all: webERP is absolutly great - I set up a system for my company in Switzerland and most of all, it is a perfect usable system !

there are two little things, I can't find a solution yet:

1. if I print an invoice, the company logo is much to big sized - I do not found a possibility to hide it (as possible i.e. on delivery notes). It ist possible to hide the logo on invoices or can the printed size be changed (to arround a quarter) - I can't select the invoice by the report generator;

2. by insert a first fixed asset positions, it is not possible to modify the data set - after pressing the change button, simply nothing is displayed on the screen. Do I make a mistake at this point ?

The next challange will be to integrate a web shop based on a Joomla extension.

Thanks a lot - and all the best !

10-12-2012, 07:06 AM,
RE: company logo on invoice
Hi Alex,

Yes it is easy to change the invoice format - first you need to identify if you are using portrait or landscape invoices - you can choose in the configuration. If you are using landscape invoices then you need to look at the script:

includes/ - at line 10:
$pdf->addJpegFromFile($_SESSION['LogoFile'],$Page_Width/2 -120,$YPos-40,0,60);

All you need to do is edit this line as necessary for your logo. (If you are using the portrait invoice then you need to be looking at includes/ - which is very similar)

What is happenning is that the pdf class function $pdf->addJpegFromFile() (in the file includes/class.pdf.php) is being used to place the logo on the invoice. This function takes the following parameters:


Where $img is the file name of the logo image as a .jpg

$XPos is the X - horizontal position of the logo accross the page - where 0 is the far left of the page and 842 is the far right edge (if your page is A4 landscape - it is 595 if the invoice is portrait). By taking $Page_Width/2 -120 this is putting the logo 120 over to the left of centre. As $Page_Width/2 is the centre of the page. The units are pdf points.

$YPos is the Y - vertical position of the logon up the page - where 0 is the very bottom edge and 595 is the very top (for A4 landscape). The script keeps track of where it is in a variable also called $YPos so it is putting the logo 40 points below the current position of $YPos.

By entering a number of $Height - this sets the height of the logo and the width is recalculated based on the same aspect ratio. In the default script we entered a number for $Width of 60 and the $Height is recalculated (as we entered a zero). If you set the $Height and $Width the apect ratio is altered.

When you have made alterations to any script, you need to keep a copy elsewhere so you have a record of any scripts you have altered - so when you upgrade you know what you need to do to have the system sing for you.

There is a bug with the SelectAsset.php script - I will resolve this over the coming weekend and Exson will do a new release once a couple of such issues have been resolved.
Phil Daintree
webERP Admin
Logic Works Ltd
10-12-2012, 11:39 PM,
RE: company logo on invoice
Hi Phil

thank you for your reply.

After knowing where to search, I changed the code to have the companys logo in a proper size instead of the printed company name on the left, in both ways, landscape and portrait.

Further more it seems to be possible, to arrange also all the other lists in the same way (/includes/PDF*

best regards


10-13-2012, 08:34 AM, (This post was last modified: 10-13-2012, 08:34 AM by phil.)
RE: company logo on invoice
Glad you now understand the power that is yours with webERP - it really is all possible now.
This is why we took such pains to ensure the code is approachable.
Phil Daintree
webERP Admin
Logic Works Ltd

Forum Jump:

Users browsing this thread: 1 Guest(s)