redwood Posted February 7, 2008 Share Posted February 7, 2008 I'd like to move the clientdetails on the invoice to somewhere on the right, we use envelopes with a window on the right. But no mather what i change on the (what i believe is the) layout code. ie. 10,50) Those details just stay at the left. I've managed to change everything on the invoice except this. What am i doing wrong? 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted February 7, 2008 Share Posted February 7, 2008 You're not doing anything wrong other than the fact that you don't have enough knowledge of HTML (and crappy tables) to change it and have it work properly. you just need to have it so it looks like this: <table> <tr> <td width="50%"></td> <td> ADDRESS HERE</td> </tr> </table> [code] You are editing viewinvoice.tpl, right? 0 Quote Link to comment Share on other sites More sharing options...
redwood Posted February 7, 2008 Author Share Posted February 7, 2008 ehmm... the viewinvoice.tpl.. that isn't a file used in the pdf invoice of is it? 0 Quote Link to comment Share on other sites More sharing options...
magga Posted February 7, 2008 Share Posted February 7, 2008 No it's pdfconfig.php you should be editing if you are referring to the PDF invoices ? 0 Quote Link to comment Share on other sites More sharing options...
redwood Posted February 7, 2008 Author Share Posted February 7, 2008 The pdf invoices are the only ones i use. And i've succesfully edited the pdfconfig.php to serve my needs, EXCEPT for the clientdetails. I need them more to the right, but they won't move at all! 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted February 7, 2008 Share Posted February 7, 2008 You should have specified that in your post. Just for future reference, if you do post asking for help, you need to make sure you do include specifics so when people help you, it's what you really need help with. 0 Quote Link to comment Share on other sites More sharing options...
redwood Posted February 7, 2008 Author Share Posted February 7, 2008 You should have specified that in your post. Just for future reference, if you do post asking for help, you need to make sure you do include specifics so when people help you, it's what you really need help with. I'm very sorry, but like i said, i didn't even know there was another invoice then the pdf invoice! If i knew, i certainly asked help with the PDF invoice the first time! It won't happen again. pretty please forgive me! ;-) 0 Quote Link to comment Share on other sites More sharing options...
Jordan Posted February 7, 2008 Share Posted February 7, 2008 Well, it's kind of obvious what you're editing, because it has a file name, or even just mention PDF period.. Either way, you don't have to apologize--I'm just saying. 0 Quote Link to comment Share on other sites More sharing options...
redwood Posted February 7, 2008 Author Share Posted February 7, 2008 right. crystal clear! But back on topic. Maybe you know how i can reposition the clientdetails in the pdfconfig.php? I know how to position, and i've repositioned somethings in the invoice. But it looks like the clientdetails won't move. A rule looks like: $pdf->Cell(0,4,$_LANG["invoicesattn"].": ".$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } else 0 Quote Link to comment Share on other sites More sharing options...
isdoo Posted February 7, 2008 Share Posted February 7, 2008 You would need to use a line such as $pdf->SetXY(80,80); (distance from left, distance from top) I would also move the clients details section to the bottom that page. I have not tried this, but can't see why it shouldn't work. You may need to tweak the number of blank lines to move the bulk below up or down. 0 Quote Link to comment Share on other sites More sharing options...
redwood Posted February 7, 2008 Author Share Posted February 7, 2008 Thnx to isdoo i found it out. Didn't know the SetXY code. what i've done is. # Clients Details $pdf->SetFont('Arial','',10); if ($clientsdetails["companyname"]) { $pdf->SetXY(140,70); $pdf->Cell(0,4,$clientsdetails["companyname"],0,1,'L'); $pdf->SetXY(140,74); $pdf->Cell(0,4,$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } $pdf->SetFont('Arial','',10); $pdf->SetXY(140,78); $pdf->Cell(0,4,$clientsdetails["address1"],0,1,'L'); if ($clientsdetails["address2"]) { $pdf->Cell(0,4,$clientsdetails["address2"],0,1,'L'); } $pdf->SetXY(140,82); $pdf->Cell(0,4,$clientsdetails["postcode"].", ".$clientsdetails["city"]." ".$clientsdetails["state"],0,1,'L'); $pdf->SetXY(140,86); $pdf->Cell(0,4,$clientsdetails["country"],0,1,'L'); $pdf->Ln(10); I don't know if this is the cleanest way, but it shure works! 0 Quote Link to comment Share on other sites More sharing options...
isdoo Posted February 7, 2008 Share Posted February 7, 2008 I don't know if this is the cleanest way, but it shure works! And that is the main thing Glad you fixed your issue 0 Quote Link to comment Share on other sites More sharing options...
dutchnet Posted February 8, 2008 Share Posted February 8, 2008 Hi, This is our modification for the client details, mind you some data, like postal code and city have traded places to be more in line with the standard address layout in Holland. # Clients Details $pdf->SetXY(20,50); $pdf->SetFont('Arial','',11); if ($clientsdetails["companyname"]) { $pdf->Cell(0,4,$clientsdetails["companyname"],0,2,'L'); $pdf->Cell(0,4,$_LANG["invoicesattn"]." ".$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,2,'L'); } else { $pdf->Cell(0,4,$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,2,'L'); } $pdf->SetFont('Arial','',11); $pdf->Cell(0,4,$clientsdetails["address1"],0,2,'L'); if ($clientsdetails["address2"]) { $pdf->Cell(0,4,$clientsdetails["address2"],0,2,'L'); } $pdf->SetFont('Arial','',11); $pdf->Cell(0,4,$clientsdetails["postcode"]." ".$clientsdetails["city"],0,2,'L'); if ($clientsdetails["country"] != "Netherlands") { $pdf->Cell(0,4,$clientsdetails["country"],0,1,'L'); } Hope it helps Oooooops you allready had it solved ;) regards Erik 0 Quote Link to comment Share on other sites More sharing options...
freedombi Posted February 8, 2008 Share Posted February 8, 2008 If you're not sure what all's going in pdfconfig.php, it uses FPDF. The manual is at http://www.fpdf.org 0 Quote Link to comment Share on other sites More sharing options...
aushosts Posted February 21, 2008 Share Posted February 21, 2008 For anyone looking for something like this; we are using: # Clients Details $pdf->SetXY(21,65); $pdf->SetFont('Arial','',10); if ($clientsdetails["companyname"]) { $pdf->Cell(4,4,$clientsdetails["companyname"],0,1,'L'); $pdf->SetXY(21,70); $pdf->Cell(0,4,$_LANG["invoicesattn"].": ".$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } else { $pdf->Cell(0,4,$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } $pdf->SetXY(21,75); $pdf->Cell(0,4,$clientsdetails["address1"],0,1,'L'); if ($clientsdetails["address2"]) { $pdf->SetXY(21,80); $pdf->Cell(0,4,$clientsdetails["address2"],0,1,'L'); } $pdf->SetXY(21,85); $pdf->Cell(0,4,$clientsdetails["city"].", ".$clientsdetails["state"].", ".$clientsdetails["postcode"],0,1,'L'); $pdf->SetXY(21,90); $pdf->Cell(0,4,$clientsdetails["country"],0,1,'L'); $pdf->Ln(10); 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted February 23, 2008 Share Posted February 23, 2008 Thanks for posting your code. Any chance of a preview with them? Much appreciated. 0 Quote Link to comment Share on other sites More sharing options...
aushosts Posted March 3, 2008 Share Posted March 3, 2008 We actually changed the above to use a margin around that code. $pdf->SetMargins(25, 0, 0); // left, top, right $pdf->Ln(); # Clients Details $pdf->Cell(0,4,$_LANG["invoicesinvoicedto"],0,1); $pdf->SetFont('Arial','B',10); if ($clientsdetails["companyname"]) { $pdf->Cell(0,4,$clientsdetails["companyname"],0,1,'L'); $pdf->SetFont('Arial','',9); $pdf->Cell(0,4,$_LANG["invoicesattn"].": ".$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } else { $pdf->Cell(0,4,$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } $pdf->SetFont('Arial','',9); $pdf->Cell(0,4,$clientsdetails["address1"],0,1,'L'); if ($clientsdetails["address2"]) { $pdf->Cell(0,4,$clientsdetails["address2"],0,1,'L'); } $pdf->Cell(0,4,$clientsdetails["city"].", ".$clientsdetails["state"].", ".$clientsdetails["postcode"],0,1,'L'); $pdf->Cell(0,4,$clientsdetails["country"],0,1,'L'); $pdf->SetMargins(10, 0, 10); // left, top, right $pdf->Ln(10); Invoice looks like: http://www.aushosts.com.au/myfiles/5168.pdf 0 Quote Link to comment Share on other sites More sharing options...
247hosting.co.nz Posted March 11, 2008 Share Posted March 11, 2008 How did you get your invoice to say Tax Invoice? 0 Quote Link to comment Share on other sites More sharing options...
aushosts Posted March 12, 2008 Share Posted March 12, 2008 How did you get your invoice to say Tax Invoice? Manually edited in the pdfconfig.php file 0 Quote Link to comment Share on other sites More sharing options...
eekdood Posted March 13, 2008 Share Posted March 13, 2008 Is anyone willing to share their pfdconfig file that's setup to use #10 window envelopes? I am more than willing to spend the time to set it up myself, but I have 6 invoice I need to print and mail to clients next week. I appreciate any input! Thanks, Eric 0 Quote Link to comment Share on other sites More sharing options...
aushosts Posted March 14, 2008 Share Posted March 14, 2008 Try this mate... $pdf->SetMargins(35, 0, 0); // left, top, right $pdf->Ln(); # Clients Details $pdf->Cell(0,4,$_LANG["invoicesinvoicedto"],0,1); $pdf->SetFont('Arial','B',10); if ($clientsdetails["companyname"]) { $pdf->Cell(0,4,$clientsdetails["companyname"],0,1,'L'); $pdf->SetFont('Arial','',9); $pdf->Cell(0,4,$_LANG["invoicesattn"].": ".$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } else { $pdf->Cell(0,4,$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } $pdf->SetFont('Arial','',9); $pdf->Cell(0,4,$clientsdetails["address1"],0,1,'L'); if ($clientsdetails["address2"]) { $pdf->Cell(0,4,$clientsdetails["address2"],0,1,'L'); } $pdf->Cell(0,4,$clientsdetails["city"].", ".$clientsdetails["state"].", ".$clientsdetails["postcode"],0,1,'L'); $pdf->Cell(0,4,$clientsdetails["country"],0,1,'L'); $pdf->SetMargins(10, 0, 10); // left, top, right $pdf->Ln(10); 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.