mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Merge remote-tracking branch 'upstream/develop' into 15a29
This commit is contained in:
@@ -282,7 +282,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
|
||||
$sepaname = '______________________________________________';
|
||||
if ($thirdparty->id > 0) {
|
||||
$sepaname = $thirdparty->name.($object->account_owner ? ' ('.$object->account_owner.')' : '');
|
||||
$sepaname = $thirdparty->name.($object->proprio ? ' ('.$object->proprio.')' : '');
|
||||
}
|
||||
$posY = $pdf->GetY();
|
||||
$posY += 3;
|
||||
|
||||
@@ -349,7 +349,7 @@ class modAdherent extends DolibarrModules
|
||||
$this->import_fields_array[$r]['a.fk_soc'] = "ThirdParty";
|
||||
}
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity IN (0,".$conf->entity.")";
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'adherent' AND entity IN (0,".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) { // This can fail when class is used on old database (during migration for example)
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
|
||||
@@ -200,58 +200,58 @@ class modHRM extends DolibarrModules
|
||||
$this->rights[$r][1] = 'Read skill/job/position'; // Permission label
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'all';
|
||||
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->hrm->poste->read)
|
||||
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->hrm->all->read)
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 4011; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Create/modify skill/job/position'; // Permission label
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'all';
|
||||
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->hrm->poste->write)
|
||||
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->hrm->all->write)
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 4012; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Delete skill/job/position'; // Permission label
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'all';
|
||||
$this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->hrm->poste->delete)
|
||||
$this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->hrm->all->delete)
|
||||
$r++;
|
||||
|
||||
// Evaluation
|
||||
$this->rights[$r][0] = 4020; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Read evaluation'; // Permission label
|
||||
$this->rights[$r][1] = 'Read evaluations'; // Permission label
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'evaluation';
|
||||
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->hrm->poste->read)
|
||||
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->hrm->evaluation->read)
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 4021; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Create/modify evaluation'; // Permission label
|
||||
$this->rights[$r][1] = 'Create/modify your own evaluation'; // Permission label
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'evaluation';
|
||||
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->hrm->poste->write)
|
||||
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->hrm->evaluation->write)
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 4022; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Validate evaluation'; // Permission label
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'evaluation';
|
||||
$this->rights[$r][5] = 'validate'; // In php code, permission will be checked by test if ($user->rights->hrm->poste->write)
|
||||
$this->rights[$r][4] = 'evaluation_advance';
|
||||
$this->rights[$r][5] = 'validate'; // In php code, permission will be checked by test if ($user->rights->hrm->evaluation->validate)
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 4023; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Delete evaluation'; // Permission label
|
||||
$this->rights[$r][1] = 'Delete all evaluations'; // Permission label
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'evaluation';
|
||||
$this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->hrm->poste->delete)
|
||||
$this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->hrm->evaluation->delete)
|
||||
$r++;
|
||||
|
||||
// Comparison
|
||||
$this->rights[$r][0] = 4030; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'See comparison menu'; // Permission label
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'compare';
|
||||
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->hrm->poste->delete)
|
||||
$this->rights[$r][4] = 'compare_advance';
|
||||
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->hrm->compare_advance->read)
|
||||
$r++;
|
||||
}
|
||||
|
||||
|
||||
@@ -638,7 +638,7 @@ class modProduct extends DolibarrModules
|
||||
|
||||
// Add extra fields
|
||||
$import_extrafield_sample = array();
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0, ".$conf->entity.")";
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'product' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) { // This can fail when class is used on old database (during migration for example)
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
|
||||
@@ -296,7 +296,7 @@ class modProjet extends DolibarrModules
|
||||
$this->import_tables_array[$r] = array('t'=>MAIN_DB_PREFIX.'projet_task', 'extra'=>MAIN_DB_PREFIX.'projet_task_extrafields'); // List of tables to insert into (insert done in same order)
|
||||
$this->import_fields_array[$r] = array('t.fk_projet'=>'ProjectRef*', 't.ref'=>'RefTask*', 't.label'=>'LabelTask*', 't.dateo'=>"DateStart", 't.datee'=>"DateEnd", 't.planned_workload'=>"PlannedWorkload", 't.progress'=>"Progress", 't.note_private'=>"NotePrivate", 't.note_public'=>"NotePublic", 't.datec'=>"DateCreation");
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'projet_task' AND entity IN (0,".$conf->entity.")";
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'projet_task' AND entity IN (0,".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) { // This can fail when class is used on old database (during migration for example)
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
|
||||
@@ -268,7 +268,7 @@ class modResource extends DolibarrModules
|
||||
$this->import_tables_array[$r] = array('r'=>MAIN_DB_PREFIX.'resource', 'extra'=>MAIN_DB_PREFIX.'resource_extrafields'); // List of tables to insert into (insert done in same order)
|
||||
$this->import_fields_array[$r] = array('r.ref'=>"ResourceFormLabel_ref*", 'r.fk_code_type_resource'=>'ResourceTypeCode', 'r.description'=>'ResourceFormLabel_description', 'r.note_private'=>"NotePrivate", 'r.note_public'=>"NotePublic", 'r.asset_number'=>'AssetNumber', 'r.datec'=>'DateCreation');
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'resource' AND entity IN (0,".$conf->entity.")";
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'resource' AND entity IN (0,".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) { // This can fail when class is used on old database (during migration for example)
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
|
||||
@@ -584,7 +584,7 @@ class modService extends DolibarrModules
|
||||
}
|
||||
// Add extra fields
|
||||
$import_extrafield_sample = array();
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0,".$conf->entity.")";
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'product' AND entity IN (0,".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) { // This can fail when class is used on old database (during migration for example)
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
|
||||
@@ -503,7 +503,7 @@ class modSociete extends DolibarrModules
|
||||
$this->import_fields_array[$r] += array('s.accountancy_code_sell'=>'ProductAccountancySellCode', 's.accountancy_code_buy'=>'ProductAccountancyBuyCode');
|
||||
}
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0, ".$conf->entity.")";
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'societe' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) { // This can fail when class is used on old database (during migration for example)
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
@@ -681,7 +681,7 @@ class modSociete extends DolibarrModules
|
||||
's.note_public' => "NotePublic"
|
||||
);
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity IN (0, ".$conf->entity.")";
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'socpeople' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) { // This can fail when class is used on an old database (during a migration for example)
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
|
||||
@@ -298,7 +298,7 @@ class modUser extends DolibarrModules
|
||||
'u.statut'=>'Status'
|
||||
);
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'user' AND entity IN (0,".$conf->entity.")";
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'user' AND entity IN (0,".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) { // This can fail when class is used on old database (during migration for example)
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
|
||||
@@ -320,17 +320,22 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
|
||||
foreach ($contact_arrray as $array_key => $contact_id) {
|
||||
$res_contact = $contactstatic->fetch($contact_id);
|
||||
$tmparray = $this->get_substitutionarray_contact($contactstatic, $outputlangs, 'contact');
|
||||
foreach ($tmparray as $key => $val) {
|
||||
try {
|
||||
$listlines->setVars($key, $val, true, 'UTF-8');
|
||||
} catch (OdfException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
} catch (SegmentException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
if ((int) $res_contact > 0) {
|
||||
$tmparray = $this->get_substitutionarray_contact($contactstatic, $outputlangs, 'contact');
|
||||
foreach ($tmparray as $key => $val) {
|
||||
try {
|
||||
$listlines->setVars($key, $val, true, 'UTF-8');
|
||||
} catch (OdfException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
} catch (SegmentException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
}
|
||||
$listlines->merge();
|
||||
} else {
|
||||
$this->error = $contactstatic->error;
|
||||
dol_syslog($this->error, LOG_WARNING);
|
||||
}
|
||||
$listlines->merge();
|
||||
}
|
||||
$odfHandler->mergeSegment($listlines);
|
||||
} catch (OdfException $e) {
|
||||
|
||||
@@ -132,7 +132,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
|
||||
|
||||
// Parametrage du prefix customers
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("CustomerCodeModel").'):</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="value1" value="'.$conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER.'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="value1" value="'.getDolGlobalString('COMPANY_ELEPHANT_MASK_CUSTOMER').'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"'.$disabled.'></td>';
|
||||
|
||||
@@ -140,7 +140,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
|
||||
|
||||
// Parametrage du prefix suppliers
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("SupplierCodeModel").'):</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="value2" value="'.$conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER.'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="value2" value="'.getDolGlobalString('COMPANY_ELEPHANT_MASK_SUPPLIER').'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '</tr>';
|
||||
|
||||
$texte .= '</table>';
|
||||
|
||||
Reference in New Issue
Block a user