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

Conflicts:
	htdocs/comm/propal/list.php
	htdocs/commande/list.php
	htdocs/societe/card.php
This commit is contained in:
Laurent Destailleur 2018-05-25 15:02:24 +02:00
commit 182abfdb5b
8 changed files with 47 additions and 30 deletions

View File

@ -202,9 +202,9 @@ class AccountingAccount extends CommonObject
$sql .= ", " . (empty($this->pcg_type) ? 'NULL' : "'" . $this->db->escape($this->pcg_type) . "'");
$sql .= ", " . (empty($this->pcg_subtype) ? 'NULL' : "'" . $this->db->escape($this->pcg_subtype) . "'");
$sql .= ", " . (empty($this->account_number) ? 'NULL' : "'" . $this->db->escape($this->account_number) . "'");
$sql .= ", " . (empty($this->account_parent) ? 'NULL' : "'" . $this->db->escape($this->account_parent) . "'");
$sql .= ", " . (empty($this->account_parent) ? '0' : "'" . $this->db->escape($this->account_parent) . "'");
$sql .= ", " . (empty($this->label) ? 'NULL' : "'" . $this->db->escape($this->label) . "'");
$sql .= ", " . (empty($this->account_category) ? '0' : $this->db->escape($this->account_category));
$sql .= ", " . (empty($this->account_category) ? 0 : $this->db->escape($this->account_category));
$sql .= ", " . $user->id;
$sql .= ", " . (! isset($this->active) ? 'NULL' : $this->db->escape($this->active));
$sql .= ")";

View File

@ -441,8 +441,8 @@ if ($resql)
if ($search_zip) $param.='&search_zip='.urlencode($search_zip);
if ($socid > 0) $param.='&socid='.urlencode($socid);
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
if ($search_categ_cus > 0) $param.='&search_categ_cus='.urlencode($search_categ_cus);
if ($search_categ_cus > 0) $param.='&search_categ_cus='.urlencode($search_categ_cus);
if ($search_product_category != '') $param.='&search_product_category='.$search_product_category;
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';

View File

@ -210,7 +210,7 @@ if (empty($reshook))
$uploaddir = $conf->commande->dir_output;
$trigger_name='ORDER_SENTBYMAIL';
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
@ -397,6 +397,7 @@ if ($resql)
$arrayofselected=is_array($toselect)?$toselect:array();
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($sall) $param.='&sall='.urlencode($sall);
@ -414,13 +415,19 @@ if ($resql)
if ($search_user > 0) $param.='&search_user='.urlencode($search_user);
if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale);
if ($search_total_ht != '') $param.='&search_total_ht='.urlencode($search_total_ht);
if ($search_total_vat != '') $param.='&search_total_vat='.urlencode($search_total_vat);
if ($search_total_ttc != '') $param.='&search_total_ttc='.urlencode($search_total_ttc);
if ($search_project_ref >= 0) $param.="&search_project_ref=".urlencode($search_project_ref);
if ($search_total_vat != '') $param.='&search_total_vat='.urlencode($search_total_vat);
if ($search_total_ttc != '') $param.='&search_total_ttc='.urlencode($search_total_ttc);
if ($search_project_ref >= 0) $param.="&search_project_ref=".urlencode($search_project_ref);
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_country != '') $param.='&search_country='.urlencode($search_country);
if ($search_type_thirdparty != '') $param.='&search_type_thirdparty='.urlencode($search_type_thirdparty);
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 ($show_files) $param.='&show_files=' .urlencode($show_files);
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
if ($billed != '') $param.='&billed='.urlencode($billed);
if ($search_categ_cus > 0) $param.='&search_categ_cus='.urlencode($search_categ_cus);
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';

View File

@ -189,13 +189,16 @@ if (empty($reshook))
$qualified_for_stock_change = $object->hasProductsOrServices(1);
}
$result = $object->delete($user, 0, $idwarehouse);
if ($result > 0) {
header('Location: ' . DOL_URL_ROOT . '/compta/facture/list.php?restore_lastsearch_values=1');
exit();
} else {
setEventMessages($object->error, $object->errors, 'errors');
$action='';
if ($object->is_erasable())
{
$result = $object->delete($user, 0, $idwarehouse);
if ($result > 0) {
header('Location: ' . DOL_URL_ROOT . '/compta/facture/list.php?restore_lastsearch_values=1');
exit();
} else {
setEventMessages($object->error, $object->errors, 'errors');
$action='';
}
}
}

View File

@ -562,6 +562,8 @@ if ($resql)
if ($search_refcustomer) $param.='&search_refcustomer=' .urlencode($search_refcustomer);
if ($search_type != '') $param.='&search_type='.urlencode($search_type);
if ($search_societe) $param.='&search_societe=' .urlencode($search_societe);
if ($search_town) $param.='&search_town='.urlencode($search_town);
if ($search_zip) $param.='&search_zip='.urlencode($search_zip);
if ($search_sale > 0) $param.='&search_sale=' .urlencode($search_sale);
if ($search_user > 0) $param.='&search_user=' .urlencode($search_user);
if ($search_product_category > 0) $param.='$search_product_category=' .urlencode($search_product_category);

View File

@ -459,14 +459,14 @@ class Expedition extends CommonObject
// Check parameters
if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1;
$sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.billed";
$sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.fk_projet, e.billed";
$sql.= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height";
$sql.= ", e.date_expedition as date_expedition, e.model_pdf, e.fk_address, e.date_delivery";
$sql.= ", e.fk_shipping_method, e.tracking_number";
$sql.= ", el.fk_source as origin_id, el.sourcetype as origin";
$sql.= ", e.note_private, e.note_public";
$sql.= ', e.fk_incoterms, e.location_incoterms';
$sql.= ', i.libelle as libelle_incoterms';
$sql.= ", el.fk_source as origin_id, el.sourcetype as origin";
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = e.rowid AND el.targettype = '".$this->db->escape($this->element)."'";
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON e.fk_incoterms = i.rowid';
@ -504,6 +504,7 @@ class Expedition extends CommonObject
$this->origin = ($obj->origin?$obj->origin:'commande'); // For compatibility
$this->origin_id = $obj->origin_id;
$this->billed = $obj->billed;
$this->fk_project = $obj->fk_projet;
$this->trueWeight = $obj->weight;
$this->weight_units = $obj->weight_units;
@ -1023,6 +1024,7 @@ class Expedition extends CommonObject
$sql.= " fk_shipping_method=".((isset($this->shipping_method_id) && $this->shipping_method_id > 0)?$this->shipping_method_id:"null").",";
$sql.= " tracking_number=".(isset($this->tracking_number)?"'".$this->db->escape($this->tracking_number)."'":"null").",";
$sql.= " fk_statut=".(isset($this->statut)?$this->statut:"null").",";
$sql.= " fk_projet=".(isset($this->fk_project)?$this->fk_project:"null").",";
$sql.= " height=".(($this->trueHeight != '')?$this->trueHeight:"null").",";
$sql.= " width=".(($this->trueWidth != '')?$this->trueWidth:"null").",";
$sql.= " size_units=".(isset($this->size_units)?$this->size_units:"null").",";

View File

@ -259,13 +259,16 @@ if ($resql)
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($sall) $param.= "&sall=".urlencode($sall);
if ($search_ref_exp) $param.= "&search_ref_exp=".urlencode($search_ref_exp);
if ($search_ref_liv) $param.= "&search_ref_liv=".urlencode($search_ref_liv);
if ($search_ref_exp) $param.= "&search_ref_exp=".urlencode($search_ref_exp);
if ($search_ref_liv) $param.= "&search_ref_liv=".urlencode($search_ref_liv);
if ($search_ref_customer) $param.= "&search_ref_customer=".urlencode($search_ref_customer);
if ($search_company) $param.= "&search_company=".urlencode($search_company);
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
if ($search_company) $param.= "&search_company=".urlencode($search_company);
if ($search_town) $param.= '&search_town='.urlencode($search_town);
if ($search_zip) $param.= '&search_zip='.urlencode($search_zip);
if ($viewstatut != '') $param.= '&viewstatut='.urlencode($viewstatut);
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';

View File

@ -340,12 +340,12 @@ if (empty($reshook))
if (! $error)
{
$result = $object->insertExtraFields('COMPANY_MODIFY');
if ($result < 0)
{
setEventMessages($object->error, $object->errors, 'errors');
$error++;
}
$result = $object->insertExtraFields('COMPANY_MODIFY');
if ($result < 0)
{
setEventMessages($object->error, $object->errors, 'errors');
$error++;
}
}
if ($error) $action = 'edit_extras';
@ -674,7 +674,7 @@ if (empty($reshook))
if ($result <= 0)
{
setEventMessages($object->error, $object->errors, 'errors');
$error++;
$error++;
}
// Links with users