Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
b553dbb9d2
@ -621,6 +621,7 @@ if ($id == 11)
|
|||||||
// 'contract' => $langs->trans('Contract'),
|
// 'contract' => $langs->trans('Contract'),
|
||||||
'project' => $langs->trans('Project'),
|
'project' => $langs->trans('Project'),
|
||||||
'project_task' => $langs->trans('Task'),
|
'project_task' => $langs->trans('Task'),
|
||||||
|
'ticket' => $langs->trans('Ticket'),
|
||||||
'agenda' => $langs->trans('Agenda'),
|
'agenda' => $langs->trans('Agenda'),
|
||||||
'dolresource' => $langs->trans('Resource'),
|
'dolresource' => $langs->trans('Resource'),
|
||||||
// old deprecated
|
// old deprecated
|
||||||
@ -1492,11 +1493,9 @@ if ($id)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($value == 'element')
|
if ($value == 'element') {
|
||||||
{
|
|
||||||
$valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow;
|
$valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow;
|
||||||
} elseif ($value == 'source')
|
} elseif ($value == 'source') {
|
||||||
{
|
|
||||||
$valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow;
|
$valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow;
|
||||||
} elseif ($valuetoshow == 'all') {
|
} elseif ($valuetoshow == 'all') {
|
||||||
$valuetoshow = $langs->trans('All');
|
$valuetoshow = $langs->trans('All');
|
||||||
|
|||||||
@ -113,7 +113,6 @@ if (!empty($conf->global->PRODUCT_USE_UNITS))
|
|||||||
{
|
{
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="nobottom linecoluseunit left">';
|
print '<td class="nobottom linecoluseunit left">';
|
||||||
// print $form->selectUnits(empty($line->fk_unit) ? $conf->global->PRODUCT_USE_UNITS : $line->fk_unit, "units");
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -112,7 +112,6 @@ if (!empty($conf->global->PRODUCT_USE_UNITS))
|
|||||||
{
|
{
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="nobottom linecoluseunit left">';
|
print '<td class="nobottom linecoluseunit left">';
|
||||||
// print $form->selectUnits($line->fk_unit, "units");
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -58,11 +58,15 @@ if ($user->socid) $socid = $user->socid;
|
|||||||
$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype);
|
$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype);
|
||||||
if (!$user->rights->banque->lire && !$user->rights->banque->consolidate) accessforbidden();
|
if (!$user->rights->banque->lire && !$user->rights->banque->consolidate) accessforbidden();
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('bankline'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
$parameters = array('socid' => $socid);
|
||||||
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
if ($cancel)
|
if ($cancel)
|
||||||
{
|
{
|
||||||
if ($backtopage)
|
if ($backtopage)
|
||||||
|
|||||||
@ -40,11 +40,14 @@ if (!$user->rights->banque->transfer)
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('banktransfer'));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
$parameters = array('socid' => $socid);
|
||||||
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
if ($action == 'add')
|
if ($action == 'add')
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
|
|||||||
@ -105,6 +105,7 @@ class box_shipments extends ModeleBoxes
|
|||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc";
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc";
|
||||||
$sql .= " WHERE e.entity IN (".getEntity('expedition').")";
|
$sql .= " WHERE e.entity IN (".getEntity('expedition').")";
|
||||||
if (!empty($conf->global->ORDER_BOX_LAST_SHIPMENTS_VALIDATED_ONLY)) $sql .= " AND e.fk_statut = 1";
|
if (!empty($conf->global->ORDER_BOX_LAST_SHIPMENTS_VALIDATED_ONLY)) $sql .= " AND e.fk_statut = 1";
|
||||||
|
if ($user->socid > 0) $sql.= " AND s.rowid = ".$user->socid;
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND sc.fk_user = ".$user->id;
|
||||||
else $sql .= " ORDER BY e.date_delivery, e.ref DESC ";
|
else $sql .= " ORDER BY e.date_delivery, e.ref DESC ";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|||||||
@ -1079,7 +1079,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);
|
$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);
|
||||||
|
|
||||||
if (GETPOST('price_ht') != '')
|
if (GETPOST('price_ht') != '' || GETPOST('multicurrency_subprice') != '')
|
||||||
{
|
{
|
||||||
$up = price2num(GETPOST('price_ht'));
|
$up = price2num(GETPOST('price_ht'));
|
||||||
$price_base_type = 'HT';
|
$price_base_type = 'HT';
|
||||||
|
|||||||
@ -5428,7 +5428,6 @@ class Product extends CommonObject
|
|||||||
$langs->load('products');
|
$langs->load('products');
|
||||||
|
|
||||||
$label_type = 'label';
|
$label_type = 'label';
|
||||||
|
|
||||||
if ($type == 'short') {
|
if ($type == 'short') {
|
||||||
$label_type = 'short_label';
|
$label_type = 'short_label';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -487,7 +487,11 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
llxHeader('', $title, $helpurl, '');
|
foreach ($searchCategoryProductList as $searchCategoryProduct) {
|
||||||
|
$paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct);
|
||||||
|
}
|
||||||
|
llxHeader('', $title, $helpurl, '', 0, 0, "", "", $paramsCat);
|
||||||
|
|
||||||
|
|
||||||
// Displays product removal confirmation
|
// Displays product removal confirmation
|
||||||
if (GETPOST('delprod')) {
|
if (GETPOST('delprod')) {
|
||||||
|
|||||||
@ -3621,8 +3621,8 @@ class Societe extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public function create_from_member(Adherent $member, $socname = '', $socalias = '', $customercode = '')
|
public function create_from_member(Adherent $member, $socname = '', $socalias = '', $customercode = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $user, $langs;
|
global $conf, $user, $langs;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG);
|
dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG);
|
||||||
|
|
||||||
@ -3656,6 +3656,23 @@ class Societe extends CommonObject
|
|||||||
// Cree et positionne $this->id
|
// Cree et positionne $this->id
|
||||||
$result = $this->create($user);
|
$result = $this->create($user);
|
||||||
if ($result >= 0) {
|
if ($result >= 0) {
|
||||||
|
// Auto-create contact on thirdparty creation
|
||||||
|
if (!empty($conf->global->THIRDPARTY_DEFAULT_CREATE_CONTACT)) {
|
||||||
|
// Fill fields needed by contact
|
||||||
|
$this->name_bis = $member->lastname;
|
||||||
|
$this->firstname = $member->firstname;
|
||||||
|
$this->civility_id = $member->civility_id;
|
||||||
|
|
||||||
|
dol_syslog("We ask to create a contact/address too", LOG_DEBUG);
|
||||||
|
$result = $this->create_individual($user);
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
setEventMessages($this->error, $this->errors, 'errors');
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent";
|
||||||
$sql .= " SET fk_soc=".$this->id;
|
$sql .= " SET fk_soc=".$this->id;
|
||||||
$sql .= " WHERE rowid=".$member->id;
|
$sql .= " WHERE rowid=".$member->id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user