Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
3c8b365c3e
@ -610,12 +610,23 @@ if (empty($reshook))
|
|||||||
// Classify billed
|
// Classify billed
|
||||||
else if ($action == 'classifybilled' && $usercanclose)
|
else if ($action == 'classifybilled' && $usercanclose)
|
||||||
{
|
{
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
$result=$object->cloture($user, 4, '');
|
$result=$object->cloture($user, 4, '');
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->rollback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close proposal
|
// Close proposal
|
||||||
@ -628,12 +639,23 @@ if (empty($reshook))
|
|||||||
// prevent browser refresh from closing proposal several times
|
// prevent browser refresh from closing proposal several times
|
||||||
if ($object->statut == Propal::STATUS_VALIDATED)
|
if ($object->statut == Propal::STATUS_VALIDATED)
|
||||||
{
|
{
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
$result=$object->cloture($user, GETPOST('statut','int'), GETPOST('note_private','none'));
|
$result=$object->cloture($user, GETPOST('statut','int'), GETPOST('note_private','none'));
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->rollback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -644,12 +666,23 @@ if (empty($reshook))
|
|||||||
// prevent browser refresh from reopening proposal several times
|
// prevent browser refresh from reopening proposal several times
|
||||||
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED)
|
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED)
|
||||||
{
|
{
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
$result=$object->reopen($user, 1);
|
$result=$object->reopen($user, 1);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->rollback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2484,7 +2484,7 @@ class Propal extends CommonObject
|
|||||||
$this->oldcopy= clone $this;
|
$this->oldcopy= clone $this;
|
||||||
$this->statut = $statut;
|
$this->statut = $statut;
|
||||||
$this->date_cloture = $now;
|
$this->date_cloture = $now;
|
||||||
$this->note_private = $note;
|
$this->note_private = $newprivatenote;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $notrigger && empty($error))
|
if (! $notrigger && empty($error))
|
||||||
@ -2502,6 +2502,10 @@ class Propal extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$this->statut = $this->oldcopy->statut;
|
||||||
|
$this->date_cloture = $this->oldcopy->date_cloture;
|
||||||
|
$this->note_private = $this->oldcopy->note_private;
|
||||||
|
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -3162,7 +3166,7 @@ class Propal extends CommonObject
|
|||||||
$this->labelstatut[3]=$langs->trans("PropalStatusNotSigned");
|
$this->labelstatut[3]=$langs->trans("PropalStatusNotSigned");
|
||||||
$this->labelstatut[4]=$langs->trans("PropalStatusBilled");
|
$this->labelstatut[4]=$langs->trans("PropalStatusBilled");
|
||||||
$this->labelstatut_short[0]=$langs->trans("PropalStatusDraftShort");
|
$this->labelstatut_short[0]=$langs->trans("PropalStatusDraftShort");
|
||||||
$this->labelstatut_short[1]=$langs->trans("Opened");
|
$this->labelstatut_short[1]=$langs->trans("PropalStatusValidatedShort");
|
||||||
$this->labelstatut_short[2]=$langs->trans("PropalStatusSignedShort");
|
$this->labelstatut_short[2]=$langs->trans("PropalStatusSignedShort");
|
||||||
$this->labelstatut_short[3]=$langs->trans("PropalStatusNotSignedShort");
|
$this->labelstatut_short[3]=$langs->trans("PropalStatusNotSignedShort");
|
||||||
$this->labelstatut_short[4]=$langs->trans("PropalStatusBilledShort");
|
$this->labelstatut_short[4]=$langs->trans("PropalStatusBilledShort");
|
||||||
|
|||||||
@ -91,7 +91,7 @@ $max=10;
|
|||||||
|
|
||||||
$sql = "SELECT bc.rowid, bc.date_bordereau as db, bc.amount, bc.ref as ref,";
|
$sql = "SELECT bc.rowid, bc.date_bordereau as db, bc.amount, bc.ref as ref,";
|
||||||
$sql.= " bc.statut, bc.nbcheque,";
|
$sql.= " bc.statut, bc.nbcheque,";
|
||||||
$sql.= " ba.ref, ba.label, ba.rowid as bid, ba.number, ba.currency_code, ba.account_number, ba.fk_accountancy_journal,";
|
$sql.= " ba.ref as bref, ba.label, ba.rowid as bid, ba.number, ba.currency_code, ba.account_number, ba.fk_accountancy_journal,";
|
||||||
$sql.= " aj.code";
|
$sql.= " aj.code";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc, ".MAIN_DB_PREFIX."bank_account as ba";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc, ".MAIN_DB_PREFIX."bank_account as ba";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_journal as aj ON aj.rowid = ba.fk_accountancy_journal";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_journal as aj ON aj.rowid = ba.fk_accountancy_journal";
|
||||||
@ -120,7 +120,7 @@ if ($resql)
|
|||||||
$checkdepositstatic->statut=$objp->statut;
|
$checkdepositstatic->statut=$objp->statut;
|
||||||
|
|
||||||
$accountstatic->id=$objp->bid;
|
$accountstatic->id=$objp->bid;
|
||||||
$accountstatic->ref=$objp->ref;
|
$accountstatic->ref=$objp->bref;
|
||||||
$accountstatic->label=$objp->label;
|
$accountstatic->label=$objp->label;
|
||||||
$accountstatic->number=$objp->number;
|
$accountstatic->number=$objp->number;
|
||||||
$accountstatic->currency_code=$objp->currency_code;
|
$accountstatic->currency_code=$objp->currency_code;
|
||||||
|
|||||||
@ -1881,12 +1881,17 @@ class ExtraFields
|
|||||||
if (empty($enabled)) continue;
|
if (empty($enabled)) continue;
|
||||||
if (empty($perms)) continue;
|
if (empty($perms)) continue;
|
||||||
|
|
||||||
if ($this->attributes[$object->table_element]['required'][$key] && empty($_POST["options_".$key])) // Check if empty without GETPOST, value can be alpha, int, array, etc...
|
if ($this->attributes[$object->table_element]['required'][$key]) // Value is required
|
||||||
|
{
|
||||||
|
// Check if empty without using GETPOST, value can be alpha, int, array, etc...
|
||||||
|
if ((! is_array($_POST["options_".$key]) && empty($_POST["options_".$key]) && $_POST["options_".$key] != '0')
|
||||||
|
|| (is_array($_POST["options_".$key]) && empty($_POST["options_".$key])))
|
||||||
{
|
{
|
||||||
//print 'ccc'.$value.'-'.$this->attributes[$object->table_element]['required'][$key];
|
//print 'ccc'.$value.'-'.$this->attributes[$object->table_element]['required'][$key];
|
||||||
$nofillrequired++;
|
$nofillrequired++;
|
||||||
$error_field_required[] = $langs->transnoentitiesnoconv($value);
|
$error_field_required[] = $langs->transnoentitiesnoconv($value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (in_array($key_type,array('date')))
|
if (in_array($key_type,array('date')))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3068,7 +3068,10 @@ class Form
|
|||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
||||||
$label=($langs->trans("DemandReasonType".$obj->code)!=("DemandReasonType".$obj->code)?$langs->trans("DemandReasonType".$obj->code):($obj->label!='-'?$obj->label:''));
|
$label=($obj->label!='-'?$obj->label:'');
|
||||||
|
if ($langs->trans("DemandReasonType".$obj->code) != ("DemandReasonType".$obj->code)) $label = $langs->trans("DemandReasonType".$obj->code); // So translation key DemandReasonTypeSRC_XXX will work
|
||||||
|
if ($langs->trans($obj->code) != $obj->code) $label=$langs->trans($obj->code); // So translation key SRC_XXX will work
|
||||||
|
|
||||||
$tmparray[$obj->rowid]['id'] =$obj->rowid;
|
$tmparray[$obj->rowid]['id'] =$obj->rowid;
|
||||||
$tmparray[$obj->rowid]['code'] =$obj->code;
|
$tmparray[$obj->rowid]['code'] =$obj->code;
|
||||||
$tmparray[$obj->rowid]['label']=$label;
|
$tmparray[$obj->rowid]['label']=$label;
|
||||||
@ -3117,7 +3120,8 @@ class Form
|
|||||||
{
|
{
|
||||||
print '<option value="'.$arraydemandreason['id'].'">';
|
print '<option value="'.$arraydemandreason['id'].'">';
|
||||||
}
|
}
|
||||||
print $arraydemandreason['label'];
|
$label=$arraydemandreason['label']; // Translation of label was already done into the ->loadCacheInputReason
|
||||||
|
print $langs->trans($label);
|
||||||
print '</option>';
|
print '</option>';
|
||||||
}
|
}
|
||||||
print '</select>';
|
print '</select>';
|
||||||
|
|||||||
@ -63,10 +63,16 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 320__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools', 'ProductVatMassChange', 1, 'products', '', '', 2, 15, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 320__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools', 'ProductVatMassChange', 1, 'products', '', '', 2, 15, __ENTITY__);
|
||||||
-- Home - Menu users and groups
|
-- Home - Menu users and groups
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 4, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 4, __ENTITY__);
|
||||||
|
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/list.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/list.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 402__+MAX_llx_menu__, 'home', '', 401__+MAX_llx_menu__, '/user/card.php?leftmenu=users&action=create', 'NewUser', 2, 'users', '($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 402__+MAX_llx_menu__, 'home', '', 401__+MAX_llx_menu__, '/user/card.php?leftmenu=users&action=create', 'NewUser', 2, 'users', '($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)', '', 2, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 403__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/group/list.php?leftmenu=users', 'Groups', 1, 'users', '(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)', '', 2, 1, __ENTITY__);
|
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 404__+MAX_llx_menu__, 'home', '', 403__+MAX_llx_menu__, '/user/group/card.php?leftmenu=users&action=create', 'NewGroup', 2, 'users', '(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 404__+MAX_llx_menu__, 'home', '', 401__+MAX_llx_menu__, '/user/hierarchy.php?leftmenu=users', 'HierarchicView', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__);
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 405__+MAX_llx_menu__, 'home', '', 401__+MAX_llx_menu__, '/categories/index.php?leftmenu=users&type=7', 'UsersCategoriesShort', 1, 'categories', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__);
|
||||||
|
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 407__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/group/list.php?leftmenu=users', 'Groups', 1, 'users', '(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)', '', 2, 1, __ENTITY__);
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 408__+MAX_llx_menu__, 'home', '', 407__+MAX_llx_menu__, '/user/group/card.php?leftmenu=users&action=create', 'NewGroup', 2, 'users', '(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)', '', 2, 0, __ENTITY__);
|
||||||
|
|
||||||
-- Third parties
|
-- Third parties
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 500__+MAX_llx_menu__, 'companies', 'thirdparties', 2__+MAX_llx_menu__, '/societe/index.php?leftmenu=thirdparties', 'ThirdParty', 0, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 500__+MAX_llx_menu__, 'companies', 'thirdparties', 2__+MAX_llx_menu__, '/societe/index.php?leftmenu=thirdparties', 'ThirdParty', 0, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 501__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/card.php?action=create', 'MenuNewThirdParty', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 501__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/card.php?action=create', 'MenuNewThirdParty', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
|
||||||
|
|||||||
@ -616,6 +616,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"),2, ($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE), '', 'home');
|
$newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"),2, ($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE), '', 'home');
|
||||||
$newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->rights->user->user->lire || $user->admin);
|
$newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->rights->user->user->lire || $user->admin);
|
||||||
$newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->rights->user->user->lire || $user->admin);
|
$newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->rights->user->user->lire || $user->admin);
|
||||||
|
if (! empty($conf->categorie->enabled))
|
||||||
|
{
|
||||||
|
$langs->load("categories");
|
||||||
|
$newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||||
|
}
|
||||||
$newmenu->add("", $langs->trans("Groups"), 1, ($user->rights->user->user->lire || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
$newmenu->add("", $langs->trans("Groups"), 1, ($user->rights->user->user->lire || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
||||||
$newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, (($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
$newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, (($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
||||||
$newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, (($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
$newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, (($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
||||||
|
|||||||
@ -1213,7 +1213,7 @@ WatermarkOnDraft=Watermark on draft document
|
|||||||
JSOnPaimentBill=Activate feature to autofill payment lines on payment form
|
JSOnPaimentBill=Activate feature to autofill payment lines on payment form
|
||||||
CompanyIdProfChecker=Rules for Professional IDs
|
CompanyIdProfChecker=Rules for Professional IDs
|
||||||
MustBeUnique=Must be unique?
|
MustBeUnique=Must be unique?
|
||||||
MustBeMandatory=Mandatory to create third parties?
|
MustBeMandatory=Mandatory to create third parties (if vat number or type of company defined) ?
|
||||||
MustBeInvoiceMandatory=Mandatory to validate invoices?
|
MustBeInvoiceMandatory=Mandatory to validate invoices?
|
||||||
TechnicalServicesProvided=Technical services provided
|
TechnicalServicesProvided=Technical services provided
|
||||||
#####DAV #####
|
#####DAV #####
|
||||||
|
|||||||
@ -16,6 +16,7 @@ MembersCategoriesArea=Members tags/categories area
|
|||||||
ContactsCategoriesArea=Contacts tags/categories area
|
ContactsCategoriesArea=Contacts tags/categories area
|
||||||
AccountsCategoriesArea=Accounts tags/categories area
|
AccountsCategoriesArea=Accounts tags/categories area
|
||||||
ProjectsCategoriesArea=Projects tags/categories area
|
ProjectsCategoriesArea=Projects tags/categories area
|
||||||
|
UsersCategoriesArea=Users tags/categories area
|
||||||
SubCats=Sub-categories
|
SubCats=Sub-categories
|
||||||
CatList=List of tags/categories
|
CatList=List of tags/categories
|
||||||
NewCategory=New tag/category
|
NewCategory=New tag/category
|
||||||
@ -60,6 +61,7 @@ MembersCategoriesShort=Members tags/categories
|
|||||||
ContactCategoriesShort=Contacts tags/categories
|
ContactCategoriesShort=Contacts tags/categories
|
||||||
AccountsCategoriesShort=Accounts tags/categories
|
AccountsCategoriesShort=Accounts tags/categories
|
||||||
ProjectsCategoriesShort=Projects tags/categories
|
ProjectsCategoriesShort=Projects tags/categories
|
||||||
|
UsersCategoriesShort=Users tags/categories
|
||||||
ThisCategoryHasNoProduct=This category does not contain any product.
|
ThisCategoryHasNoProduct=This category does not contain any product.
|
||||||
ThisCategoryHasNoSupplier=This category does not contain any supplier.
|
ThisCategoryHasNoSupplier=This category does not contain any supplier.
|
||||||
ThisCategoryHasNoCustomer=This category does not contain any customer.
|
ThisCategoryHasNoCustomer=This category does not contain any customer.
|
||||||
|
|||||||
@ -38,7 +38,7 @@ ThirdPartyCustomers=Customers
|
|||||||
ThirdPartyCustomersStats=Customers
|
ThirdPartyCustomersStats=Customers
|
||||||
ThirdPartyCustomersWithIdProf12=Customers with %s or %s
|
ThirdPartyCustomersWithIdProf12=Customers with %s or %s
|
||||||
ThirdPartySuppliers=Vendors
|
ThirdPartySuppliers=Vendors
|
||||||
ThirdPartyType=Third Party Type
|
ThirdPartyType=Type of company
|
||||||
Individual=Private individual
|
Individual=Private individual
|
||||||
ToCreateContactWithSameName=Will create automatically a contact/address with same information as the third party under the third party. In most cases, even if your third party is a physical person, creating a third party alone is enough.
|
ToCreateContactWithSameName=Will create automatically a contact/address with same information as the third party under the third party. In most cases, even if your third party is a physical person, creating a third party alone is enough.
|
||||||
ParentCompany=Parent company
|
ParentCompany=Parent company
|
||||||
|
|||||||
@ -295,7 +295,7 @@ CurrencyCentINR=paisa
|
|||||||
CurrencyCentSingINR=paise
|
CurrencyCentSingINR=paise
|
||||||
CurrencyThousandthSingTND=thousandth
|
CurrencyThousandthSingTND=thousandth
|
||||||
#### Input reasons #####
|
#### Input reasons #####
|
||||||
DemandReasonTypeSRC_INTE=Internet
|
DemandReasonTypeSRC_INTE=Internetaaa
|
||||||
DemandReasonTypeSRC_CAMP_MAIL=Mailing campaign
|
DemandReasonTypeSRC_CAMP_MAIL=Mailing campaign
|
||||||
DemandReasonTypeSRC_CAMP_EMAIL=EMailing campaign
|
DemandReasonTypeSRC_CAMP_EMAIL=EMailing campaign
|
||||||
DemandReasonTypeSRC_CAMP_PHO=Phone campaign
|
DemandReasonTypeSRC_CAMP_PHO=Phone campaign
|
||||||
|
|||||||
@ -33,7 +33,7 @@ PropalStatusSigned=Signed (needs billing)
|
|||||||
PropalStatusNotSigned=Not signed (closed)
|
PropalStatusNotSigned=Not signed (closed)
|
||||||
PropalStatusBilled=Billed
|
PropalStatusBilled=Billed
|
||||||
PropalStatusDraftShort=Draft
|
PropalStatusDraftShort=Draft
|
||||||
PropalStatusValidatedShort=Validated
|
PropalStatusValidatedShort=Validated (open)
|
||||||
PropalStatusClosedShort=Closed
|
PropalStatusClosedShort=Closed
|
||||||
PropalStatusSignedShort=Signed
|
PropalStatusSignedShort=Signed
|
||||||
PropalStatusNotSignedShort=Not signed
|
PropalStatusNotSignedShort=Not signed
|
||||||
|
|||||||
@ -1208,7 +1208,7 @@ WatermarkOnDraft=Filigrane sur les documents brouillons
|
|||||||
JSOnPaimentBill=Activer la fonctionnalité de remplissage automatique des lignes de paiement sur le formulaire de paiement
|
JSOnPaimentBill=Activer la fonctionnalité de remplissage automatique des lignes de paiement sur le formulaire de paiement
|
||||||
CompanyIdProfChecker=Règles sur les Identifiants professionnels
|
CompanyIdProfChecker=Règles sur les Identifiants professionnels
|
||||||
MustBeUnique=Doit être unique ?
|
MustBeUnique=Doit être unique ?
|
||||||
MustBeMandatory=Obligatoire pour créer des tiers ?
|
MustBeMandatory=Obligatoire pour créer des tiers (si num tva ou type de société défini) ?
|
||||||
MustBeInvoiceMandatory=Obligatoire pour valider des factures ?
|
MustBeInvoiceMandatory=Obligatoire pour valider des factures ?
|
||||||
TechnicalServicesProvided=Services techniques fournis
|
TechnicalServicesProvided=Services techniques fournis
|
||||||
#####DAV #####
|
#####DAV #####
|
||||||
|
|||||||
@ -38,7 +38,7 @@ ThirdPartyCustomers=Clients
|
|||||||
ThirdPartyCustomersStats=Clients
|
ThirdPartyCustomersStats=Clients
|
||||||
ThirdPartyCustomersWithIdProf12=Clients avec %s ou %s
|
ThirdPartyCustomersWithIdProf12=Clients avec %s ou %s
|
||||||
ThirdPartySuppliers=Fournisseurs
|
ThirdPartySuppliers=Fournisseurs
|
||||||
ThirdPartyType=Type du tiers
|
ThirdPartyType=Type du société
|
||||||
Individual=Individu privé
|
Individual=Individu privé
|
||||||
ToCreateContactWithSameName=Crée automatiquement un contact/adresse, sous le tiers, avec la même information que le tiers. Dans la plupart des cas, même si votre tiers est une personne physique, la création d'un tiers seul suffit.
|
ToCreateContactWithSameName=Crée automatiquement un contact/adresse, sous le tiers, avec la même information que le tiers. Dans la plupart des cas, même si votre tiers est une personne physique, la création d'un tiers seul suffit.
|
||||||
ParentCompany=Maison mère
|
ParentCompany=Maison mère
|
||||||
|
|||||||
@ -33,7 +33,7 @@ PropalStatusSigned=Signée (à facturer)
|
|||||||
PropalStatusNotSigned=Non signée (fermée)
|
PropalStatusNotSigned=Non signée (fermée)
|
||||||
PropalStatusBilled=Facturée
|
PropalStatusBilled=Facturée
|
||||||
PropalStatusDraftShort=Brouillon
|
PropalStatusDraftShort=Brouillon
|
||||||
PropalStatusValidatedShort=Validé
|
PropalStatusValidatedShort=Validée (ouverte)
|
||||||
PropalStatusClosedShort=Fermée
|
PropalStatusClosedShort=Fermée
|
||||||
PropalStatusSignedShort=Signée
|
PropalStatusSignedShort=Signée
|
||||||
PropalStatusNotSignedShort=Non signée
|
PropalStatusNotSignedShort=Non signée
|
||||||
|
|||||||
@ -3150,8 +3150,12 @@ class Societe extends CommonObject
|
|||||||
// Define if third party is treated as company (or not) when nature is unknown
|
// Define if third party is treated as company (or not) when nature is unknown
|
||||||
$isacompany=empty($conf->global->MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES)?0:1; // 0 by default
|
$isacompany=empty($conf->global->MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES)?0:1; // 0 by default
|
||||||
if (! empty($this->tva_intra)) $isacompany=1;
|
if (! empty($this->tva_intra)) $isacompany=1;
|
||||||
else if (! empty($this->typent_code) && in_array($this->typent_code,array('TE_PRIVATE'))) $isacompany=0;
|
else if (! empty($this->typent_code) && $this->typent_code != 'TE_UNKNOWN')
|
||||||
else if (! empty($this->typent_code) && in_array($this->typent_code,array('TE_SMALL','TE_MEDIUM','TE_LARGE','TE_GROUP'))) $isacompany=1;
|
{
|
||||||
|
// TODO Add a field is_a_company into dictionary
|
||||||
|
if (preg_match('/^TE_PRIVATE/', $this->typent_code)) $isacompany=0;
|
||||||
|
else $isacompany=1;
|
||||||
|
}
|
||||||
|
|
||||||
return $isacompany;
|
return $isacompany;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -157,7 +157,7 @@ dol_fiche_head($head, 'extsites', $langs->trans("User"), -1, 'user');
|
|||||||
$linkback = '';
|
$linkback = '';
|
||||||
|
|
||||||
if ($user->rights->user->user->lire || $user->admin) {
|
if ($user->rights->user->user->lire || $user->admin) {
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||||
|
|||||||
@ -194,7 +194,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
|
|||||||
$linkback = '';
|
$linkback = '';
|
||||||
|
|
||||||
if ($user->rights->user->user->lire || $user->admin) {
|
if ($user->rights->user->user->lire || $user->admin) {
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||||
|
|||||||
@ -2285,7 +2285,7 @@ else
|
|||||||
{
|
{
|
||||||
print '<tr><td>' . fieldLabel( 'Categories', 'usercats' ) . '</td>';
|
print '<tr><td>' . fieldLabel( 'Categories', 'usercats' ) . '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$cate_arbo = $form->select_all_categories( Categorie::TYPE_CONTACT, null, null, null, null, 1 );
|
$cate_arbo = $form->select_all_categories( Categorie::TYPE_USER, null, null, null, null, 1 );
|
||||||
$c = new Categorie( $db );
|
$c = new Categorie( $db );
|
||||||
$cats = $c->containing($object->id, Categorie::TYPE_USER);
|
$cats = $c->containing($object->id, Categorie::TYPE_USER);
|
||||||
foreach ($cats as $cat) {
|
foreach ($cats as $cat) {
|
||||||
|
|||||||
@ -102,7 +102,7 @@ if ($id > 0)
|
|||||||
$linkback = '';
|
$linkback = '';
|
||||||
|
|
||||||
if ($user->rights->user->user->lire || $user->admin) {
|
if ($user->rights->user->user->lire || $user->admin) {
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||||
|
|||||||
@ -133,7 +133,7 @@ if ($object->id)
|
|||||||
|
|
||||||
$linkback = '';
|
$linkback = '';
|
||||||
if ($user->rights->user->user->lire || $user->admin) {
|
if ($user->rights->user->user->lire || $user->admin) {
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||||
|
|||||||
@ -72,7 +72,7 @@ dol_fiche_head($head, 'info', $title, -1, 'user');
|
|||||||
$linkback = '';
|
$linkback = '';
|
||||||
|
|
||||||
if ($user->rights->user->user->lire || $user->admin) {
|
if ($user->rights->user->user->lire || $user->admin) {
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);
|
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);
|
||||||
|
|||||||
@ -98,7 +98,7 @@ dol_fiche_head($head, 'ldap', $title, 0, 'user');
|
|||||||
$linkback = '';
|
$linkback = '';
|
||||||
|
|
||||||
if ($user->rights->user->user->lire || $user->admin) {
|
if ($user->rights->user->user->lire || $user->admin) {
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||||
|
|||||||
@ -126,7 +126,7 @@ $optioncss = GETPOST('optioncss','alpha');
|
|||||||
|
|
||||||
// Default search
|
// Default search
|
||||||
if ($search_statut == '') $search_statut='1';
|
if ($search_statut == '') $search_statut='1';
|
||||||
if ($mode == 'employee') $search_employee=1;
|
if ($mode == 'employee' && ! GETPOSTISSET('search_employee')) $search_employee=1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -93,7 +93,7 @@ if ($id)
|
|||||||
$linkback = '';
|
$linkback = '';
|
||||||
|
|
||||||
if ($user->rights->user->user->lire || $user->admin) {
|
if ($user->rights->user->user->lire || $user->admin) {
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||||
|
|||||||
@ -137,7 +137,7 @@ if ($result > 0)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'notify', $langs->trans("User"), -1, 'user');
|
dol_fiche_head($head, 'notify', $langs->trans("User"), -1, 'user');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', '', '', 0, '', '', 0, '');
|
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', '', '', 0, '', '', 0, '');
|
||||||
|
|
||||||
|
|||||||
@ -195,7 +195,7 @@ if ($action == 'edit')
|
|||||||
$linkback = '';
|
$linkback = '';
|
||||||
|
|
||||||
if ($user->rights->user->user->lire || $user->admin) {
|
if ($user->rights->user->user->lire || $user->admin) {
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||||
|
|||||||
@ -239,7 +239,7 @@ else
|
|||||||
$linkback = '';
|
$linkback = '';
|
||||||
|
|
||||||
if ($user->rights->user->user->lire || $user->admin) {
|
if ($user->rights->user->user->lire || $user->admin) {
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user