forked from Wavyzz/dolibarr
Merge remote-tracking branch 'upstream/develop' into 20230614
This commit is contained in:
@@ -1642,13 +1642,13 @@ if ($resql) {
|
||||
// Amount/Total (TTC / gross) in foreign currency
|
||||
if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) {
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ttc" value="'.dol_escape_htmltag($search_multicurrency_montant_ttc).'">';
|
||||
print '<input class="flat width75" type="text" name="search_multicurrency_montant_ttc" value="'.dol_escape_htmltag($search_multicurrency_montant_ttc).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Author
|
||||
if (!empty($arrayfields['u.login']['checked'])) {
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<input class="flat" size="4" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'">';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat width75" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Sales Representative
|
||||
@@ -1843,7 +1843,7 @@ if ($resql) {
|
||||
print_liste_field_titre($arrayfields['c.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'c.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['u.login']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['sale_representative']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", "$param", '', $sortfield, $sortorder);
|
||||
|
||||
@@ -318,9 +318,9 @@ class modSociete extends DolibarrModules
|
||||
's.status'=>"Numeric", 's.client'=>"Numeric", 's.fournisseur'=>"Boolean", 's.datec'=>"Date", 's.tms'=>"Date",
|
||||
's.code_client'=>"Text", 's.code_fournisseur'=>"Text", 's.code_compta'=>"Text", 's.code_compta_fournisseur'=>"Text",
|
||||
's.address'=>"Text", 's.zip'=>"Text", 's.town'=>"Text",
|
||||
'd.nom'=>'Text', 'r.nom'=>'Text', 'c.label'=>"List:c_country:label:label", 'c.code'=>"Text",
|
||||
'd.nom'=>'Text', 'r.nom'=>'Text', 'c.label'=>'List:c_country:label:label', 'c.code'=>'Text',
|
||||
's.phone'=>"Text", 's.fax'=>"Text",
|
||||
's.url'=>"Text", 's.email'=>"Text", 's.default_lang'=>"Text", 's.canvas' => "Canvas",
|
||||
's.url'=>"Text", 's.email'=>"Text", 's.default_lang'=>"Text", 's.canvas' => "Text",
|
||||
's.siret'=>"Text", 's.siren'=>"Text", 's.ape'=>"Text", 's.idprof4'=>"Text", 's.idprof5'=>"Text", 's.idprof6'=>"Text",
|
||||
's.tva_intra'=>"Text", 's.capital'=>"Numeric", 's.note_private'=>"Text", 's.note_public'=>"Text",
|
||||
't.libelle'=>"Text", 'ce.code'=>"List:c_effectif:libelle:code", "cfj.libelle"=>"Text", 's.fk_prospectlevel'=>'List:c_prospectlevel:label:code',
|
||||
|
||||
@@ -120,6 +120,10 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
||||
$object->actionmsg2 = $langs->transnoentities("COMPANY_MODIFYInDolibarr", $object->name);
|
||||
}
|
||||
$object->actionmsg = $langs->transnoentities("COMPANY_MODIFYInDolibarr", $object->name);
|
||||
// For merge event, we add a mention
|
||||
if (!empty($object->context['mergefromname'])) {
|
||||
$object->actionmsg = dol_concatdesc($object->actionmsg, $langs->trans("DataFromWasMerged", $object->context['mergefromname']));
|
||||
}
|
||||
|
||||
$object->sendtoid = 0;
|
||||
$object->socid = $object->id;
|
||||
@@ -1077,8 +1081,8 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
||||
$actioncomm = new ActionComm($this->db);
|
||||
$actioncomm->type_code = $object->actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
|
||||
$actioncomm->code = 'AC_'.$action;
|
||||
$actioncomm->label = $object->actionmsg2;
|
||||
$actioncomm->note_private = $object->actionmsg;
|
||||
$actioncomm->label = $object->actionmsg2; // Label of event
|
||||
$actioncomm->note_private = $object->actionmsg; // Description
|
||||
$actioncomm->fk_project = $projectid;
|
||||
$actioncomm->datep = $now;
|
||||
$actioncomm->datef = $now;
|
||||
|
||||
@@ -180,3 +180,4 @@ BrowserPush=Browser Popup Notification
|
||||
Reminders=Reminders
|
||||
ActiveByDefault=Enabled by default
|
||||
Until=until
|
||||
DataFromWasMerged=Data from %s was merged
|
||||
@@ -191,7 +191,7 @@ if (empty($reshook)) {
|
||||
if ($action == 'confirm_merge' && $confirm == 'yes' && $user->hasRight('societe', 'creer')) {
|
||||
$error = 0;
|
||||
$soc_origin_id = GETPOST('soc_origin', 'int');
|
||||
$soc_origin = new Societe($db);
|
||||
$soc_origin = new Societe($db); // The thirdparty that we will delete
|
||||
|
||||
if ($soc_origin_id <= 0) {
|
||||
$langs->load('errors');
|
||||
@@ -241,6 +241,11 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
|
||||
// If alias name is not defined on target thirdparty, we can store in it the old name of company.
|
||||
if (empty($object->name_bis) && $object->name != $soc_origin->name) {
|
||||
$object->name_bis = $soc_origin->name;
|
||||
}
|
||||
|
||||
// Merge categories
|
||||
$static_cat = new Categorie($db);
|
||||
|
||||
@@ -331,7 +336,7 @@ if (empty($reshook)) {
|
||||
|
||||
|
||||
if (!$error) {
|
||||
$object->context = array('merge'=>1, 'mergefromid'=>$soc_origin->id);
|
||||
$object->context = array('merge'=>1, 'mergefromid'=>$soc_origin->id, 'mergefromname'=>$soc_origin->name);
|
||||
|
||||
// Call trigger
|
||||
$result = $object->call_trigger('COMPANY_MODIFY', $user);
|
||||
@@ -343,7 +348,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
//We finally remove the old thirdparty
|
||||
// We finally remove the old thirdparty
|
||||
if ($soc_origin->delete($soc_origin->id, $user) < 1) {
|
||||
setEventMessages($soc_origin->error, $soc_origin->errors, 'errors');
|
||||
$error++;
|
||||
@@ -616,10 +621,10 @@ if (empty($reshook)) {
|
||||
|
||||
$result = $object->create($user);
|
||||
|
||||
if (empty($error) && isModEnabled('mailing') && !empty($object->email) && $object->no_email == 1) {
|
||||
if ($result >= 0 && isModEnabled('mailing') && !empty($object->email) && $object->no_email == 1) {
|
||||
// Add mass emailing flag into table mailing_unsubscribe
|
||||
$result = $object->setNoEmail($object->no_email);
|
||||
if ($result < 0) {
|
||||
$resultnoemail = $object->setNoEmail($object->no_email);
|
||||
if ($resultnoemail < 0) {
|
||||
$error++;
|
||||
$errors = array_merge($errors, ($object->error ? array($object->error) : $object->errors));
|
||||
$action = 'create';
|
||||
|
||||
Reference in New Issue
Block a user