Revert "FIX when using THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT and direct link New prospect, New Customer or New Supplier (#34702)"
This reverts commit 870979362e.
This commit is contained in:
parent
db3a5cfbef
commit
1515adf313
1 changed files with 7 additions and 3 deletions
|
|
@ -1032,7 +1032,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
}
|
||||
// Prospect / Customer
|
||||
if (GETPOST("type", 'aZ') == 'c') {
|
||||
$object->client = 1;
|
||||
if (getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) {
|
||||
$object->client = getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT');
|
||||
} else {
|
||||
$object->client = 3;
|
||||
}
|
||||
}
|
||||
if (GETPOST("type", 'aZ') == 'p') {
|
||||
$object->client = 2;
|
||||
|
|
@ -1445,8 +1449,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
|
||||
// Prospect/Customer/Supplier
|
||||
$selected = $object->client;
|
||||
$selectedcustomer = ((getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==1 && GETPOST("type", 'aZ') != 'p' && GETPOST("type", 'aZ') != 'f') || (getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==3 && GETPOST("type", 'aZ') != 'p' && GETPOST("type", 'aZ') != 'f') ? 1 : 0);
|
||||
$selectedprospect = ((getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==2 && GETPOST("type", 'aZ') != 'c' && GETPOST("type", 'aZ') != 'f') || (getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==3 && GETPOST("type", 'aZ') != 'c' && GETPOST("type", 'aZ') != 'f') ? 1 : 0);
|
||||
$selectedcustomer = (getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==1 || getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==3 ? 1 : 0);
|
||||
$selectedprospect = (getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==2 || getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==3 ? 1 : 0);
|
||||
switch ($selected) {
|
||||
case 1:
|
||||
$selectedcustomer = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue