Skip to content
Snippets Groups Projects
Commit 22fdcfc2 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.7

parents 0622b3ad 06c90e67
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,16 @@ if (! empty($conf->stock->enabled))
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskDoNotDecreaseStock").'</td>'; // Force warehouse (this is not a default value)
print '<td colspan="2">';
print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1);
if (empty($conf->productbatch->enabled)) {
print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1);
}
else
{
if (!$conf->global->CASHDESK_NO_DECREASE_STOCK) {
$res = dolibarr_set_const($db,"CASHDESK_NO_DECREASE_STOCK",1,'chaine',0,'',$conf->entity);
}
print $langs->trans('StockDecreaseForPointOfSaleDisabledbyBatch');
}
print '</td></tr>';
$disabled=$conf->global->CASHDESK_NO_DECREASE_STOCK;
......
......@@ -112,8 +112,16 @@ class modProductBatch extends DolibarrModules
*/
function init($options='')
{
global $db,$conf;
$sql = array();
if(! empty($conf->cashdesk->enabled)) {
if (!$conf->global->CASHDESK_NO_DECREASE_STOCK) {
$res = dolibarr_set_const($db,"CASHDESK_NO_DECREASE_STOCK",1,'chaine',0,'',$conf->entity);
}
}
return $this->_init($sql, $options);
}
......
......@@ -1494,6 +1494,7 @@ CashDeskBankAccountForCB= Default account to use to receive payments by credit c
CashDeskDoNotDecreaseStock=Disable stock decrease when a sell is done from Point of Sale
CashDeskIdWareHouse=Force and restrict warehouse to use for stock decrease
StockDecreaseForPointOfSaleDisabled=Stock decrease from Point Of Sale disabled
StockDecreaseForPointOfSaleDisabledbyBatch=Stock decrease in POS is not compatible with batch management
CashDeskYouDidNotDisableStockDecease=You did not disable stock decrease when making a sell from Point Of Sale. So a warehouse is required.
##### Bookmark #####
BookmarkSetup=Bookmark module setup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment