diff --git a/user/invoice.php b/user/invoice.php
index bfab6a67..0867d6e6 100644
--- a/user/invoice.php
+++ b/user/invoice.php
@@ -161,7 +161,7 @@ if (isset($_GET['invoice_id'])) {
$invoice_badge_color = getInvoiceBadgeColor($invoice_status);
//Product autocomplete
- $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");
+ $products_sql = mysqli_query($mysqli, "SELECT product_name AS label, product_description AS description, product_price AS price, product_tax_id AS tax, product_id AS prod_id FROM products WHERE product_archived_at IS NULL");
if (mysqli_num_rows($products_sql) > 0) {
while ($row = mysqli_fetch_array($products_sql)) {
@@ -431,6 +431,7 @@ if (isset($_GET['invoice_id'])) {
$item_total = floatval($row['item_total']);
$item_created_at = nullable_htmlentities($row['item_created_at']);
$tax_id = intval($row['item_tax_id']);
+ $item_product_id = intval($row['item_product_id']);
$total_tax = $item_tax + $total_tax;
$sub_total = $item_price * $item_quantity + $sub_total;
?>
@@ -475,7 +476,8 @@ if (isset($_GET['invoice_id'])) {
?>
>