diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 64f8fd92477..9ec2e04ee5c 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -374,8 +374,7 @@ if (empty($reshook)) $action = 'create'; } } - } elseif ($action == 'classin' && $user->rights->contrat->creer) - { + } elseif ($action == 'classin' && $user->rights->contrat->creer) { $object->setProject(GETPOST('projectid')); } diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index cf1d1793a88..0bb0db6afd1 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -81,7 +81,7 @@ function shipping_prepare_head($object) require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; - $upload_dir = $conf->commande->dir_output."/".dol_sanitizeFileName($object->ref); + $upload_dir = $conf->expedition->dir_output."/sending/".dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/expedition/document.php?id='.$object->id; diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index c6b10bd6967..d15e267b285 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -80,7 +80,9 @@ if ($action == 'addcontact' && $user->rights->expedition->creer) { if ($result > 0 && $id > 0) { - $result = $objectsrc->add_contact(GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'), $_POST["type"], $_POST["source"]); + $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); + $result = $objectsrc->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } if ($result >= 0) diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index eaae2438b55..4494db8c21d 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -340,7 +340,7 @@ if ($resql) if ($search_product_category != '') $param .= '&search_product_category='.urlencode($search_product_category); if ($search_categ_cus > 0) $param .= '&search_categ_cus='.urlencode($search_categ_cus); - if ($search_status != '') $param .= '&viewstatut='.urlencode($search_status); + if ($search_status != '') $param .= '&search_status='.urlencode($search_status); if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php index 908f7a441be..ad8811a4e1f 100644 --- a/htdocs/reception/contact.php +++ b/htdocs/reception/contact.php @@ -67,11 +67,6 @@ if ($id > 0 || !empty($ref)) $objectsrc = new CommandeFournisseur($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { - $objectsrc = new Propal($db); - $objectsrc->fetch($object->$typeobject->id); - } } @@ -83,7 +78,9 @@ if ($action == 'addcontact' && $user->rights->reception->creer) { if ($result > 0 && $id > 0) { - $result = $objectsrc->add_contact(GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'), $_POST["type"], $_POST["source"]); + $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); + $result = $objectsrc->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } if ($result >= 0) diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index ec08c7ba94a..30d31291a74 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -505,7 +505,7 @@ if ($resql) if ($search_town) $param .= "&search_town=".urlencode($search_town); if ($search_zip) $param .= "&search_zip=".urlencode($search_zip); if ($search_state) $param .= "&search_state=".urlencode($search_state); - if ($search_status) $param .= "&search_status=".urlencode($search_status); + if ($search_status != '') $param .= "&search_status=".urlencode($search_status); if ($search_country) $param .= "&search_country=".urlencode($search_country); if ($search_type_thirdparty) $param .= "&search_type_thirdparty=".urlencode($search_type_thirdparty); if ($search_ref_supplier) $param .= "&search_ref_supplier=".urlencode($search_ref_supplier);