From db001411c422ea120f20cb5ef27da7f1821ff53c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 21 Sep 2011 22:32:11 +0000 Subject: [PATCH] Fix: Revert patch: Dolibarr must do what user setup to do. If user asked to not decrease stock or to decrease on order, Dolibarr must not force decrease on other event that the one decided by user. So i added a hidden option for people who want to have dolibarr doing the opposite than setup ask to do (I add this option, but who want that ?). --- htdocs/cashdesk/include/environnement.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/htdocs/cashdesk/include/environnement.php b/htdocs/cashdesk/include/environnement.php index b4912dc03eb..2e2946e9fca 100644 --- a/htdocs/cashdesk/include/environnement.php +++ b/htdocs/cashdesk/include/environnement.php @@ -1,7 +1,7 @@ - * Copyright (C) 2009-2010 Laurent Destailleur - * Copyright (C) 2011 Juanjo Menent +/* Copyright (C) 2007-2008 Jeremie Ollivier + * Copyright (C) 2009-2011 Laurent Destailleur + * Copyright (C) 2011 Juanjo Menent * * 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 @@ -42,12 +42,11 @@ $conf_fkaccount_cb = (! empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]))?$_SESSIO //var_dump($_SESSION); -// Parametres d'affichage +// View parameters $conf_taille_listes = (empty($conf->global->PRODUIT_LIMIT_SIZE)?500:$conf->global->PRODUIT_LIMIT_SIZE); // Nombre max de lignes a afficher dans les listes $conf_nbr_car_listes = 60; // Nombre max de caracteres par ligne dans les listes -// Aurélien Imhof: Force decremente stock sur validation facture, quelque soit mode configuré -if(!isset($conf->global->STOCK_CALCULATE_ON_BILL)) -$conf->global->STOCK_CALCULATE_ON_BILL = 1 ; +// Add hidden option to force decrease of stock whatever is user setup +if (! empty($conf->global->CASHDESK_FORCE_STOCK_ON_BILL)) $conf->global->STOCK_CALCULATE_ON_BILL=1; ?>