Fix option SOCIETE_ASK_FOR_WAREHOUSE
This commit is contained in:
parent
4327d53c60
commit
743474513b
@ -866,6 +866,11 @@ if (empty($reshook)) {
|
|||||||
$result = $object->setSalesRep(GETPOST('commercial', 'array'));
|
$result = $object->setSalesRep(GETPOST('commercial', 'array'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// warehouse
|
||||||
|
if ($action == 'setwarehouse' && $user->rights->societe->creer) {
|
||||||
|
$result = $object->setWarehouse(GETPOST('fk_warehouse', 'int'));
|
||||||
|
}
|
||||||
|
|
||||||
$id = $socid;
|
$id = $socid;
|
||||||
$object->fetch($socid);
|
$object->fetch($socid);
|
||||||
|
|
||||||
@ -2664,6 +2669,24 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
print '<tr><td>'.$langs->trans("Workforce").'</td><td>'.$object->effectif.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Workforce").'</td><td>'.$object->effectif.'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Warehouse
|
||||||
|
if (!empty($conf->stock->enabled) && !empty($conf->global->SOCIETE_ASK_FOR_WAREHOUSE)) {
|
||||||
|
$langs->load('stocks');
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||||
|
$formproduct = new FormProduct($db);
|
||||||
|
print '<tr class="nowrap">';
|
||||||
|
print '<td>';
|
||||||
|
print $form->editfieldkey("Warehouse", 'warehouse', '', $object, $user->rights->societe->creer);
|
||||||
|
print '</td><td>';
|
||||||
|
if ($action == 'editwarehouse') {
|
||||||
|
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_warehouse, 'fk_warehouse', 1);
|
||||||
|
} else {
|
||||||
|
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_warehouse, 'none');
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user