phpBMS

Changeset 697

Show
Ignore:
Timestamp:
12/31/09 16:25:28 (2 years ago)
Author:
brieb
Message:
  • fixed e-mailing of PDF invoice and quotes
Location:
trunk/phpbms/modules/bms
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/bms/include/invoices.php

    r689 r697  
    12121212 
    12131213                }//end method - insertRecord 
    1214                  
     1214 
    12151215                /* 
    12161216                 * function api_searchByClientUuid 
     
    12271227                 * were encountered, or the original $requestData if there was an error 
    12281228                 */ 
    1229                  
     1229 
    12301230                function api_searchByClientUuid($requestData, $returnUuid = true) { 
    1231                          
     1231 
    12321232                        /** 
    1233                           *  check for required field  
     1233                          *  check for required field 
    12341234                          */ 
    12351235                        if(!isset($requestData["clientid"])){ 
     
    12371237                                $response["message"] = "Data does not contain a key of 'clientid'."; 
    12381238                                $response["details"] = $requestData; 
    1239                                  
     1239 
    12401240                                return $response; 
    12411241                        }//end if 
    1242                          
     1242 
    12431243                        /** 
    1244                           *  do sql search  
     1244                          *  do sql search 
    12451245                          */ 
    12461246                        $querystatement = " 
     
    12531253                                        `clientid` = '".mysql_real_escape_string($requestData["clientid"])."' 
    12541254                        "; 
    1255                          
     1255 
    12561256                        if(isset($requestData["type"])) 
    12571257                                $querystatement .= "AND `type` = '".mysql_real_escape_string($requestData["type"])."'"; 
    1258                          
     1258 
    12591259                        if(isset($requestData["startdate"])) 
    12601260                                $querystatement .= "AND `creationdate` >= '".mysql_real_escape_string($requestData["startdate"])."'"; 
    1261                                  
     1261 
    12621262                        if(isset($requestData["enddate"])) 
    12631263                                $querystatement .= "AND `creationdate` <= '".mysql_real_escape_string($requestData["enddate"])."'"; 
    1264                          
     1264 
    12651265                        $queryresult = $this->db->query($querystatement); 
    1266                          
     1266 
    12671267                        /** 
    1268                           *  report findings  
     1268                          *  report findings 
    12691269                          */ 
    12701270                        $thereturn["details"] = array(); 
     
    12721272                        $thereturn["type"] = "result"; 
    12731273                        while($therecord = $this->db->fetchArray($queryresult)){ 
    1274                                  
     1274 
    12751275                                if($returnUuid) 
    12761276                                        $thereturn["details"][] = $therecord["uuid"]; 
    12771277                                else 
    12781278                                        $thereturn["details"][] = $therecord["id"]; 
    1279                                  
     1279 
    12801280                        }//end while 
    1281                          
     1281 
    12821282                        return $thereturn; 
    1283                          
     1283 
    12841284                }//end function --api_searchByClientUuid-- 
    12851285 
     
    14591459                                $this->db->setEncoding("latin1"); 
    14601460 
    1461                                 include("modules/bms/report/invoices_pdf_class.php"); 
     1461                                require_once("report/report_class.php"); 
     1462                                include("modules/bms/report/invoices_pdf_class.php"); 
    14621463 
    14631464                                $processed = 0; 
     
    14651466                                foreach($this->idsArray as $id){ 
    14661467 
    1467                                         $report = new invoicePDF($this->db, 'P', 'in', 'Letter'); 
     1468                                        $report = new invoicePDF($this->db, 'rpt:44b21461-6e67-c284-0ccf-36ab1af47c9b', 'tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883', 'P', 'in', 'Letter'); 
    14681469 
    14691470                                        if(!$useUuid) 
     
    14931494 
    14941495 
    1495                 function email_quote($useUuid){ 
     1496                function email_quote($useUuid = false){ 
    14961497 
    14971498                                if(DEMO_ENABLED == "true") 
     
    15011502 
    15021503                                $noOutput = true; 
     1504                                require_once("report/report_class.php"); 
    15031505                                include("modules/bms/report/invoices_pdf_class.php"); 
    15041506                                include("modules/bms/report/invoices_pdfquote.php"); 
     
    15081510                                foreach($this->idsArray as $id){ 
    15091511 
    1510                                         $report = new quotePDF($this->db, 'P', 'in', 'Letter'); 
     1512                                        $report = new quotePDF($this->db, 'rpt:44b21461-6e67-c284-0ccf-36ab1af47c9b', 'tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883', 'P', 'in', 'Letter'); 
    15111513 
    15121514                                        if(!$useUuid) 
  • trunk/phpbms/modules/bms/report/invoices_pdf_class.php

    r696 r697  
    789789                            $to =               $this->invoicerecord["email"]; 
    790790                            $from =     $userinfo["email"]; 
    791                             $subject =  "Your ".$this->title." from ".COMPANY_NAME; 
    792                             $message =  "Attached is your ".$this->title." from ".COMPANY_NAME."\n\n" . 
     791                            $subject =  "Your ".$this->settings["reportTitle"]." from ".COMPANY_NAME; 
     792                            $message =  "Attached is your ".$this->settings["reportTitle"]." from ".COMPANY_NAME."\n\n" . 
    793793                                                    "The attachment requires Adobe Acrobat Reader to view. \n If you do not " . 
    794794                                                    "have Acrobat Reader, you can download it at http://www.adobe.com  \n\n" . 
     
    815815                            $message .= "--{$mime_boundary}\n" . 
    816816                                             "Content-Type: {application/pdf};\n" . 
    817                                              " name=\"".$this->title.$this->invoicerecord["id"].".pdf\"\n" . 
     817                                             " name=\"".$this->settings["reportTitle"].$this->invoicerecord["id"].".pdf\"\n" . 
    818818                                             "Content-Disposition: attachment;\n" . 
    819                                              " filename=\"".$this->title.$this->invoicerecord["id"].".pdf\"\n" . 
     819                                             " filename=\"".$this->settings["reportTitle"].$this->invoicerecord["id"].".pdf\"\n" . 
    820820                                             "Content-Transfer-Encoding: base64\n\n" . 
    821821                                             $pdf . "\n\n" . 
Scanned by Orvant Copyright © 2010 Kreotek, LLC. All Rights reserved.