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 ?).
This commit is contained in:
Laurent Destailleur 2011-09-21 22:32:11 +00:00
parent 0a68db4da2
commit db001411c4

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net> /* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
* Copyright (C) 2009-2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2009-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -42,12 +42,11 @@ $conf_fkaccount_cb = (! empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]))?$_SESSIO
//var_dump($_SESSION); //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_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 $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é // Add hidden option to force decrease of stock whatever is user setup
if(!isset($conf->global->STOCK_CALCULATE_ON_BILL)) if (! empty($conf->global->CASHDESK_FORCE_STOCK_ON_BILL)) $conf->global->STOCK_CALCULATE_ON_BILL=1;
$conf->global->STOCK_CALCULATE_ON_BILL = 1 ;
?> ?>