Changeset 697 for trunk/phpbms/modules
- Timestamp:
- 12/31/09 16:25:28 (2 years ago)
- Location:
- trunk/phpbms/modules/bms
- Files:
-
- 2 modified
-
include/invoices.php (modified) (10 diffs)
-
report/invoices_pdf_class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/bms/include/invoices.php
r689 r697 1212 1212 1213 1213 }//end method - insertRecord 1214 1214 1215 1215 /* 1216 1216 * function api_searchByClientUuid … … 1227 1227 * were encountered, or the original $requestData if there was an error 1228 1228 */ 1229 1229 1230 1230 function api_searchByClientUuid($requestData, $returnUuid = true) { 1231 1231 1232 1232 /** 1233 * check for required field 1233 * check for required field 1234 1234 */ 1235 1235 if(!isset($requestData["clientid"])){ … … 1237 1237 $response["message"] = "Data does not contain a key of 'clientid'."; 1238 1238 $response["details"] = $requestData; 1239 1239 1240 1240 return $response; 1241 1241 }//end if 1242 1242 1243 1243 /** 1244 * do sql search 1244 * do sql search 1245 1245 */ 1246 1246 $querystatement = " … … 1253 1253 `clientid` = '".mysql_real_escape_string($requestData["clientid"])."' 1254 1254 "; 1255 1255 1256 1256 if(isset($requestData["type"])) 1257 1257 $querystatement .= "AND `type` = '".mysql_real_escape_string($requestData["type"])."'"; 1258 1258 1259 1259 if(isset($requestData["startdate"])) 1260 1260 $querystatement .= "AND `creationdate` >= '".mysql_real_escape_string($requestData["startdate"])."'"; 1261 1261 1262 1262 if(isset($requestData["enddate"])) 1263 1263 $querystatement .= "AND `creationdate` <= '".mysql_real_escape_string($requestData["enddate"])."'"; 1264 1264 1265 1265 $queryresult = $this->db->query($querystatement); 1266 1266 1267 1267 /** 1268 * report findings 1268 * report findings 1269 1269 */ 1270 1270 $thereturn["details"] = array(); … … 1272 1272 $thereturn["type"] = "result"; 1273 1273 while($therecord = $this->db->fetchArray($queryresult)){ 1274 1274 1275 1275 if($returnUuid) 1276 1276 $thereturn["details"][] = $therecord["uuid"]; 1277 1277 else 1278 1278 $thereturn["details"][] = $therecord["id"]; 1279 1279 1280 1280 }//end while 1281 1281 1282 1282 return $thereturn; 1283 1283 1284 1284 }//end function --api_searchByClientUuid-- 1285 1285 … … 1459 1459 $this->db->setEncoding("latin1"); 1460 1460 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"); 1462 1463 1463 1464 $processed = 0; … … 1465 1466 foreach($this->idsArray as $id){ 1466 1467 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'); 1468 1469 1469 1470 if(!$useUuid) … … 1493 1494 1494 1495 1495 function email_quote($useUuid ){1496 function email_quote($useUuid = false){ 1496 1497 1497 1498 if(DEMO_ENABLED == "true") … … 1501 1502 1502 1503 $noOutput = true; 1504 require_once("report/report_class.php"); 1503 1505 include("modules/bms/report/invoices_pdf_class.php"); 1504 1506 include("modules/bms/report/invoices_pdfquote.php"); … … 1508 1510 foreach($this->idsArray as $id){ 1509 1511 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'); 1511 1513 1512 1514 if(!$useUuid) -
trunk/phpbms/modules/bms/report/invoices_pdf_class.php
r696 r697 789 789 $to = $this->invoicerecord["email"]; 790 790 $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" . 793 793 "The attachment requires Adobe Acrobat Reader to view. \n If you do not " . 794 794 "have Acrobat Reader, you can download it at http://www.adobe.com \n\n" . … … 815 815 $message .= "--{$mime_boundary}\n" . 816 816 "Content-Type: {application/pdf};\n" . 817 " name=\"".$this-> title.$this->invoicerecord["id"].".pdf\"\n" .817 " name=\"".$this->settings["reportTitle"].$this->invoicerecord["id"].".pdf\"\n" . 818 818 "Content-Disposition: attachment;\n" . 819 " filename=\"".$this-> title.$this->invoicerecord["id"].".pdf\"\n" .819 " filename=\"".$this->settings["reportTitle"].$this->invoicerecord["id"].".pdf\"\n" . 820 820 "Content-Transfer-Encoding: base64\n\n" . 821 821 $pdf . "\n\n" .