• Online Demo
  • 30-day Free Trial

Go Back   Blesta Forums > Community > Blesta Related

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2010, 11:37 PM
naja7host's Avatar
naja7host naja7host is offline
Senior Member
 
Join Date: May 2007
Posts: 688
Default [Tutorial] PAID Stamp for paid invoice

Hello ,

This is my first tutorial for blesta script , in this thread i will show how to add the PAID STAMP to paid invoice .





open the files "inc/invoice-pdf.class.php" , serach the line :

PHP Code:
$this->drawInvoiceFooter($inv); 
before add the fallowing code :

PHP Code:
            // Draw the stamp for paid invoice 
            
if ($i==($pages_needed-1)) {
                
// If the invoice is paid totally 
                
if ($inv['amount_due'] <= ) {                
                
$this->pdf->addPngFromFile("./stamp.png",220,700,$this->pdf->y-320,100,0);
                }
            } 
note that the stamp image should be in the root blesta installation

if you want to use external image file , use the fallowing code

PHP Code:
$img ImageCreatefromjpeg("http://www.your-site/folder/stamp.jpg");
$this->pdf->addImage($img,199,$this->pdf->y-100,200,0); 
you can change the possition of the imge editing the X-Y point.

Thanks

Last edited by naja7host; 04-30-2010 at 02:33 AM. Reason: correct $inv['amount_due'] code
Reply With Quote
  #2  
Old 04-26-2010, 09:14 PM
Paul's Avatar
Paul Paul is offline
Blesta Developer
 
Join Date: Apr 2006
Location: Wherever I go, there I am.
Posts: 1,464
Send a message via AIM to Paul Send a message via MSN to Paul
Default

Thanks for the contribution!
__________________
Paul
Misc Stuff Guy

Blesta
Professional Billing
www.blesta.com
Reply With Quote
  #3  
Old 11-08-2010, 08:34 AM
davidolaj davidolaj is offline
Member
 
Join Date: Apr 2009
Posts: 61
Default

Quote:

open the files "inc/invoice-pdf.class.php" , serach the line :

PHP Code:
$this->drawInvoiceFooter($inv); 
before add the fallowing code :

PHP Code:
            // Draw the stamp for paid invoice 
            
if ($i==($pages_needed-1)) {
                
// If the invoice is paid totally 
                
if ($inv['amount_due'] <= ) {                
                
$this->pdf->addPngFromFile("./stamp.png",220,700,$this->pdf->y-320,100,0);
                }
            } 
note that the stamp image should be in the root blesta installation
I tried the script as directed (see part script code below) but not show the PAID STAMP on my invoices;

}
// Draw the stamp for paid invoice
if ($i==($pages_needed-1)) {
// If the invoice is paid totally
if ($inv['amount_due'] <= 0 ) {
$this->pdf->addPngFromFile("./stamp.png",220,700,$this->pdf->y-320,100,0);
}
}
$this->drawInvoiceFooter($inv);
}
}
}
?>
__________________
B.R,
David.
Reply With Quote
  #4  
Old 11-08-2010, 03:05 PM
Paul's Avatar
Paul Paul is offline
Blesta Developer
 
Join Date: Apr 2006
Location: Wherever I go, there I am.
Posts: 1,464
Send a message via AIM to Paul Send a message via MSN to Paul
Default

I have not tested it, but it appears to be meant for the Standard PDF Engine. If you are using the TCPDF Engine, it will not work.
__________________
Paul
Misc Stuff Guy

Blesta
Professional Billing
www.blesta.com
Reply With Quote
  #5  
Old 11-08-2010, 07:19 PM
naja7host's Avatar
naja7host naja7host is offline
Senior Member
 
Join Date: May 2007
Posts: 688
Default

is not working in TCPDF .

i will poste the tips for the TCPDF , i have tested and it work .
Reply With Quote
  #6  
Old 11-08-2010, 08:06 PM
naja7host's Avatar
naja7host naja7host is offline
Senior Member
 
Join Date: May 2007
Posts: 688
Default

Here is the tutorial

http://www.blesta.com/forums/showthr...=3896#post3896
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Invoice Lines Telifon API & Order Forms 1 12-10-2008 05:05 PM
PAID Stamp naja7host Feature Requests 10 11-23-2008 09:44 PM
cronjob probleme !!!!! naja7host General Discussion 15 02-07-2008 11:16 PM


All times are GMT. The time now is 09:25 AM.