diff --git a/quote.php b/quote.php
index f20a8f38..696d730f 100644
--- a/quote.php
+++ b/quote.php
@@ -1,403 +1,402 @@
-
-
- 0) {
- while ($row = mysqli_fetch_array($products_sql)) {
- $products[] = $row;
+ $row = mysqli_fetch_array($sql);
+ $quote_id = $row['quote_id'];
+ $quote_prefix = htmlentities($row['quote_prefix']);
+ $quote_number = htmlentities($row['quote_number']);
+ $quote_scope = htmlentities($row['quote_scope']);
+ $quote_status = htmlentities($row['quote_status']);
+ $quote_date = $row['quote_date'];
+ $quote_amount = floatval($row['quote_amount']);
+ $quote_currency_code = htmlentities($row['quote_currency_code']);
+ $quote_note = htmlentities($row['quote_note']);
+ $quote_url_key = htmlentities($row['quote_url_key']);
+ $quote_created_at = $row['quote_created_at'];
+ $category_id = $row['quote_category_id'];
+ $client_id = $row['client_id'];
+ $client_name = htmlentities($row['client_name']);
+ $location_address = htmlentities($row['location_address']);
+ $location_city = htmlentities($row['location_city']);
+ $location_state = htmlentities($row['location_state']);
+ $location_zip = htmlentities($row['location_zip']);
+ $contact_email = htmlentities($row['contact_email']);
+ $contact_phone = formatPhoneNumber($row['contact_phone']);
+ $contact_extension = htmlentities($row['contact_extension']);
+ $contact_mobile = formatPhoneNumber($row['contact_mobile']);
+ $client_website = htmlentities($row['client_website']);
+ $client_currency_code = htmlentities($row['client_currency_code']);
+ $client_net_terms = htmlentities($row['client_net_terms']);
+ if ($client_net_terms == 0) {
+ $client_net_terms = $config_default_net_terms;
+ }
+ $company_id = $row['company_id'];
+ $company_name = htmlentities($row['company_name']);
+ $company_country = htmlentities($row['company_country']);
+ $company_address = htmlentities($row['company_address']);
+ $company_city = htmlentities($row['company_city']);
+ $company_state = htmlentities($row['company_state']);
+ $company_zip = htmlentities($row['company_zip']);
+ $company_phone = formatPhoneNumber($row['company_phone']);
+ $company_email = htmlentities($row['company_email']);
+ $company_website = htmlentities($row['company_website']);
+ $company_logo = htmlentities($row['company_logo']);
+ if (!empty($company_logo)) {
+ $company_logo_base64 = base64_encode(file_get_contents("uploads/settings/$company_id/$company_logo"));
}
- $json_products = json_encode($products);
- }
-?>
+ $sql_history = mysqli_query($mysqli,"SELECT * FROM history WHERE history_quote_id = $quote_id ORDER BY history_id DESC");
-
-
- Quotes
-
-
-
-
-
-
-
+ //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 == "Accepted") {
+ $quote_badge_color = "success";
+ }elseif ($quote_status == "Declined") {
+ $quote_badge_color = "danger";
+ }elseif ($quote_status == "Invoiced") {
+ $quote_badge_color = "info";
+ }else{
+ $quote_badge_color = "secondary";
+ }
-
-
+}
-
-
-
-
-
-
-
-
- Date
- Status
- Description
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -406,406 +405,406 @@ include("footer.php");