Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0
Conflicts: htdocs/core/class/commonobject.class.php htdocs/core/tpl/extrafields_list_search_sql.tpl.php htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php htdocs/fourn/class/fournisseur.commande.class.php
This commit is contained in:
commit
ef4468153d
@ -4111,7 +4111,7 @@ abstract class CommonObject
|
||||
$sql .= " SET ".$fieldstatus." = ".((int) $status);
|
||||
// If status = 1 = validated, update also fk_user_valid
|
||||
if ($status == 1 && $elementTable == 'expensereport') {
|
||||
$sql .= ", fk_user_valid = ".$user->id;
|
||||
$sql .= ", fk_user_valid = ".((int) $user->id);
|
||||
}
|
||||
$sql .= " WHERE rowid=".((int) $elementId);
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($
|
||||
if (is_array($crit)) {
|
||||
$crit = implode(' ', $crit); // natural_search() expects a string
|
||||
} elseif ($typ === 'select' and is_string($crit) and strpos($crit, ' ') === false) {
|
||||
$sql .= ' AND ('.$extrafieldsobjectprefix.$tmpkey.' = "'.$db->escape($crit).'")';
|
||||
$sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." = '".$db->escape($crit)."')";
|
||||
continue;
|
||||
}
|
||||
$sql .= natural_search($extrafieldsobjectprefix.$tmpkey, $crit, $mode_search);
|
||||
|
||||
@ -264,7 +264,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
$qtyordred = array();
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
|
||||
//find all shippement on order origin
|
||||
// Find all shipments on order origin
|
||||
$order = new Commande($this->db);
|
||||
$ret = $order->fetch($object->origin_id);
|
||||
if ($ret < 0) {
|
||||
@ -309,10 +309,10 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
$diff_array = array_diff_assoc($qtyordred, $qtyshipped);
|
||||
if (count($diff_array) == 0) {
|
||||
//No diff => mean everythings is shipped
|
||||
$ret = $object->setStatut(Commande::STATUS_CLOSED, $object->origin_id, $object->origin, 'ORDER_CLOSE');
|
||||
$ret = $order->setStatut(Commande::STATUS_CLOSED, $object->origin_id, $object->origin, 'ORDER_CLOSE');
|
||||
if ($ret < 0) {
|
||||
$this->error = $object->error;
|
||||
$this->errors = $object->errors;
|
||||
$this->error = $order->error;
|
||||
$this->errors = $order->errors;
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
||||
@ -470,7 +470,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l";
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid';
|
||||
if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON l.fk_product = pfp.fk_product and l.ref = pfp.ref_fourn";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON l.fk_product = pfp.fk_product and l.ref = pfp.ref_fourn AND pfp.fk_soc = ".$this->socid;
|
||||
}
|
||||
$sql .= " WHERE l.fk_commande = ".$this->id;
|
||||
if ($only_product) {
|
||||
|
||||
@ -86,6 +86,9 @@ if (($id > 0) || $ref) {
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('holidaycard', 'globalcard'));
|
||||
|
||||
$cancreate = 0;
|
||||
|
||||
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->holiday->writeall_advance)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user