From ba9d2c3690e4c5f65fc3ca35f9930200ea15ac46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 23 Oct 2014 11:02:16 +0200 Subject: [PATCH] Update card.php --- htdocs/product/card.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 889c782808b..9f2f0685beb 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1436,12 +1436,16 @@ else } print ''; - // Batch number management (to batch) - if ($conf->productbatch->enabled) { - print ''.$langs->trans("Status").' ('.$langs->trans("Lot").')'; - print $object->getLibStatut(2,2); - print ''; - } + // Batch number management (to batch) + if ($conf->productbatch->enabled) { + print ''.$langs->trans("Status").' ('.$langs->trans("Lot").')'; + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch'); + } else { + print $object->getLibStatut(2,2); + } + print ''; + } // Description print ''.$langs->trans("Description").''.(dol_textishtml($object->description)?$object->description:dol_nl2br($object->description,1,true)).'';