navigation  interaction  search

 other resources

Changeset 391

Show
Ignore:
Timestamp:
05/13/08 16:51:49
Author:
brieb
Message:
  • Fixes #250 - Printing of multiple receipts.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phpbms/modules/bms/report/receipts_pdf.php

    r369 r391  
    136136                                        clients.lastname, 
    137137                                        clients.company, 
    138                                         clients.address1, 
    139                                         clients.address2, 
    140                                         clients.city, 
    141                                         clients.state, 
    142                                         clients.postalcode, 
    143                                         clients.country, 
     138                                        addresses.address1, 
     139                                        addresses.address2, 
     140                                        addresses.city, 
     141                                        addresses.state, 
     142                                        addresses.postalcode, 
     143                                        addresses.country, 
    144144                                        clients.homephone, 
    145145                                        clients.workphone, 
     
    154154                                FROM 
    155155                                        receipts INNER JOIN clients ON receipts.clientid = clients.id 
    156                                         INNER JOIN users ON receipts.modifiedby = users.id 
     156                                        INNER JOIN users ON receipts.modifiedby = users.id INNER JOIN 
     157                                        addresstorecord ON addresstorecord.tabledefid = 2 AND addresstorecord.primary = 1 
     158                                        AND addresstorecord.recordid = clients.id INNER JOIN addresses 
     159                                        ON addresstorecord.addressid = addresses.id 
    157160                                        LEFT JOIN paymentmethods ON receipts.paymentmethodid = paymentmethods.id"; 
    158161                                         
     
    561564                        $size = $pdf->paperwidth - $pdf->leftmargin - $pdf->rightmargin; 
    562565 
     566                        $tempTotalsinfo = $this->totalsinfo; 
     567 
    563568                        if($this->receiptrecord["remaining"]){ 
    564                          
     569 
    565570                                $this->totalsinfo[1]->size = 1; 
    566571                                $size -= 1; 
     
    577582                         
    578583                        $pdf->setStyle("header"); 
     584 
    579585                        foreach($this->totalsinfo as $column) 
    580586                                $pdf->Cell($column->size, 0.18, $column->title, 1, 0, $column->align, 1); 
     
    595601                        }//end foreach 
    596602 
    597                         $this->totalsinfo[1]->size = 0;                  
    598                          
     603                        if(isset($this->totalsinfo[1])) 
     604                                $this->totalsinfo[1]->size = 0;                  
     605                                                         
    599606                        $pdf->SetXY($pdf->leftmargin, $nextPos);                         
     607 
     608                        $this->totalsinfo = $tempTotalsinfo; 
    600609 
    601610                }//end method 
Copyright © 2006-2007 Kreotek, LLC. All Rights reserved.