<?php
// +---------------------------------------------------------------------------------------+
// | TenderSystem                                                                          |
// +---------------------------------------------------------------------------------------+
// | The contents of this file are subject to the TenderSystem Public License Version 1.1  |
// | ("License"); you may not use this file except in compliance with the License. You may |
// | obtain a copy of the License at http://www.tendersystem.com/tpl/                      |
// |                                                                                       |
// | Software distributed under the License is distributed on an "AS IS" basis, WITHOUT    |
// | WARRANTY OF ANY KIND, either express or implied. See the License for the specific     |
// | language governing rights and limitations under the License.                          |
// |                                                                                       |
// | All copies of the Covered Code must include the "Powered by TenderSystem" logo and    |
// | ValueCard copyright notice on every user interface screen and in every outgoing       |
// | email in the same form as they appear in the distribution.                            |
// |                                                                                       |
// | The Original Code is: TenderSystem                                                    |
// | The Initial Developer of the Original Code is ValueCard (Pty) Limited.                |
// | Portions created by ValueCard are Copyright (C) 2002 ValueCard (Pty) Limited.         |
// | All Rights Reserved.                                                                  |
// | Contributor(s): __________________.                                                   |
// +---------------------------------------------------------------------------------------+

/**
* Quote changed template 
* @package TenderSystem
* @subpackage procure
* @copyright Copyright &copy; 2002, ValueCard (Pty) Ltd
* @license http://www.tendersystem.com/tpl/ TenderSystem Public License
* @version 
*/

$subject = $this->lang['tender_quote_change']." ".$this->lang['rfq'].": ".$tender['rfq_number']." (".$tender['rfq_reference'].")";
// authentication string
$html.= "<tr>";
$html.= "<td>";
$html.= $this->lang['dear']." ".$value['name'].",<br/><br/>";
$html.= $this->lang['receivingnotify']." <a href=\"mailto:".$extender['email']."?subject=".$subject."\">".$extender['name']." ".$extender['surname']."</a> ".$this->lang['changedquoteinfo'].": ".$tender['rfq_number'].".<br/><br/>";
if($info['message']) {
	$html.= $this->lang['message']." : ".$info['message']."<br/><br/>";
}

$html.= "<table width=\"100%\"  border=\"0\" cellpadding=\"2\" cellspacing=\"0\">";
$html.= "<tr>";
$html.= "<td class=\"h1 t1\" colspan=\"4\" align=\"left\">";
$html.= $this->lang['tenderinfo'];
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['rfq'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['rfq_number'];
$html.= "</td>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['closingtime'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['close_date']." ".$tender['close_time']." ".$cfg['local']['display'];
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['closingtime'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['close_date']." ".$tender['close_time']." ".$cfg['local']['display'];
$html.= "</td>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['email'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= "<a href=\"mailto:".$tender['email']."?subject=".$subject."\">";
$html.= $tender['name']." ".$tender['surname'];
$html.= "</a>";
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['location'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['statename']." : ".$tender['areaname'];
$html.= "</td>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['organisation'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['organisationname'];
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"h1 t1\" colspan=\"4\" align=\"left\">";
$html.= $this->lang['tenderiteminfo'];
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['tenderitemid'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['tenderitemid'];
$html.= "</td>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['category'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['categoryname']."/<br/>".$tender['category_subname'];
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['brand'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['brand'];
$html.= "</td>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['model'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['model'];
$html.= "</td>";
$html.= "</tr>";

if($tender['budget'] &&  $tender['budget'] != "0.00") {
	$html.= "<tr>";
	$html.= "<td class=\"t1\">";
	$html.= $this->lang['budget'];
	$html.= "</td>";
	$html.= "<td class=\"t2\">";
	$html.= $tender['budget'];
	$html.= "</td>";
	$html.= "<td class=\"t1\">";
	$html.= "</td>";
	$html.= "<td class=\"t2\">";
	$html.= "</td>";
	$html.= "</tr>";
} 

$html.= "<tr>";
$html.= "<td class=\"t1\" valign=\"top\">";
$html.= $this->lang['description'];
$html.= "</td>";
$html.= "<td colspan=\"3\" class=\"t2\">";
$html.= $tender['description'];
$html.= "</td>";
$html.= "</tr>";

$html.= "<td class=\"h1 t1\" colspan=\"4\" align=\"left\">";
$html.= $this->lang['tenderquoteinfo'];
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['tenderquoteid'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['id'];
$html.= "</td>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['validuntil'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
list($year,$month,$day) = sscanf(str_replace(array("-"," "),"", $tender['valid_until']),'%4s%2s%2s');
if($year && $month && $day && $year != "0000") {
	$date = date($cfg['date']['format'], mktime($hour,$minute,$second,$month,$day,$year));
} else {
	$date = $this->lang['dateunknown'];	
}
$html.= $date;
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['brand'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['brand'];
$html.= "</td>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['model'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['model'];
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['stock'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['stock']." Days";
$html.= "</td>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['price'];
$html.= "</td>";
$html.= "<td class=\"t2\">";
$html.= $tender['price'];
$html.= "</td>";
$html.= "</tr>";
$html.= "<tr>";
$html.= "<td class=\"t1\">";
$html.= $this->lang['description'];
$html.= "</td>";
$html.= "<td colspan=\"3\" class=\"t2\" valign=\"top\">";
$html.= $tender['description'];
$html.= "</td>";
$html.= "</tr>";

$html.= "</table><br/>";
// tell supplier to requote (if key == 0 then not supplier)
if($info['requote']) {
	$html.="<b>".$this->lang['note']."</b> ".$this->lang['requote']."<br/><br/>";
}
?>