Fixed line height in details box

This commit is contained in:
Karl Cordes 2011-06-16 15:05:34 +10:00
parent f3037ac37e
commit 3a39d5ba63
4 changed files with 38 additions and 20 deletions

39
vendors/pdfdoc.php vendored
View file

@ -118,11 +118,11 @@ ENDHTML;
$this->MultiCell($firstColWidth, $lineHeight*$heightNeeded, "$docTypeFullName TO:", 'LTR', 'L', 0, 0);
$this->MultiCell($secondColWidth, $lineHeight*$heightNeeded, $companyName, 'LTR', 'L', 0, 0);
$this->MultiCell($firstColWidth, 0, "$docTypeFullName TO:", 'LTR', 'L', 0, 0);
$this->MultiCell($secondColWidth, 0, $companyName, 'LTR', 'L', 0, 0);
$this->MultiCell($thirdColWidth, $lineHeight*$heightNeeded, "FROM:", 'LT', 'L', 0, 0);
$this->MultiCell($fourthColWidth, $lineHeight*$heightNeeded, "<a href=\"mailto:$fromEmail\">$fromName</a>", 'TR', 'L', false, 1, null,null, true,0,true, false, 0, null, false); //Start a new line after this.
$this->MultiCell($thirdColWidth, 0, "FROM:", 'LT', 'L', 0, 0);
$this->MultiCell($fourthColWidth, 0, "<a href=\"mailto:$fromEmail\">$fromName</a>", 'TR', 'L', false, 1, null,null, true,0,true, false, 0, null, false); //Start a new line after this.
$this->MultiCell($firstColWidth, 0, "EMAIL TO:", 'LR', 'L', 0, 0);
@ -160,22 +160,41 @@ ENDHTML;
$table = <<<ENDTABLE
<table border="1" cellpadding="1">
<tr style="border:">
<td>QUOTATION TO:</td>
<td>{$companyName}</td>
<table border="1" cellspacing="0" cellpadding="2">
<tr>
<td rowspan="3">QUOTATION TO:<br />EMAIL TO:<br />ATTENTION:</td>
<td rowspan="3">{$companyName}</td>
<td>FROM:</td>
<td><a href="mailto:{$fromEmail}">{$fromName}</a></td>
</tr>
<tr>
<td>EMAIL</td>
<td>WTF?</td>
<td>RAH</td>
</tr>
<tr>
<td>EMAIL</td>
<td>WTF?</td>
<td>RAH</td>
</tr>
</table>
ENDTABLE;
$this->SetTextColor(0); //Black Text
$this->writeHTMLCell(0, 0, null, null, $table, null, 1, null, true, 'L', false);
$this->writeHTMLCell(0, 0, null, null, $table, null, 1, null, true, 'L', false);
$this->SetFontSize(7);
//Kinda lame that I cant seem to wrap this text nicer. But Whatever.
$this->MultiCell(0, 0, 'The information in this document is confidential and may be privileged. If you are not the indended recipient then access, disclosure, copying or other dissemination of the contents of t his message is unauthorised and may be unlawful. Please inform the sender immediately if you are not the intended addressee.',
'', 'L', false, 1
);
$this->writeHTMLCell(0, 0, null, null, '<br><hr>', 0, 1, false,true, 'C', false);
}

View file

@ -18,6 +18,7 @@
</tr>
<? endforeach;?>
</table>
<p></p>
<p>If you have any further queries, please contact us at our office for assistance.</p>
<p>We look forward to your reply.</p>

View file

@ -38,10 +38,10 @@ foreach($document['DocPage'] as $page) {
$pdfdoc->DetailsBox($docTypeFullName, $companyName, $emailTo, $attention, $fromName,
$fromEmail, $enquiryNumber, $your_reference, $issue_date);
/* $pdfdoc->DetailsBoxHTML($docTypeFullName, $companyName, $emailTo, $attention, $fromName,
$fromEmail, $enquiryNumber, $your_reference, $issue_date);
*/
/*$pdfdoc->DetailsBoxHTML($docTypeFullName, $companyName, $emailTo, $attention, $fromName,
$fromEmail, $enquiryNumber, $your_reference, $issue_date);*/
$firstPageDone = true;
}

View file

@ -51,16 +51,14 @@
</td>
</tr>
<?endforeach;?>
<tr>
<tr nobr="true">
<td width="<?=$colWidths['item'];?>"></td>
<td width="<?=$colWidths['qty'];?>"></td>
<td width="<?=$colWidths['desc'];?>"><?=$totalsDescText['subtotal']?></td>
<td width="<?=$colWidths['unit'];?>"></td>
<td width="<?=$colWidths['total'];?>" align="center"><?=$number->currency($totals['subtotal'], $currencyCode);?></td>
</tr>
<tr>
<tr nobr="true">
<td width="<?=$colWidths['item'];?>"></td>
<td width="<?=$colWidths['qty'];?>"></td>
<td width="<?=$colWidths['desc'];?>"><?=$totalsDescText['gst'];?></td>
@ -74,12 +72,12 @@
}?>
</td>
</tr>
<tr>
<tr nobr="true">
<td width="<?=$colWidths['item'];?>"></td>
<td width="<?=$colWidths['qty'];?>"></td>
<td width="<?=$colWidths['desc'];?>"><?=$totalsDescText['total'];?></td>
<td width="<?=$colWidths['unit'];?>" align="center"><?=$currencyCode?></td>
<td width="<?=$colWidths['total'];?>" align="center"><?=$number->currency($totals['total'], $currencyCode);?></td>
</tr>
</tbody>
</tbody>
</table>