diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index a2096c49f14..ae8afe696bc 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -276,15 +276,23 @@ if ($id > 0 || $ref) print ''.$langs->trans("Label").''.$product->libelle.''; print ''; - // Status (to sell) - print ''.$langs->trans("Status").' ('.$langs->trans("Sell").')'; - print $product->getLibStatut(2,0); - print ''; + // Status (to sell) + print ''.$langs->trans("Status").' ('.$langs->trans("Sell").')'; + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + print ajax_productonoff($product->id, 'status'); + } else { + print $product->getLibStatut(2,0); + } + print ''; - // Status (to buy) - print ''.$langs->trans("Status").' ('.$langs->trans("Buy").')'; - print $product->getLibStatut(2,1); - print ''; + // Status (to buy) + print ''.$langs->trans("Status").' ('.$langs->trans("Buy").')'; + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + print ajax_productonoff($product->id, 'status_buy'); + } else { + print $product->getLibStatut(2,1); + } + print ''; if ($conf->productbatch->enabled) { print ''.$langs->trans("Status").' ('.$langs->trans("l_sellby").')';