diff --git a/htdocs/core/modules/modProductBatch.class.php b/htdocs/core/modules/modProductBatch.class.php index 5557104c7f6..ed38edd5250 100644 --- a/htdocs/core/modules/modProductBatch.class.php +++ b/htdocs/core/modules/modProductBatch.class.php @@ -118,8 +118,9 @@ class modProductBatch extends DolibarrModules $sql = array(); - if(! empty($conf->cashdesk->enabled)) { - if (!$conf->global->CASHDESK_NO_DECREASE_STOCK) { + if (! empty($conf->cashdesk->enabled)) { + if (empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $res = dolibarr_set_const($db,"CASHDESK_NO_DECREASE_STOCK",1,'chaine',0,'',$conf->entity); } } diff --git a/test/phpunit/ModulesTest.php b/test/phpunit/ModulesTest.php index 9210ae1a46a..37fff3cc924 100755 --- a/test/phpunit/ModulesTest.php +++ b/test/phpunit/ModulesTest.php @@ -130,10 +130,10 @@ class ModulesTest extends PHPUnit_Framework_TestCase $modulelist=array('Accounting','Adherent','Agenda','Banque','Barcode','Bookmark', 'CashDesk','Categorie','ClickToDial','Commande','Comptabilite','Contrat','Cron','Deplacement','DocumentGeneration','Don','DynamicPrices', 'ECM','Expedition','Export','ExternalRss','ExternalSite', - 'Facture','Fckeditor','Ficheinter','Fournisseur','FTP','GeoIPMaxmind','Gravatar','Holiday','Import','Label','Ldap', + 'Facture','Fckeditor','Ficheinter','Fournisseur','FTP','GeoIPMaxmind','Gravatar','Holiday','HRM','Import','Incoterm','Label','Ldap','Loan', 'Mailing','MailmanSpip','Margin', - 'Notification','OpenSurvey','Paybox','Paypal','Prelevement','Product','ProductBatch','Projet','Propale', - 'Salaries','Service','Skype','Societe','Stock','WebServicesClient','Syslog','Tax','User','WebServices','Workflow'); + 'Notification','Oauth','OpenSurvey','Paybox','Paypal','Prelevement','Product','ProductBatch','Projet','Propale','ReceiptPrinter','Resource', + 'Salaries','Service','Skype','Societe','Stock','SupplierProposal','Syslog','Tax','User','WebServices','WebServicesClient','Websites','Workflow'); foreach($modulelist as $modlabel) { require_once(DOL_DOCUMENT_ROOT.'/core/modules/mod'.$modlabel.'.class.php');