diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index fd92db95dfc..e08d148064b 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2422,7 +2422,7 @@ class ContratLigne extends CommonObjectLine $sql.= " p.ref as product_ref,"; $sql.= " p.label as product_label,"; $sql.= " p.description as product_desc,"; - $sql.= " p.type as product_type,"; + $sql.= " p.fk_product_type as product_type,"; $sql.= " t.description,"; $sql.= " t.date_commande,"; $sql.= " t.date_ouverture_prevue as date_ouverture_prevue,"; diff --git a/htdocs/product/class/api_product.class.php b/htdocs/product/class/api_product.class.php index 1e485fd6733..ae4ed46d30e 100644 --- a/htdocs/product/class/api_product.class.php +++ b/htdocs/product/class/api_product.class.php @@ -96,7 +96,7 @@ class ProductApi extends DolibarrApi * * @param int $mode Use this param to filter list (0 for all, 1 for only product, 2 for only service) * @param mixed $to_sell Filter products to sell (1) or not to sell (0) - * @param mixed $to_buy Filter products to nuy (1) or not to buy (0) + * @param mixed $to_buy Filter products to buy (1) or not to buy (0) * @param string $sortfield Sort field * @param string $sortorder Sort order * @param int $limit Limit for list @@ -124,7 +124,7 @@ class ProductApi extends DolibarrApi // Show product on sell if ($to_sell) $sql.= " AND p.to_sell = ".$db->escape($to_sell); // Show product on buy - if ($to_buy) $sql.= " AND p.to_nuy = ".$db->escape($to_nuy); + if ($to_buy) $sql.= " AND p.to_buy = ".$db->escape($to_buy); $nbtotalofrecords = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) @@ -176,7 +176,7 @@ class ProductApi extends DolibarrApi * @param int $mode Use this param to filter list (0 for all, 1 for only product, 2 for only service) * @param int $category Use this param to filter list by category * @param mixed $to_sell Filter products to sell (1) or not to sell (0) - * @param mixed $to_buy Filter products to nuy (1) or not to buy (0) + * @param mixed $to_buy Filter products to buy (1) or not to buy (0) * @param string $sortfield Sort field * @param string $sortorder Sort order * @param int $limit Limit for list @@ -209,7 +209,7 @@ class ProductApi extends DolibarrApi // Show product on sell if ($to_sell) $sql.= " AND p.to_sell = ".$db->escape($to_sell); // Show product on buy - if ($to_buy) $sql.= " AND p.to_nuy = ".$db->escape($to_nuy); + if ($to_buy) $sql.= " AND p.to_buy = ".$db->escape($to_buy); $nbtotalofrecords = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))