Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
Conflicts: htdocs/admin/dict.php htdocs/bom/tpl/objectline_create.tpl.php htdocs/bom/tpl/objectline_edit.tpl.php htdocs/bom/tpl/objectline_view.tpl.php htdocs/core/boxes/box_shipments.php htdocs/societe/class/societe.class.php
This commit is contained in:
commit
3d96c5a454
@ -621,6 +621,7 @@ if ($id == 11)
|
||||
// 'contract' => $langs->trans('Contract'),
|
||||
'project' => $langs->trans('Project'),
|
||||
'project_task' => $langs->trans('Task'),
|
||||
'ticket' => $langs->trans('Ticket'),
|
||||
'agenda' => $langs->trans('Agenda'),
|
||||
'dolresource' => $langs->trans('Resource'),
|
||||
// old deprecated
|
||||
@ -1492,11 +1493,9 @@ if ($id)
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($value == 'element')
|
||||
{
|
||||
if ($value == 'element') {
|
||||
$valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow;
|
||||
} elseif ($value == 'source')
|
||||
{
|
||||
} elseif ($value == 'source') {
|
||||
$valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow;
|
||||
} elseif ($valuetoshow == 'all') {
|
||||
$valuetoshow = $langs->trans('All');
|
||||
|
||||
@ -113,7 +113,6 @@ if (!empty($conf->global->PRODUCT_USE_UNITS))
|
||||
{
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom linecoluseunit left">';
|
||||
// print $form->selectUnits(empty($line->fk_unit) ? $conf->global->PRODUCT_USE_UNITS : $line->fk_unit, "units");
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
||||
@ -112,7 +112,6 @@ if (!empty($conf->global->PRODUCT_USE_UNITS))
|
||||
{
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom linecoluseunit left">';
|
||||
// print $form->selectUnits($line->fk_unit, "units");
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
||||
@ -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";
|
||||
$sql .= " WHERE e.entity IN (".getEntity('expedition').")";
|
||||
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;
|
||||
else $sql .= " ORDER BY e.date_delivery, e.ref DESC ";
|
||||
$sql .= $this->db->plimit($max, 0);
|
||||
|
||||
@ -1079,7 +1079,7 @@ if (empty($reshook))
|
||||
|
||||
$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'));
|
||||
$price_base_type = 'HT';
|
||||
|
||||
@ -5428,7 +5428,6 @@ class Product extends CommonObject
|
||||
$langs->load('products');
|
||||
|
||||
$label_type = 'label';
|
||||
|
||||
if ($type == 'short') {
|
||||
$label_type = 'short_label';
|
||||
}
|
||||
|
||||
@ -486,7 +486,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
|
||||
if (GETPOST('delprod')) {
|
||||
|
||||
@ -3621,8 +3621,8 @@ class Societe extends CommonObject
|
||||
*/
|
||||
public function create_from_member(Adherent $member, $socname = '', $socalias = '', $customercode = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user, $langs;
|
||||
// phpcs:enable
|
||||
global $conf, $user, $langs;
|
||||
|
||||
dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG);
|
||||
|
||||
@ -3656,6 +3656,23 @@ class Societe extends CommonObject
|
||||
// Cree et positionne $this->id
|
||||
$result = $this->create($user);
|
||||
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 .= " SET fk_soc=".$this->id;
|
||||
$sql .= " WHERE rowid=".$member->id;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user