Updated Quote and Recurring to Automatically select the Tax based off the product tax

This commit is contained in:
johnnyq
2023-11-21 16:17:17 -05:00
parent 3ec2e79e91
commit 48177e4250
3 changed files with 6 additions and 4 deletions

View File

@@ -90,7 +90,7 @@ if (isset($_GET['quote_id'])) {
}
//Product autocomplete
$products_sql = mysqli_query($mysqli, "SELECT product_name AS label, product_description AS description, product_price AS price FROM products WHERE product_archived_at IS NULL");
$products_sql = mysqli_query($mysqli, "SELECT product_name AS label, product_description AS description, product_price AS price, product_tax_id AS tax FROM products WHERE product_archived_at IS NULL");
if (mysqli_num_rows($products_sql) > 0) {
while ($row = mysqli_fetch_array($products_sql)) {
@@ -537,6 +537,7 @@ require_once "footer.php";
$("#desc").val(ui.item.description); // Product description field
$("#qty").val(1); // Product quantity field automatically make it a 1
$("#price").val(ui.item.price); // Product price field
$("#tax").val(ui.item.tax); // Tax field
return false;
}
});