2){
$client_phone = substr($row['client_phone'],0,3)."-".substr($row['client_phone'],3,3)."-".substr($row['client_phone'],6,4);
}
$client_website = $row['client_website'];
$client_net_terms = $row['client_net_terms'];
if($client_net_terms == 0){
$client_net_terms = $config_default_net_terms;
}
$company_id = $row['company_id'];
$sql_company = mysqli_query($mysqli,"SELECT * FROM settings, companies WHERE settings.company_id = companies.company_id AND companies.company_id = $company_id");
$row = mysqli_fetch_array($sql_company);
$company_name = $row['company_name'];
$config_company_address = $row['config_company_address'];
$config_company_city = $row['config_company_city'];
$config_company_state = $row['config_company_state'];
$config_company_zip = $row['config_company_zip'];
$config_company_phone = $row['config_company_phone'];
if(strlen($config_company_phone)>2){
$config_company_phone = substr($row['config_company_phone'],0,3)."-".substr($row['config_company_phone'],3,3)."-".substr($row['config_company_phone'],6,4);
}
$config_company_email = $row['config_company_email'];
//Mark viewed in history
mysqli_query($mysqli,"INSERT INTO history SET history_date = CURDATE(), history_status = '$quote_status', history_description = 'Quote viewed', history_created_at = NOW(), quote_id = $quote_id, company_id = $company_id");
//Set Badge color based off of quote status
if($quote_status == "Sent"){
$quote_badge_color = "warning text-white";
}elseif($quote_status == "Viewed"){
$quote_badge_color = "primary";
}elseif($quote_status == "Approved"){
$quote_badge_color = "success";
}elseif($quote_status == "Cancelled"){
$quote_badge_color = "danger";
}else{
$quote_badge_color = "secondary";
}
?>
- Quote Number:
- Quote Date:
| Product |
Description |
Qty |
Price |
Tax |
Total |
|
|
|
$ |
$ |
$ |
| Subtotal |
$ |
0){ ?>
| Discount |
$ |
0){ ?>
| Tax |
$ |
| Total |
$ |