Considering refactoring the Document generation

This commit is contained in:
Karl Cordes 2010-06-23 14:16:46 +10:00
parent a996f6308e
commit 86d91f0a63
3 changed files with 17 additions and 10 deletions

View file

@ -117,10 +117,12 @@ class FirstpassShell extends Shell {
$check = imap_check($mbox);
$number_of_messages = $check->Nmsgs;
echo "Messages after delete: ".$number_of_messages."\n";
$number_of_messages = $check->Nmsgs;
// }

View file

@ -236,7 +236,7 @@ class VaultShell extends Shell {
*
*/
function fetchBodyAttachments($mailbox, $msg_number, $email_dir, $ripmime_path) {
function fetchBodyAttachments($mailbox, $msg_number, $email_dir, $uniqid, $ripmime_path) {

19
vendors/xtcpdf.php vendored
View file

@ -181,7 +181,7 @@ class XTCPDF extends TCPDF {
//$availableHeight = 253;
$availableHeight = 320;
$availableHeight = 230;
$heightLeft = $availableHeight; //height left on this particular page.
@ -240,18 +240,24 @@ class XTCPDF extends TCPDF {
//echo "Currently have $heightLeft Comm details height is ".$commDetailsHeight." totals height is: ".$totalsHeight."<br>";
$heightLeft -= $totalsHeight;
if($heightLeft - $totalsHeight <= 0) {
if($heightLeft <= 0) {
// echo "<br>Need a new page for last item and totals";
array_pop($pageProducts[$pagesRequired]);
//array_pop($pageProducts[$pagesRequired]);
$pagesRequired++;
$heightLeft = $availableHeight;
$heightLeft -= $totalsHeight;
$pageProducts[$pagesRequired][] = $product[$docType]['id'];
//$pageProducts[$pagesRequired][] = $product[$docType]['id'];
}
if($heightLeft - $commDetailsHeight <= 0) {
echo "Height left before commDetails is:".$heightLeft;
echo "Comm Details Height is:".$commDetailsHeight;
$heightLeft -= $commDetailsHeight;
echo "Heigh Left is now:".$heightLeft;
if($heightLeft <= 0) {
$pagesRequired++;
}
@ -294,7 +300,6 @@ class XTCPDF extends TCPDF {
$options = 0; //Toggled to 1 when we encounter an Optional product. Stops the totals being printed.
echo "FUCK";
print_r($principlesList[0]);
foreach ($pageProducts as $page) {