Changed first pass
This commit is contained in:
parent
566253e0f2
commit
79496865e9
|
|
@ -2,7 +2,7 @@
|
||||||
class QuotesController extends AppController {
|
class QuotesController extends AppController {
|
||||||
|
|
||||||
var $name = 'Quotes';
|
var $name = 'Quotes';
|
||||||
var $helpers = array('Html', 'Form','Ajax', 'Time', 'Number');
|
var $helpers = array('Html', 'Form', 'Time', 'Number');
|
||||||
|
|
||||||
var $components = array('RequestHandler');
|
var $components = array('RequestHandler');
|
||||||
|
|
||||||
|
|
|
||||||
14
vendors/shells/firstpass.php
vendored
14
vendors/shells/firstpass.php
vendored
|
|
@ -57,11 +57,11 @@ class FirstpassShell extends Shell {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while($number_of_messages > 0) {
|
||||||
|
|
||||||
|
|
||||||
// for($i=1; $i <= $number_of_messages; $i++) {
|
// for($i=1; $i <= $number_of_messages; $i++) {
|
||||||
for($i=1; $i <= 500; $i++) {
|
for($i=1; $i <= 100; $i++) {
|
||||||
$this_header = imap_headerinfo($mbox, $i);
|
$this_header = imap_headerinfo($mbox, $i);
|
||||||
$message = $this->getMessage($mbox, $i, $this_header);
|
$message = $this->getMessage($mbox, $i, $this_header);
|
||||||
|
|
||||||
|
|
@ -113,13 +113,17 @@ class FirstpassShell extends Shell {
|
||||||
|
|
||||||
imap_expunge($mbox);
|
imap_expunge($mbox);
|
||||||
|
|
||||||
/* echo "Messages before delete: ".$number_of_messages."\n";
|
echo "Messages before delete: ".$number_of_messages."\n";
|
||||||
|
|
||||||
|
|
||||||
$check = imap_check($mbox);
|
$check = imap_check($mbox);
|
||||||
|
|
||||||
echo "Messages after delete: ".$check->Nmsgs."\n";
|
echo "Messages after delete: ".$number_of_messages."\n";
|
||||||
*/
|
|
||||||
|
$number_of_messages = $check->Nmsgs;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
9
vendors/shells/vault.php
vendored
9
vendors/shells/vault.php
vendored
|
|
@ -32,8 +32,6 @@ class VaultShell extends Shell {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$mbox = imap_open("{192.168.0.8:143/novalidate-cert}INBOX", $username, $password) or die("can't connect: " . imap_last_error());
|
$mbox = imap_open("{192.168.0.8:143/novalidate-cert}INBOX", $username, $password) or die("can't connect: " . imap_last_error());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -66,7 +64,8 @@ class VaultShell extends Shell {
|
||||||
|
|
||||||
/* Loop through the messages and sort them into ones to be processed or discarded */
|
/* Loop through the messages and sort them into ones to be processed or discarded */
|
||||||
|
|
||||||
for($i=1; $i <= $number_of_messages; $i++) {
|
for($i=1; $i<100;$i++) {
|
||||||
|
//for($i=1; $i <= $number_of_messages; $i++) {
|
||||||
$this_header = imap_headerinfo($mbox, $i);
|
$this_header = imap_headerinfo($mbox, $i);
|
||||||
$message = $this->getMessage($mbox, $i, $this_header);
|
$message = $this->getMessage($mbox, $i, $this_header);
|
||||||
|
|
||||||
|
|
@ -81,7 +80,7 @@ class VaultShell extends Shell {
|
||||||
//Process it and store the message and its attachments.
|
//Process it and store the message and its attachments.
|
||||||
|
|
||||||
//Generate a Uniqid for this email.
|
//Generate a Uniqid for this email.
|
||||||
$uniqid = $this->getUniqId($email_dir);
|
// $uniqid = $this->getUniqId($email_dir);
|
||||||
|
|
||||||
$this->Email->create();
|
$this->Email->create();
|
||||||
$this->data['Email']['enquiry_id'] = $enqID;
|
$this->data['Email']['enquiry_id'] = $enqID;
|
||||||
|
|
@ -237,7 +236,7 @@ class VaultShell extends Shell {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function fetchBodyAttachments($mailbox, $msg_number, $email_dir, $uniqid, $ripmime_path) {
|
function fetchBodyAttachments($mailbox, $msg_number, $email_dir, $ripmime_path) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
25
vendors/xtcpdf.php
vendored
25
vendors/xtcpdf.php
vendored
|
|
@ -11,26 +11,7 @@ class XTCPDF extends TCPDF {
|
||||||
var $xfooterfont = PDF_FONT_NAME_MAIN ;
|
var $xfooterfont = PDF_FONT_NAME_MAIN ;
|
||||||
var $xfooterfontsize = 8 ;
|
var $xfooterfontsize = 8 ;
|
||||||
|
|
||||||
/* function header() {
|
|
||||||
$this->SetHeaderMargin(4);
|
|
||||||
$this->ln();
|
|
||||||
$pageNo = $this->PageNoFormatted();
|
|
||||||
$this->MultiCell(0, 0, "PAGE $pageNo OF {nb}", 0, "R", 0, 1);
|
|
||||||
|
|
||||||
// $this->MultiCell($w, $h, $txt, $border, $align, $fill, $ln, $x, $y, $reseth, $stretch, $ishtml)
|
|
||||||
//$this->MultiCell(0, 0, "<b>PRICING AND SPECIFICATIONS</b>", 0, 'C', 0, 1, null, null, true, 0, true);
|
|
||||||
$this->writeHTMLCell(0, 0, null, null, "<b>PRICING AND SPECIFICATIONS</b>", 0, 1, 0, true, 'C');
|
|
||||||
} */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Overwrites the default header
|
|
||||||
* set the text in the view using
|
|
||||||
* $fpdf->xheadertext = 'YOUR ORGANIZATION';
|
|
||||||
* set the fill color in the view using
|
|
||||||
* $fpdf->xheadercolor = array(0,0,100); (r, g, b)
|
|
||||||
* set the font in the view using
|
|
||||||
* $fpdf->setHeaderFont(array('YourFont','',fontsize));
|
|
||||||
*/
|
|
||||||
function Page1Header() {
|
function Page1Header() {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -387,15 +368,15 @@ class XTCPDF extends TCPDF {
|
||||||
if($product[$docType]['discount_percent'] != 0) {
|
if($product[$docType]['discount_percent'] != 0) {
|
||||||
|
|
||||||
|
|
||||||
|
$percentage = number_format($product[$docType]['discount_percent'], 2);
|
||||||
|
|
||||||
$unitPriceString = $this->formatCurrency($currency['symbol'], $product[$docType]['unit_price']);
|
$unitPriceString = $this->formatCurrency($currency['symbol'], $product[$docType]['unit_price']);
|
||||||
$unitPriceString .= "<br>less ".$product[$docType]['discount_percent']."% discount<br>(-"
|
$unitPriceString .= "<br>less ".$percentage."% discount<br>(-"
|
||||||
.$this->formatCurrency($currency['symbol'], $product[$docType]['discount_amount_each']).")<br>=<br>";
|
.$this->formatCurrency($currency['symbol'], $product[$docType]['discount_amount_each']).")<br>=<br>";
|
||||||
$unitPriceString .= $this->formatCurrency($currency['symbol'], $product[$docType]['net_price_each']);
|
$unitPriceString .= $this->formatCurrency($currency['symbol'], $product[$docType]['net_price_each']);
|
||||||
|
|
||||||
$totalPriceString = $this->formatCurrency($currency['symbol'], $product[$docType]['gross_price']);
|
$totalPriceString = $this->formatCurrency($currency['symbol'], $product[$docType]['gross_price']);
|
||||||
$totalPriceString .= "<br>less ".$product[$docType]['discount_percent']."% discount<br>(-"
|
$totalPriceString .= "<br>less ".$percentage."% discount<br>(-"
|
||||||
.$this->formatCurrency($currency['symbol'], $product[$docType]['total_discount_amount']).")<br>=<br>";
|
.$this->formatCurrency($currency['symbol'], $product[$docType]['total_discount_amount']).")<br>=<br>";
|
||||||
$totalPriceString .= $this->formatCurrency($currency['symbol'], $product[$docType]['net_price']);
|
$totalPriceString .= $this->formatCurrency($currency['symbol'], $product[$docType]['net_price']);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ $output_dir = '/Users/karlcordes/Sites/quotenik/app/webroot/pdf/';
|
||||||
$debuglevel = Configure::read('debug');
|
$debuglevel = Configure::read('debug');
|
||||||
|
|
||||||
if($debuglevel == 0) {
|
if($debuglevel == 0) {
|
||||||
$output_dir = '/var/www/cakephp/app/webroot/pdf/';
|
//$output_dir = '/var/www/cakephp/app/webroot/pdf/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue