diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 0307c4aed5e..527b457c287 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -8,12 +8,12 @@ * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2013-2014 Marcos García * Copyright (C) 2012-2013 Cédric Salvador - * Copyright (C) 2011-2015 Alexandre Spangaro + * Copyright (C) 2011-2016 Alexandre Spangaro * Copyright (C) 2014 Cédric Gross * Copyright (C) 2014-2015 Ferran Marcet * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2016 Charlie Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1482,8 +1482,12 @@ else print ''; print ''; print ''; - print length_accountg($object->accountancy_code_sell); - print ''; + if (! empty($conf->accounting->enabled)) { + print length_accountg($object->accountancy_code_sell); + } else { + print $object->accountancy_code_sell; + } + print ''; // Accountancy buy code print ''; @@ -1492,7 +1496,11 @@ else print ''; print ''; print ''; - print length_accountg($object->accountancy_code_buy); + if (! empty($conf->accounting->enabled)) { + print length_accountg($object->accountancy_code_buy); + } else { + print $object->accountancy_code_buy; + } print ''; // Status (to sell)