rendered paste body<?php
# Company Details
$pdf->SetFont('Arial','',8);
foreach ($companyaddress AS $addressline) {
$pdf->Cell(0,4,$addressline,0,1,'L');
}
//Logo
$pdf->Image(dirname(__FILE__).'/../images/logo.jpg',140,8,50);
$pdf->Ln(10);
//Status
if ($status=="") {
$status="paid";
}
//Status
$pdf->Image(dirname(__FILE__).'/../images/invoices/'.strtolower($status).'.png',120,55,50);
//Arial bold 15
$pdf->SetFont('Arial','B',15);
//Move to the right
$pdf->SetFillColor(239);
$pdf->Cell(0,8,$_LANG["invoicestitle"].$invoiceid,0,1,'L','1');
$pdf->SetFont('Arial','',10);
$pdf->Cell(0,6,$_LANG["invoicesdatedue"].': '.$duedate.'',0,1,'L','1');
//Line break
$pdf->Ln(10);
# Clients Details
$pdf->SetFont('Arial','',11);
if ($clientsdetails["companyname"]) {
$pdf->Cell(0,4,$clientsdetails["companyname"],0,1,'L');
$pdf->Cell(0,5,"ATTN: ".$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L');
} else {
$pdf->Cell(0,5,$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L');
}
$pdf->SetFont('Arial','',8);
$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->Ln(10);
$pdf->SetFont('Arial','B',10);
$pdf->SetFillColor(239);
$pdf->Cell(148,7,$_LANG["invoicesdescription"],1,0,'C','1');
$pdf->Cell(40,7,$_LANG["invoicesamount"],1,0,'C','1');
$pdf->Ln();
$pdf->SetFont('Arial','',10);
foreach ($invoiceitems AS $item) {
if (strlen($item["description"])>85) {
#$pdf->MultiCell(148,6,$item["description"],1);
$pdf->Cell(148,6,substr($item["description"],0,85),1);
$pdf->Cell(40,6,$currencysymbol.$item["amount"],1,0,'C');
$pdf->Ln();
$pdf->Cell(148,6,substr($item["description"],85),1);
$pdf->Cell(40,6,"",1,0,'C');
} else {
$pdf->Cell(148,6,$item["description"],1);
$pdf->Cell(40,6,$currencysymbol.$item["amount"],1,0,'C');
}
$pdf->Ln();
}
$pdf->SetFont('Arial','B',10);
$pdf->Cell(148,7,$_LANG["invoicessubtotal"].":",1,0,'R','1');
$pdf->Cell(40,7,$currencysymbol.$subtotal,1,0,'C','1');
$pdf->Ln();
$pdf->Cell(148,7,$_LANG["invoicescredit"].":",1,0,'R','1');
$pdf->Cell(40,7,$currencysymbol.$credit,1,0,'C','1');
$pdf->Ln();
if ($CONFIG["TaxEnabled"]) {
$pdf->Cell(148,7,$taxrate."% ".$_LANG["invoicestax"].":",1,0,'R','1');
$pdf->Cell(40,7,$currencysymbol.$tax,1,0,'C','1');
$pdf->Ln();
}
$pdf->Cell(148,7,$_LANG["invoicestotal"].":",1,0,'R','1');
$pdf->Cell(40,7,$currencysymbol.$total,1,0,'C','1');
$pdf->Ln();
$pdf->Ln();
?>