Merge branch 'develop' into dev_EventOrganisation_ProjectCardAndList
This commit is contained in:
commit
70e2d1dbbd
@ -72,6 +72,9 @@ FIX: User creation of expense report not visible
|
|||||||
FIX: warning when adding a line if $remise_percent is an empty string
|
FIX: warning when adding a line if $remise_percent is an empty string
|
||||||
FIX: status late on purchase orders
|
FIX: status late on purchase orders
|
||||||
FIX: ODT generation very slow
|
FIX: ODT generation very slow
|
||||||
|
FIX: amount in summary of report
|
||||||
|
FIX: vat value when code contains number
|
||||||
|
FIX: payment term label on PDF
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 13.0.0 compared to 12.0.0 *****
|
***** ChangeLog for 13.0.0 compared to 12.0.0 *****
|
||||||
|
|||||||
BIN
doc/images/dolibarr_screenshot12_1920x1080.jpg
Normal file
BIN
doc/images/dolibarr_screenshot12_1920x1080.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 219 KiB |
@ -359,9 +359,9 @@ class AccountancyExport
|
|||||||
print length_accountg($line->numero_compte).$separator;
|
print length_accountg($line->numero_compte).$separator;
|
||||||
print length_accounta($line->subledger_account).$separator;
|
print length_accounta($line->subledger_account).$separator;
|
||||||
print $line->sens.$separator;
|
print $line->sens.$separator;
|
||||||
print price($line->montant).$separator;
|
print price2fec(abs($line->montant)).$separator;
|
||||||
print $line->label_operation.$separator;
|
print dol_string_unaccent($line->label_operation).$separator;
|
||||||
print $line->doc_ref;
|
print dol_string_unaccent($line->doc_ref);
|
||||||
print $end_line;
|
print $end_line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -796,7 +796,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("NewMember"), '', 'members');
|
print load_fiche_titre($langs->trans("NewMember"), '', $object->picto);
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print "\n".'<script type="text/javascript" language="javascript">';
|
print "\n".'<script type="text/javascript" language="javascript">';
|
||||||
|
|||||||
@ -236,7 +236,7 @@ $form = new Form($db);
|
|||||||
|
|
||||||
llxHeader('', $langs->trans("MembersCards"));
|
llxHeader('', $langs->trans("MembersCards"));
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("LinkToGeneratedPages"), '', 'members');
|
print load_fiche_titre($langs->trans("LinkToGeneratedPages"), '', $adherentstatic->picto);
|
||||||
|
|
||||||
print '<span class="opacitymedium">'.$langs->trans("LinkToGeneratedPagesDesc").'</span><br>';
|
print '<span class="opacitymedium">'.$langs->trans("LinkToGeneratedPagesDesc").'</span><br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -46,7 +46,7 @@ class AdherentType extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||||
*/
|
*/
|
||||||
public $picto = 'group';
|
public $picto = 'members';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
|
|||||||
@ -52,7 +52,7 @@ $staticmember = new Adherent($db);
|
|||||||
$statictype = new AdherentType($db);
|
$statictype = new AdherentType($db);
|
||||||
$subscriptionstatic = new Subscription($db);
|
$subscriptionstatic = new Subscription($db);
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("MembersArea"), '', 'members');
|
print load_fiche_titre($langs->trans("MembersArea"), '', 'member');
|
||||||
|
|
||||||
$Adherents = array();
|
$Adherents = array();
|
||||||
$AdherentsAValider = array();
|
$AdherentsAValider = array();
|
||||||
|
|||||||
@ -425,7 +425,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
|||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
$topicmail = "Information";
|
$topicmail = "Information";
|
||||||
$modelmail = "member";
|
$modelmail = "member";
|
||||||
@ -443,8 +443,7 @@ $moreforfilter = '';
|
|||||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
$moreforfilter .= $langs->trans('Categories').': ';
|
$moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedlength"').$formother->select_categories(Categorie::TYPE_MEMBER, $search_categ, 'search_categ', 1);
|
||||||
$moreforfilter .= $formother->select_categories(Categorie::TYPE_MEMBER, $search_categ, 'search_categ', 1);
|
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
}
|
}
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
|
|||||||
@ -57,7 +57,7 @@ llxHeader('', $langs->trans("MembersStatisticsByProperties"), '', '', 0, 0, arra
|
|||||||
|
|
||||||
$title = $langs->trans("MembersStatisticsByProperties");
|
$title = $langs->trans("MembersStatisticsByProperties");
|
||||||
|
|
||||||
print load_fiche_titre($title, '', 'object_group');
|
print load_fiche_titre($title, '', $memberstatic->picto);
|
||||||
|
|
||||||
dol_mkdir($dir);
|
dol_mkdir($dir);
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ if ($resql) {
|
|||||||
|
|
||||||
$head = member_stats_prepare_head($adh);
|
$head = member_stats_prepare_head($adh);
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'statsbyproperties', $langs->trans("Statistics"), -1, 'user');
|
print dol_get_fiche_head($head, 'statsbyproperties', '', -1, '');
|
||||||
|
|
||||||
|
|
||||||
// Print title
|
// Print title
|
||||||
|
|||||||
@ -25,6 +25,7 @@ require '../../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
|
|
||||||
$graphwidth = DolGraph::getDefaultGraphSizeForStats('width', 700);
|
$graphwidth = DolGraph::getDefaultGraphSizeForStats('width', 700);
|
||||||
$mapratio = 0.5;
|
$mapratio = 0.5;
|
||||||
@ -52,6 +53,8 @@ $langs->loadLangs(array("companies", "members", "banks"));
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$memberstatic = new Adherent($db);
|
||||||
|
|
||||||
$arrayjs = array('https://www.google.com/jsapi');
|
$arrayjs = array('https://www.google.com/jsapi');
|
||||||
if (!empty($conf->dol_use_jmobile)) $arrayjs = array();
|
if (!empty($conf->dol_use_jmobile)) $arrayjs = array();
|
||||||
|
|
||||||
@ -63,7 +66,7 @@ if ($mode == 'memberbyregion') $title = $langs->trans("MembersStatisticsByRegion
|
|||||||
|
|
||||||
llxHeader('', $title, '', '', 0, 0, $arrayjs);
|
llxHeader('', $title, '', '', 0, 0, $arrayjs);
|
||||||
|
|
||||||
print load_fiche_titre($title, '', 'object_group');
|
print load_fiche_titre($title, '', $memberstatic->picto);
|
||||||
|
|
||||||
dol_mkdir($dir);
|
dol_mkdir($dir);
|
||||||
|
|
||||||
@ -196,7 +199,7 @@ if ($mode) {
|
|||||||
|
|
||||||
$head = member_stats_prepare_head($adh);
|
$head = member_stats_prepare_head($adh);
|
||||||
|
|
||||||
print dol_get_fiche_head($head, $tab, $langs->trans("Statistics"), -1, 'user');
|
print dol_get_fiche_head($head, $tab, '', -1, '');
|
||||||
|
|
||||||
|
|
||||||
// Print title
|
// Print title
|
||||||
@ -268,7 +271,6 @@ if (count($arrayjs) && $mode == 'memberbycountry') {
|
|||||||
|
|
||||||
// print the div tag that will contain the map
|
// print the div tag that will contain the map
|
||||||
print '<div class="center" id="'.$mode.'"></div>'."\n";
|
print '<div class="center" id="'.$mode.'"></div>'."\n";
|
||||||
print '<br>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode) {
|
if ($mode) {
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherentstats.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherentstats.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
@ -53,12 +54,13 @@ $langs->loadLangs(array("companies", "members"));
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$memberstatic = new Adherent($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$title = $langs->trans("SubscriptionsStatistics");
|
$title = $langs->trans("SubscriptionsStatistics");
|
||||||
llxHeader('', $title);
|
llxHeader('', $title);
|
||||||
|
|
||||||
print load_fiche_titre($title, '', 'members');
|
print load_fiche_titre($title, '', $memberstatic->picto);
|
||||||
|
|
||||||
$dir = $conf->adherent->dir_temp;
|
$dir = $conf->adherent->dir_temp;
|
||||||
|
|
||||||
@ -133,7 +135,7 @@ if (!$mesg) {
|
|||||||
|
|
||||||
$head = member_stats_prepare_head($adh);
|
$head = member_stats_prepare_head($adh);
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'statssubscription', $langs->trans("Statistics"), -1, 'user');
|
print dol_get_fiche_head($head, 'statssubscription', '', -1, '');
|
||||||
|
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|||||||
@ -153,8 +153,8 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->adherent-
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||||
llxHeader('', $langs->trans("SubscriptionCard"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
llxHeader('', $langs->trans("SubscriptionCard"), $help_url);
|
||||||
|
|
||||||
|
|
||||||
dol_htmloutput_errors($errmsg);
|
dol_htmloutput_errors($errmsg);
|
||||||
|
|||||||
@ -209,7 +209,8 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
llxHeader('', $langs->trans("ListOfSubscriptions"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||||
|
llxHeader('', $langs->trans("ListOfSubscriptions"), $help_url);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
@ -253,7 +254,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
|||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $subscription->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
$topicmail = "Information";
|
$topicmail = "Information";
|
||||||
$modelmail = "subscription";
|
$modelmail = "subscription";
|
||||||
|
|||||||
@ -203,7 +203,8 @@ if ($action == 'confirm_delete' && $user->rights->adherent->configurer) {
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formproduct = new FormProduct($db);
|
$formproduct = new FormProduct($db);
|
||||||
|
|
||||||
llxHeader('', $langs->trans("MembersTypeSetup"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||||
|
llxHeader('', $langs->trans("MembersTypeSetup"), $help_url);
|
||||||
|
|
||||||
// List of members type
|
// List of members type
|
||||||
if (!$rowid && $action != 'create' && $action != 'edit') {
|
if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||||
|
|||||||
@ -319,7 +319,7 @@ print '<tr class="liste_titre">';
|
|||||||
print '<td width="300">'.$langs->trans("Box").'</td>';
|
print '<td width="300">'.$langs->trans("Box").'</td>';
|
||||||
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
||||||
print '<td>'.$langs->trans("SourceFile").'</td>';
|
print '<td>'.$langs->trans("SourceFile").'</td>';
|
||||||
print '<td width="160" class="center">'.$langs->trans("ActivateOn").'</td>';
|
print '<td width="160" class="center">'.$langs->trans("ActivatableOn").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
foreach ($boxtoadd as $box) {
|
foreach ($boxtoadd as $box) {
|
||||||
@ -377,7 +377,7 @@ print '<table class="tagtable liste">'."\n";
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td width="300">'.$langs->trans("Box").'</td>';
|
print '<td width="300">'.$langs->trans("Box").'</td>';
|
||||||
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
||||||
print '<td class="center" width="160">'.$langs->trans("ActiveOn").'</td>';
|
print '<td class="center" width="160">'.$langs->trans("ActivatableOn").'</td>';
|
||||||
print '<td class="center" width="60" colspan="2">'.$langs->trans("PositionByDefault").'</td>';
|
print '<td class="center" width="60" colspan="2">'.$langs->trans("PositionByDefault").'</td>';
|
||||||
print '<td class="center" width="80">'.$langs->trans("Disable").'</td>';
|
print '<td class="center" width="80">'.$langs->trans("Disable").'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|||||||
@ -73,7 +73,7 @@ print '<br>';
|
|||||||
|
|
||||||
$head = ecm_admin_prepare_head();
|
$head = ecm_admin_prepare_head();
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'ecm', $langs->trans("ECM"), -1, 'ecm');
|
print dol_get_fiche_head($head, 'ecm', '', -1, '');
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -80,7 +80,7 @@ print "<br>\n";
|
|||||||
|
|
||||||
$head = ecm_admin_prepare_head();
|
$head = ecm_admin_prepare_head();
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'attributes_ecm_directories', $langs->trans("ECM"), -1, 'ecm');
|
print dol_get_fiche_head($head, 'attributes_ecm_directories', '', -1, '');
|
||||||
|
|
||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,7 @@ print "<br>\n";
|
|||||||
|
|
||||||
$head = ecm_admin_prepare_head();
|
$head = ecm_admin_prepare_head();
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'attributes_ecm_files', $langs->trans("ECM"), -1, 'ecm');
|
print dol_get_fiche_head($head, 'attributes_ecm_files', '', -1, '');
|
||||||
|
|
||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('errors', 'admin', 'modulebuilder'));
|
$langs->loadLangs(array('errors', 'admin', 'modulebuilder', 'exports'));
|
||||||
|
|
||||||
$mode = GETPOST('mode', 'alpha');
|
$mode = GETPOST('mode', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
|
|||||||
@ -525,7 +525,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
|||||||
|
|
||||||
$moreforfilter .= '<div class="colorbacktimesheet float valignmiddle">';
|
$moreforfilter .= '<div class="colorbacktimesheet float valignmiddle">';
|
||||||
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
||||||
$moreforfilter .= img_picto($langs->trans("Filter"), 'filter', 'class="paddingright opacitymedium"').'<input type="text" id="search_keyword" name="search_keyword" class="maxwidth100" value="'.dol_escape_htmltag($search_keyword).'" placeholder="'.dol_escape_htmltag($langs->trans('Keyword')).'">';
|
$moreforfilter .= img_picto($langs->trans("Filter"), 'filter', 'class="paddingright opacitymedium"').'<input type="text" id="search_keyword" name="search_keyword" class="maxwidth125" value="'.dol_escape_htmltag($search_keyword).'" placeholder="'.dol_escape_htmltag($langs->trans('Keyword')).'">';
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
$moreforfilter .= '<div class="divsearchfield paddingtop">';
|
||||||
$moreforfilter .= $form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), $langs->trans('Origin'), 0, 0, '', 0, 0, 0, '', 'maxwidth200', 1);
|
$moreforfilter .= $form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), $langs->trans('Origin'), 0, 0, '', 0, 0, 0, '', 'maxwidth200', 1);
|
||||||
@ -1073,9 +1073,9 @@ if ($mode == 'deploy') {
|
|||||||
} else {
|
} else {
|
||||||
print $langs->trans("ThisIsAlternativeProcessToFollow").'<br>';
|
print $langs->trans("ThisIsAlternativeProcessToFollow").'<br>';
|
||||||
print '<b>'.$langs->trans("StepNb", 1).'</b>: ';
|
print '<b>'.$langs->trans("StepNb", 1).'</b>: ';
|
||||||
print $langs->trans("FindPackageFromWebSite", $fullurl).'<br>';
|
print str_replace('{s1}', $fullurl, $langs->trans("FindPackageFromWebSite", '{s1}')).'<br>';
|
||||||
print '<b>'.$langs->trans("StepNb", 2).'</b>: ';
|
print '<b>'.$langs->trans("StepNb", 2).'</b>: ';
|
||||||
print $langs->trans("DownloadPackageFromWebSite", $fullurl).'<br>';
|
print str_replace('{s1}', $fullurl, $langs->trans("DownloadPackageFromWebSite", '{s1}')).'<br>';
|
||||||
print '<b>'.$langs->trans("StepNb", 3).'</b>: ';
|
print '<b>'.$langs->trans("StepNb", 3).'</b>: ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -326,7 +326,8 @@ print '</td></tr>';
|
|||||||
print '<tr class="oddeven"><td>'.$langs->trans("PDF_USE_ALSO_LANGUAGE_CODE").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("PDF_USE_ALSO_LANGUAGE_CODE").'</td><td>';
|
||||||
//if (! empty($conf->global->MAIN_MULTILANGS))
|
//if (! empty($conf->global->MAIN_MULTILANGS))
|
||||||
//{
|
//{
|
||||||
print $formadmin->select_language(GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? GETPOST('PDF_USE_ALSO_LANGUAGE_CODE') : (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) ? $conf->global->PDF_USE_ALSO_LANGUAGE_CODE : 0), 'PDF_USE_ALSO_LANGUAGE_CODE', 0, null, 1);
|
$selected = GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? GETPOST('PDF_USE_ALSO_LANGUAGE_CODE') : (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) ? $conf->global->PDF_USE_ALSO_LANGUAGE_CODE : 0);
|
||||||
|
print $formadmin->select_language($selected, 'PDF_USE_ALSO_LANGUAGE_CODE', 0, null, 1);
|
||||||
//} else {
|
//} else {
|
||||||
// print '<span class="opacitymedium">'.$langs->trans("MultiLangNotEnabled").'</span>';
|
// print '<span class="opacitymedium">'.$langs->trans("MultiLangNotEnabled").'</span>';
|
||||||
//}
|
//}
|
||||||
|
|||||||
@ -64,9 +64,10 @@ if ($action == 'getlastversion')
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
$help_url = '';
|
||||||
$title = $langs->trans("InfoDolibarr");
|
$title = $langs->trans("InfoDolibarr");
|
||||||
|
|
||||||
llxHeader('', $title);
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
print load_fiche_titre($title, '', 'title_setup');
|
print load_fiche_titre($title, '', 'title_setup');
|
||||||
|
|
||||||
|
|||||||
@ -110,7 +110,12 @@ if ($action == 'update') {
|
|||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Set boolean (on/off) constants
|
||||||
|
elseif (preg_match('/^(set|del)_?([A-Z_]+)$/', $action, $reg)) {
|
||||||
|
if (!dolibarr_set_const($db, $reg[2], ($reg[1] === 'set' ? '1' : '0'), 'chaine', 0, '', $conf->entity) > 0) {
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -248,11 +253,26 @@ print "<br>\n";
|
|||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="button">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="button">';
|
||||||
|
print '<br/><br/>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
// Options
|
||||||
|
|
||||||
|
echo '<div>';
|
||||||
|
echo '<table class="noborder centpercent">';
|
||||||
|
echo '<thead>';
|
||||||
|
echo '<tr class="liste_titre"><th>' . $langs->trans('Parameter') . '</th><th>' . $langs->trans('Value') . '</th></tr>';
|
||||||
|
echo '</thead>';
|
||||||
|
echo '<tbody>';
|
||||||
|
|
||||||
|
$key = 'CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT';
|
||||||
|
echo '<tr><td>', $langs->trans($key), '</td><td>', ajax_constantonoff($key), '</td></tr>';
|
||||||
|
|
||||||
|
echo '</tbody>';
|
||||||
|
echo '</table>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
if (!empty($conf->accounting->enabled))
|
if (!empty($conf->accounting->enabled))
|
||||||
|
|||||||
@ -166,7 +166,8 @@ if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin)
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('', $langs->trans("Audit"));
|
$title = $langs->trans("Audit");
|
||||||
|
llxHeader('', $title);
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -70,7 +70,7 @@ $workflowcodes = array(
|
|||||||
'picto'=>'bill'
|
'picto'=>'bill'
|
||||||
),
|
),
|
||||||
|
|
||||||
'separator1'=>array('family'=>'separator', 'position'=>25),
|
'separator1'=>array('family'=>'separator', 'position'=>25, 'title'=>''),
|
||||||
|
|
||||||
// Automatic classification of proposal
|
// Automatic classification of proposal
|
||||||
'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array(
|
'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array(
|
||||||
@ -183,6 +183,7 @@ foreach ($workflowcodes as $key => $params) {
|
|||||||
if ($params['family'] == 'separator') {
|
if ($params['family'] == 'separator') {
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@ -773,7 +773,6 @@ class BlockedLog
|
|||||||
*/
|
*/
|
||||||
public function create($user, $forcesignature = '')
|
public function create($user, $forcesignature = '')
|
||||||
{
|
{
|
||||||
|
|
||||||
global $conf, $langs, $hookmanager;
|
global $conf, $langs, $hookmanager;
|
||||||
|
|
||||||
$langs->load('blockedlog');
|
$langs->load('blockedlog');
|
||||||
@ -814,6 +813,8 @@ class BlockedLog
|
|||||||
|
|
||||||
$keyforsignature = $this->buildKeyForSignature();
|
$keyforsignature = $this->buildKeyForSignature();
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
|
||||||
|
|
||||||
$this->signature_line = dol_hash($keyforsignature, '5'); // Not really usefull
|
$this->signature_line = dol_hash($keyforsignature, '5'); // Not really usefull
|
||||||
$this->signature = dol_hash($previoushash.$keyforsignature, '5');
|
$this->signature = dol_hash($previoushash.$keyforsignature, '5');
|
||||||
if ($forcesignature) $this->signature = $forcesignature;
|
if ($forcesignature) $this->signature = $forcesignature;
|
||||||
|
|||||||
@ -730,8 +730,8 @@ if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate')
|
|||||||
{
|
{
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$shour = dol_print_date($object->datep, "%H");
|
$shour = dol_print_date($object->datep, "%H", 'tzuserrel'); // We take the date visible by user $newdate is also date visible by user.
|
||||||
$smin = dol_print_date($object->datep, "%M");
|
$smin = dol_print_date($object->datep, "%M", 'tzuserrel');
|
||||||
|
|
||||||
$newdate = GETPOST('newdate', 'alpha');
|
$newdate = GETPOST('newdate', 'alpha');
|
||||||
if (empty($newdate) || strpos($newdate, 'dayevent_') != 0)
|
if (empty($newdate) || strpos($newdate, 'dayevent_') != 0)
|
||||||
@ -740,7 +740,9 @@ if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate')
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$datep = dol_mktime($shour, $smin, 0, substr($newdate, 13, 2), substr($newdate, 15, 2), substr($newdate, 9, 4));
|
$datep = dol_mktime($shour, $smin, 0, substr($newdate, 13, 2), substr($newdate, 15, 2), substr($newdate, 9, 4), 'tzuserrel');
|
||||||
|
//print dol_print_date($datep, 'dayhour');exit;
|
||||||
|
|
||||||
if ($datep != $object->datep)
|
if ($datep != $object->datep)
|
||||||
{
|
{
|
||||||
if (!empty($object->datef))
|
if (!empty($object->datef))
|
||||||
|
|||||||
@ -85,6 +85,11 @@ class ActionComm extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $type_id;
|
public $type_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Calendar of event (Type of type of event). 'system'=Default calendar, 'systemauto'=Auto calendar, 'birthdate', 'holiday', 'module'=Calendar specific to a module
|
||||||
|
*/
|
||||||
|
public $type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Code into parent table llx_c_actioncomm (used only if option to use type is set). With default setup, should be AC_OTH_AUTO or AC_OTH.
|
* @var string Code into parent table llx_c_actioncomm (used only if option to use type is set). With default setup, should be AC_OTH_AUTO or AC_OTH.
|
||||||
*/
|
*/
|
||||||
@ -95,16 +100,16 @@ class ActionComm extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $type_label;
|
public $type_label;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string Label into parent table llx_c_actioncomm (used only if option to use type is set)
|
|
||||||
*/
|
|
||||||
public $type;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Color into parent table llx_c_actioncomm (used only if option to use type is set)
|
* @var string Color into parent table llx_c_actioncomm (used only if option to use type is set)
|
||||||
*/
|
*/
|
||||||
public $type_color;
|
public $type_color;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Picto for type of event (used only if option to use type is set)
|
||||||
|
*/
|
||||||
|
public $type_picto;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Free code to identify action. Ie: Agenda trigger add here AC_TRIGGERNAME ('AC_COMPANY_CREATE', 'AC_PROPAL_VALIDATE', ...)
|
* @var string Free code to identify action. Ie: Agenda trigger add here AC_TRIGGERNAME ('AC_COMPANY_CREATE', 'AC_PROPAL_VALIDATE', ...)
|
||||||
*/
|
*/
|
||||||
@ -1376,7 +1381,7 @@ class ActionComm extends CommonObject
|
|||||||
* @param int $maxlength Max number of charaters into label. If negative, use the ref as label.
|
* @param int $maxlength Max number of charaters into label. If negative, use the ref as label.
|
||||||
* @param string $classname Force style class on a link
|
* @param string $classname Force style class on a link
|
||||||
* @param string $option '' = Link to action, 'birthday'= Link to contact, 'holiday' = Link to leave
|
* @param string $option '' = Link to action, 'birthday'= Link to contact, 'holiday' = Link to leave
|
||||||
* @param int $overwritepicto 1 = Overwrite picto
|
* @param int $overwritepicto 1 = Overwrite picto with this one
|
||||||
* @param int $notooltip 1 = Disable tooltip
|
* @param int $notooltip 1 = Disable tooltip
|
||||||
* @param int $save_lastsearch_value -1 = Auto, 0 = No save of lastsearch_values when clicking, 1 = Save lastsearch_values whenclicking
|
* @param int $save_lastsearch_value -1 = Auto, 0 = No save of lastsearch_values when clicking, 1 = Save lastsearch_values whenclicking
|
||||||
* @return string Chaine avec URL
|
* @return string Chaine avec URL
|
||||||
@ -1426,8 +1431,8 @@ class ActionComm extends CommonObject
|
|||||||
if (!empty($this->note_private))
|
if (!empty($this->note_private))
|
||||||
$tooltip .= '<br><b>'.$langs->trans('Note').':</b> '.(dol_textishtml($this->note_private) ? str_replace(array("\r", "\n"), "", $this->note_private) : str_replace(array("\r", "\n"), '<br>', $this->note_private));
|
$tooltip .= '<br><b>'.$langs->trans('Note').':</b> '.(dol_textishtml($this->note_private) ? str_replace(array("\r", "\n"), "", $this->note_private) : str_replace(array("\r", "\n"), '<br>', $this->note_private));
|
||||||
$linkclose = '';
|
$linkclose = '';
|
||||||
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
|
//if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
|
||||||
$linkclose = ' style="background-color:#'.$this->type_color.'"';
|
// $linkclose = ' style="background-color:#'.$this->type_color.'"';
|
||||||
|
|
||||||
if (empty($notooltip))
|
if (empty($notooltip))
|
||||||
{
|
{
|
||||||
@ -1453,6 +1458,7 @@ class ActionComm extends CommonObject
|
|||||||
elseif ($option == 'holiday')
|
elseif ($option == 'holiday')
|
||||||
$url = DOL_URL_ROOT.'/holiday/card.php?id='.$this->id;
|
$url = DOL_URL_ROOT.'/holiday/card.php?id='.$this->id;
|
||||||
else $url = DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id;
|
else $url = DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id;
|
||||||
|
|
||||||
if ($option !== 'nolink')
|
if ($option !== 'nolink')
|
||||||
{
|
{
|
||||||
// Add param to save lastsearch_values or not
|
// Add param to save lastsearch_values or not
|
||||||
@ -1494,7 +1500,7 @@ class ActionComm extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result .= $linkstart;
|
$result .= $linkstart;
|
||||||
if ($withpicto) $result .= img_object(($notooltip ? '' : $langs->trans("ShowAction").': '.$libelle), ($overwritepicto ? $overwritepicto : 'action'), ($notooltip ? 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"' : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
if ($withpicto) $result .= img_object(($notooltip ? '' : $langs->trans("ShowAction").': '.$libelle), ($overwritepicto ? $overwritepicto : 'action'), (($this->type_color && $overwritepicto) ? 'style="color: #'.$this->type_color.' !important;" ' : '').($notooltip ? 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"' : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
||||||
$result .= $libelleshort;
|
$result .= $libelleshort;
|
||||||
$result .= $linkend;
|
$result .= $linkend;
|
||||||
|
|
||||||
@ -1520,21 +1526,25 @@ class ActionComm extends CommonObject
|
|||||||
$imgpicto = '';
|
$imgpicto = '';
|
||||||
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||||
{
|
{
|
||||||
|
$color = '';
|
||||||
|
if ($this->type_color) {
|
||||||
|
$color = 'style="color: #'.$this->type_color.' !important;"';
|
||||||
|
}
|
||||||
if ($this->type_picto) {
|
if ($this->type_picto) {
|
||||||
$imgpicto = img_picto('', $this->type_picto, 'class="paddingright"');
|
$imgpicto = img_picto('', $this->type_picto, 'class="paddingright"');
|
||||||
} else {
|
} else {
|
||||||
if ($this->type_code == 'AC_RDV') $imgpicto = img_picto('', 'meeting', '', false, 0, 0, '', 'paddingright');
|
if ($this->type_code == 'AC_RDV') $imgpicto = img_picto('', 'meeting', $color, false, 0, 0, '', 'paddingright');
|
||||||
elseif ($this->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright');
|
elseif ($this->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', $color, false, 0, 0, '', 'paddingright');
|
||||||
elseif ($this->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright');
|
elseif ($this->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', $color, false, 0, 0, '', 'paddingright');
|
||||||
elseif ($this->type_code == 'AC_EMAIL' || $this->type_code == 'AC_EMAIL_IN') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright');
|
elseif ($this->type_code == 'AC_EMAIL' || $this->type_code == 'AC_EMAIL_IN') $imgpicto = img_picto('', 'object_email', $color, false, 0, 0, '', 'paddingright');
|
||||||
elseif ($this->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright');
|
elseif ($this->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', $color, false, 0, 0, '', 'paddingright');
|
||||||
elseif ($this->type_code == 'AC_OTH' && $this->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright');
|
elseif ($this->type_code == 'AC_OTH' && $this->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', $color, false, 0, 0, '', 'paddingright');
|
||||||
elseif (!preg_match('/_AUTO/', $this->type_code)) $imgpicto = img_picto('', 'user-cog', '', false, 0, 0, '', 'paddingright');
|
elseif ($this->type != 'systemauto') $imgpicto = img_picto('', 'user-cog', $color, false, 0, 0, '', 'paddingright');
|
||||||
else $imgpicto = img_picto('', 'cog', '', false, 0, 0, '', 'paddingright');
|
else $imgpicto = img_picto('', 'cog', $color, false, 0, 0, '', 'paddingright');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 2 picto: 1 for auto, 1 for manual
|
// 2 picto: 1 for auto, 1 for manual
|
||||||
if (!preg_match('/_AUTO/', $this->type_code)) $imgpicto = img_picto('', 'user-cog', '', false, 0, 0, '', 'paddingright');
|
if ($this->type != 'systemauto') $imgpicto = img_picto('', 'user-cog', '', false, 0, 0, '', 'paddingright');
|
||||||
else $imgpicto = img_picto('', 'cog', '', false, 0, 0, '', 'paddingright');
|
else $imgpicto = img_picto('', 'cog', '', false, 0, 0, '', 'paddingright');
|
||||||
}
|
}
|
||||||
return $imgpicto;
|
return $imgpicto;
|
||||||
|
|||||||
@ -142,9 +142,9 @@ class CActionComm
|
|||||||
* Return list of event types: array(id=>label) or array(code=>label)
|
* Return list of event types: array(id=>label) or array(code=>label)
|
||||||
*
|
*
|
||||||
* @param string|int $active 1 or 0 to filter on event state active or not ('' by default = no filter)
|
* @param string|int $active 1 or 0 to filter on event state active or not ('' by default = no filter)
|
||||||
* @param string $idorcode 'id' or 'code'
|
* @param string $idorcode 'id' or 'code' or 'all'
|
||||||
* @param string $excludetype Type to exclude ('system' or 'systemauto')
|
* @param string $excludetype Type to exclude ('system' or 'systemauto')
|
||||||
* @param int $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type, -1=Keep details and add a combined line "All manual"
|
* @param int $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type, -1=Keep details and add a combined line per calendar (Default, Auto, BoothConf, ...)
|
||||||
* @param string $morefilter Add more SQL filter
|
* @param string $morefilter Add more SQL filter
|
||||||
* @param int $shortlabel 1=Get short label instead of long label
|
* @param int $shortlabel 1=Get short label instead of long label
|
||||||
* @return mixed Array of all event types if OK, <0 if KO. Key of array is id or code depending on parameter $idorcode.
|
* @return mixed Array of all event types if OK, <0 if KO. Key of array is id or code depending on parameter $idorcode.
|
||||||
@ -157,6 +157,7 @@ class CActionComm
|
|||||||
|
|
||||||
$repid = array();
|
$repid = array();
|
||||||
$repcode = array();
|
$repcode = array();
|
||||||
|
$repall = array();
|
||||||
|
|
||||||
$sql = "SELECT id, code, libelle as label, module, type, color, picto";
|
$sql = "SELECT id, code, libelle as label, module, type, color, picto";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_actioncomm";
|
$sql .= " FROM ".MAIN_DB_PREFIX."c_actioncomm";
|
||||||
@ -166,7 +167,7 @@ class CActionComm
|
|||||||
}
|
}
|
||||||
if (!empty($excludetype)) $sql .= " AND type <> '".$this->db->escape($excludetype)."'";
|
if (!empty($excludetype)) $sql .= " AND type <> '".$this->db->escape($excludetype)."'";
|
||||||
if ($morefilter) $sql .= " AND ".$morefilter;
|
if ($morefilter) $sql .= " AND ".$morefilter;
|
||||||
$sql .= " ORDER BY module, position, type";
|
$sql .= " ORDER BY type, position, module";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::liste_array", LOG_DEBUG);
|
dol_syslog(get_class($this)."::liste_array", LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
@ -175,6 +176,7 @@ class CActionComm
|
|||||||
$nump = $this->db->num_rows($resql);
|
$nump = $this->db->num_rows($resql);
|
||||||
if ($nump)
|
if ($nump)
|
||||||
{
|
{
|
||||||
|
$idforallfornewmodule = 97;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $nump)
|
while ($i < $nump)
|
||||||
{
|
{
|
||||||
@ -200,8 +202,12 @@ class CActionComm
|
|||||||
$keyfortrans = '';
|
$keyfortrans = '';
|
||||||
$transcode = '';
|
$transcode = '';
|
||||||
$code = $obj->code;
|
$code = $obj->code;
|
||||||
if ($onlyautoornot > 0 && $code == 'AC_OTH') $code = 'AC_MANUAL';
|
$typecalendar = $obj->type;
|
||||||
if ($onlyautoornot > 0 && $code == 'AC_OTH_AUTO') $code = 'AC_AUTO';
|
|
||||||
|
if ($onlyautoornot > 0 && $typecalendar == 'system') $code = 'AC_MANUAL';
|
||||||
|
elseif ($onlyautoornot > 0 && $typecalendar == 'systemauto') $code = 'AC_AUTO';
|
||||||
|
elseif ($onlyautoornot > 0) $code = 'AC_'.strtoupper($obj->module);
|
||||||
|
|
||||||
if ($shortlabel)
|
if ($shortlabel)
|
||||||
{
|
{
|
||||||
$keyfortrans = "Action".$code.'Short';
|
$keyfortrans = "Action".$code.'Short';
|
||||||
@ -213,21 +219,43 @@ class CActionComm
|
|||||||
$transcode = $langs->trans($keyfortrans);
|
$transcode = $langs->trans($keyfortrans);
|
||||||
}
|
}
|
||||||
$label = (($transcode != $keyfortrans) ? $transcode : $langs->trans($obj->label));
|
$label = (($transcode != $keyfortrans) ? $transcode : $langs->trans($obj->label));
|
||||||
if ($onlyautoornot == -1 && !empty($conf->global->AGENDA_USE_EVENT_TYPE) && !preg_match('/auto/i', $code))
|
if ($onlyautoornot == -1 && !empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||||
{
|
{
|
||||||
$label = ' '.$label;
|
if ($typecalendar == 'system') {
|
||||||
|
$label = ' '.$label;
|
||||||
$repid[-99] = $langs->trans("ActionAC_MANUAL");
|
$repid[-99] = $langs->trans("ActionAC_MANUAL");
|
||||||
$repcode['AC_NON_AUTO'] = $langs->trans("ActionAC_MANUAL");
|
$repcode['AC_NON_AUTO'] = '-- '.$langs->trans("ActionAC_MANUAL");
|
||||||
|
}
|
||||||
|
if ($typecalendar == 'systemauto') {
|
||||||
|
$label = ' '.$label;
|
||||||
|
$repid[-98] = $langs->trans("ActionAC_AUTO");
|
||||||
|
$repcode['AC_ALL_AUTO'] = '-- '.$langs->trans("ActionAC_AUTO");
|
||||||
|
}
|
||||||
|
if ($typecalendar == 'module') {
|
||||||
|
$label = ' '.$label;
|
||||||
|
if (!isset($repcode['AC_ALL_'.strtoupper($obj->module)])) { // If first time for this module
|
||||||
|
$idforallfornewmodule--;
|
||||||
|
}
|
||||||
|
$repid[$idforallfornewmodule] = $langs->trans("ActionAC_ALL_".strtoupper($obj->module));
|
||||||
|
$repcode['AC_ALL_'.strtoupper($obj->module)] = '-- '.$langs->trans("Module").' '.ucfirst($obj->module);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$repid[$obj->id] = $label;
|
$repid[$obj->id] = $label;
|
||||||
$repcode[$obj->code] = $label;
|
$repcode[$obj->code] = $label;
|
||||||
if ($onlyautoornot > 0 && preg_match('/^module/', $obj->type) && $obj->module) $repcode[$obj->code] .= ' ('.$langs->trans("Module").': '.$obj->module.')';
|
$repall[$obj->code] = array('id' => $label, 'label' => $label, 'type' => $typecalendar, 'color' => $obj->color, 'picto' => $obj->picto);
|
||||||
|
if ($onlyautoornot > 0 && preg_match('/^module/', $obj->type) && $obj->module) {
|
||||||
|
$repcode[$obj->code] .= ' ('.$langs->trans("Module").': '.$obj->module.')';
|
||||||
|
$repall[$obj->code]['label'] .= ' ('.$langs->trans("Module").': '.$obj->module.')';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($idorcode == 'id') $this->liste_array = $repid;
|
if ($idorcode == 'id') $this->liste_array = $repid;
|
||||||
if ($idorcode == 'code') $this->liste_array = $repcode;
|
elseif ($idorcode == 'code') $this->liste_array = $repcode;
|
||||||
|
else $this->liste_array = $repall;
|
||||||
|
|
||||||
return $this->liste_array;
|
return $this->liste_array;
|
||||||
} else {
|
} else {
|
||||||
$this->error = $this->db->lasterror();
|
$this->error = $this->db->lasterror();
|
||||||
|
|||||||
@ -114,8 +114,7 @@ if ($status == '' && !GETPOSTISSET('search_status')) $status = (empty($conf->glo
|
|||||||
$defaultview = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW);
|
$defaultview = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW);
|
||||||
$defaultview = (empty($user->conf->AGENDA_DEFAULT_VIEW) ? $defaultview : $user->conf->AGENDA_DEFAULT_VIEW);
|
$defaultview = (empty($user->conf->AGENDA_DEFAULT_VIEW) ? $defaultview : $user->conf->AGENDA_DEFAULT_VIEW);
|
||||||
if (empty($action) && !GETPOSTISSET('action')) $action = $defaultview;
|
if (empty($action) && !GETPOSTISSET('action')) $action = $defaultview;
|
||||||
if ($action == 'default') // When action is default, we want a calendar view and not the list
|
if ($action == 'default') { // When action is default, we want a calendar view and not the list
|
||||||
{
|
|
||||||
$action = (($defaultview != 'show_list') ? $defaultview : 'show_month');
|
$action = (($defaultview != 'show_list') ? $defaultview : 'show_month');
|
||||||
}
|
}
|
||||||
if (GETPOST('viewcal', 'restricthtml') && GETPOST('action', 'alpha') != 'show_day' && GETPOST('action', 'alpha') != 'show_week') {
|
if (GETPOST('viewcal', 'restricthtml') && GETPOST('action', 'alpha') != 'show_day' && GETPOST('action', 'alpha') != 'show_week') {
|
||||||
@ -346,8 +345,8 @@ if ($resourceid > 0) $param .= "&search_resourceid=".urlencode($resourceid);
|
|||||||
if ($status || GETPOSTISSET('status')) $param .= "&search_status=".urlencode($status);
|
if ($status || GETPOSTISSET('status')) $param .= "&search_status=".urlencode($status);
|
||||||
if ($filter) $param .= "&search_filter=".urlencode($filter);
|
if ($filter) $param .= "&search_filter=".urlencode($filter);
|
||||||
if ($filtert) $param .= "&search_filtert=".urlencode($filtert);
|
if ($filtert) $param .= "&search_filtert=".urlencode($filtert);
|
||||||
if ($usergroup) $param .= "&search_usergroup=".urlencode($usergroup);
|
if ($usergroup > 0) $param .= "&search_usergroup=".urlencode($usergroup);
|
||||||
if ($socid) $param .= "&search_socid=".urlencode($socid);
|
if ($socid > 0) $param .= "&search_socid=".urlencode($socid);
|
||||||
if ($showbirthday) $param .= "&search_showbirthday=1";
|
if ($showbirthday) $param .= "&search_showbirthday=1";
|
||||||
if ($pid) $param .= "&search_projectid=".urlencode($pid);
|
if ($pid) $param .= "&search_projectid=".urlencode($pid);
|
||||||
if ($type) $param .= "&search_type=".urlencode($type);
|
if ($type) $param .= "&search_type=".urlencode($type);
|
||||||
@ -357,32 +356,32 @@ $param .= "&maxprint=".urlencode($maxprint);
|
|||||||
// Show navigation bar
|
// Show navigation bar
|
||||||
if (empty($action) || $action == 'show_month')
|
if (empty($action) || $action == 'show_month')
|
||||||
{
|
{
|
||||||
$nav = "<a href=\"?year=".$prev_year."&month=".$prev_month.$param."\"><i class=\"fa fa-chevron-left\"></i></a> \n";
|
$nav = "<a href=\"?year=".$prev_year."&month=".$prev_month.$param."\"><i class=\"fa fa-chevron-left\"></i></a> \n";
|
||||||
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $month, 1, $year), "%b %Y");
|
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $month, 1, $year), "%b %Y");
|
||||||
$nav .= " </span>\n";
|
$nav .= " </span>\n";
|
||||||
$nav .= " <a href=\"?year=".$next_year."&month=".$next_month.$param."\"><i class=\"fa fa-chevron-right\"></i></a>\n";
|
$nav .= " <a href=\"?year=".$next_year."&month=".$next_month.$param."\"><i class=\"fa fa-chevron-right\"></i></a>\n";
|
||||||
if (empty($conf->dol_optimize_smallscreen)) {
|
if (empty($conf->dol_optimize_smallscreen)) {
|
||||||
$nav .= " <a href=\"?year=".$nowyear."&month=".$nowmonth.$param."\">".$langs->trans("Today")."</a> ";
|
$nav .= " <a href=\"?year=".$nowyear."&month=".$nowmonth.$param."\">".$langs->trans("Today")."</a> ";
|
||||||
}
|
}
|
||||||
$picto = 'calendar';
|
$picto = 'calendar';
|
||||||
}
|
}
|
||||||
if ($action == 'show_week')
|
if ($action == 'show_week')
|
||||||
{
|
{
|
||||||
$nav = "<a href=\"?year=".$prev_year."&month=".$prev_month."&day=".$prev_day.$param."\"><i class=\"fa fa-chevron-left\" title=\"".dol_escape_htmltag($langs->trans("Previous"))."\"></i></a> \n";
|
$nav = "<a href=\"?year=".$prev_year."&month=".$prev_month."&day=".$prev_day.$param."\"><i class=\"fa fa-chevron-left\" title=\"".dol_escape_htmltag($langs->trans("Previous"))."\"></i></a> \n";
|
||||||
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("Week")." ".$week;
|
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("Week")." ".$week;
|
||||||
$nav .= " </span>\n";
|
$nav .= " </span>\n";
|
||||||
$nav .= " <a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\"><i class=\"fa fa-chevron-right\" title=\"".dol_escape_htmltag($langs->trans("Next"))."\"></i></a>\n";
|
$nav .= " <a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\"><i class=\"fa fa-chevron-right\" title=\"".dol_escape_htmltag($langs->trans("Next"))."\"></i></a>\n";
|
||||||
if (empty($conf->dol_optimize_smallscreen)) {
|
if (empty($conf->dol_optimize_smallscreen)) {
|
||||||
$nav .= " <a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a> ";
|
$nav .= " <a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a> ";
|
||||||
}
|
}
|
||||||
$picto = 'calendarweek';
|
$picto = 'calendarweek';
|
||||||
}
|
}
|
||||||
if ($action == 'show_day')
|
if ($action == 'show_day')
|
||||||
{
|
{
|
||||||
$nav = "<a href=\"?year=".$prev_year."&month=".$prev_month."&day=".$prev_day.$param."\"><i class=\"fa fa-chevron-left\"></i></a> \n";
|
$nav = "<a href=\"?year=".$prev_year."&month=".$prev_month."&day=".$prev_day.$param."aaa\"><i class=\"fa fa-chevron-left\"></i></a> \n";
|
||||||
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "daytextshort");
|
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "daytextshort");
|
||||||
$nav .= " </span>\n";
|
$nav .= " </span>\n";
|
||||||
$nav .= " <a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\"><i class=\"fa fa-chevron-right\"></i></a>\n";
|
$nav .= " <a href=\"?year=".$next_year."&month=".$next_month."&day=".$next_day.$param."\"><i class=\"fa fa-chevron-right\"></i></a>\n";
|
||||||
if (empty($conf->dol_optimize_smallscreen)) {
|
if (empty($conf->dol_optimize_smallscreen)) {
|
||||||
$nav .= " <a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a> ";
|
$nav .= " <a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a> ";
|
||||||
}
|
}
|
||||||
@ -394,6 +393,7 @@ $nav .= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0);
|
|||||||
$nav .= '<button type="submit" class="liste_titre button_search" name="button_search_x" value="x"><span class="fa fa-search"></span></button>';
|
$nav .= '<button type="submit" class="liste_titre button_search" name="button_search_x" value="x"><span class="fa fa-search"></span></button>';
|
||||||
|
|
||||||
// Must be after the nav definition
|
// Must be after the nav definition
|
||||||
|
$paramnodate = $param;
|
||||||
$param .= '&year='.$year.'&month='.$month.($day ? '&day='.$day : '');
|
$param .= '&year='.$year.'&month='.$month.($day ? '&day='.$day : '');
|
||||||
//print 'x'.$param;
|
//print 'x'.$param;
|
||||||
|
|
||||||
@ -410,6 +410,7 @@ if ($action == 'show_pertype') $tabactive = 'cardpertype';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$paramnoaction = preg_replace('/action=[a-z_]+/', '', $param);
|
$paramnoaction = preg_replace('/action=[a-z_]+/', '', $param);
|
||||||
|
$paramnoactionodate = preg_replace('/action=[a-z_]+/', '', $paramnodate);
|
||||||
|
|
||||||
$head = calendars_prepare_head($paramnoaction);
|
$head = calendars_prepare_head($paramnoaction);
|
||||||
|
|
||||||
@ -422,31 +423,31 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
|||||||
//print dol_get_fiche_end();
|
//print dol_get_fiche_end();
|
||||||
|
|
||||||
$viewmode = '';
|
$viewmode = '';
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle'.($action == 'show_month' ? ' btnTitleSelected' : '').' reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle'.($action == 'show_month' ? ' btnTitleSelected' : '').' reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle'.($action == 'show_week' ? ' btnTitleSelected' : '').' reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle'.($action == 'show_week' ? ' btnTitleSelected' : '').' reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle'.($action == 'show_day' ? ' btnTitleSelected' : '').' reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle'.($action == 'show_day' ? ' btnTitleSelected' : '').' reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
@ -486,8 +487,8 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
|
|||||||
$s .= "\n".'<!-- Div to calendars selectors -->'."\n";
|
$s .= "\n".'<!-- Div to calendars selectors -->'."\n";
|
||||||
$s .= '<script type="text/javascript">'."\n";
|
$s .= '<script type="text/javascript">'."\n";
|
||||||
$s .= 'jQuery(document).ready(function () {'."\n";
|
$s .= 'jQuery(document).ready(function () {'."\n";
|
||||||
$s .= 'jQuery(".check_birthday").click(function() { console.log("Toggle birthday"); jQuery(".family_birthday").toggle(); });'."\n";
|
$s .= 'jQuery(".check_birthday").click(function() { console.log("Toggle birthdays"); jQuery(".family_birthday").toggle(); });'."\n";
|
||||||
$s .= 'jQuery(".family_birthday").toggle();'."\n";
|
$s .= 'jQuery(".check_holiday").click(function() { console.log("Toggle holidays"); jQuery(".family_holiday").toggle(); });'."\n";
|
||||||
if ($action == "show_week" || $action == "show_month" || empty($action))
|
if ($action == "show_week" || $action == "show_month" || empty($action))
|
||||||
{
|
{
|
||||||
// Code to enable drag and drop
|
// Code to enable drag and drop
|
||||||
@ -509,6 +510,9 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
|
|||||||
// Local calendar
|
// Local calendar
|
||||||
$s .= '<div class="nowrap inline-block minheight30"><input type="checkbox" id="check_mytasks" name="check_mytasks" checked disabled> '.$langs->trans("LocalAgenda").' </div>';
|
$s .= '<div class="nowrap inline-block minheight30"><input type="checkbox" id="check_mytasks" name="check_mytasks" checked disabled> '.$langs->trans("LocalAgenda").' </div>';
|
||||||
|
|
||||||
|
// Holiday calendar
|
||||||
|
$s .= '<div class="nowrap inline-block"><input type="checkbox" id="check_holiday" name="check_holiday" class="check_holiday"><label for="check_holiday"> <span class="check_holiday_text">'.$langs->trans("Holidays").'</span></label> </div>';
|
||||||
|
|
||||||
// External calendars
|
// External calendars
|
||||||
if (is_array($showextcals) && count($showextcals) > 0)
|
if (is_array($showextcals) && count($showextcals) > 0)
|
||||||
{
|
{
|
||||||
@ -541,6 +545,8 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
|
|||||||
{
|
{
|
||||||
$s = $hookmanager->resPrint;
|
$s = $hookmanager->resPrint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$s .= "\n".'<!-- End div to calendars selectors -->'."\n";
|
||||||
} else // If javascript off
|
} else // If javascript off
|
||||||
{
|
{
|
||||||
$newparam = $param; // newparam is for birthday links
|
$newparam = $param; // newparam is for birthday links
|
||||||
@ -554,9 +560,12 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
|
|||||||
$link .= '</a>';
|
$link .= '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Load events from database into $eventarray
|
// Load events from database into $eventarray
|
||||||
$eventarray = array();
|
$eventarray = array();
|
||||||
|
|
||||||
|
|
||||||
|
// DEFAULT CALENDAR + AUTOEVENT CALENDAR + CONFERENCEBOOTH CALENDAR
|
||||||
$sql = 'SELECT ';
|
$sql = 'SELECT ';
|
||||||
if ($usergroup > 0) $sql .= " DISTINCT";
|
if ($usergroup > 0) $sql .= " DISTINCT";
|
||||||
$sql .= ' a.id, a.label,';
|
$sql .= ' a.id, a.label,';
|
||||||
@ -567,7 +576,7 @@ $sql .= ' a.fk_user_author,a.fk_user_action,';
|
|||||||
$sql .= ' a.transparency, a.priority, a.fulldayevent, a.location,';
|
$sql .= ' a.transparency, a.priority, a.fulldayevent, a.location,';
|
||||||
$sql .= ' a.fk_soc, a.fk_contact, a.fk_project,';
|
$sql .= ' a.fk_soc, a.fk_contact, a.fk_project,';
|
||||||
$sql .= ' a.fk_element, a.elementtype,';
|
$sql .= ' a.fk_element, a.elementtype,';
|
||||||
$sql .= ' ca.code as type_code, ca.libelle as type_label, ca.color as type_color';
|
$sql .= ' ca.code as type_code, ca.libelle as type_label, ca.color as type_color, ca.type as type_type, ca.picto as type_picto';
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a";
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||||
// We must filter on resource table
|
// We must filter on resource table
|
||||||
@ -685,13 +694,17 @@ if ($resql)
|
|||||||
$event->type_code = $obj->type_code;
|
$event->type_code = $obj->type_code;
|
||||||
$event->type_label = $obj->type_label;
|
$event->type_label = $obj->type_label;
|
||||||
$event->type_color = $obj->type_color;
|
$event->type_color = $obj->type_color;
|
||||||
|
$event->type = $obj->type_type;
|
||||||
|
$event->type_picto = $obj->type_picto;
|
||||||
|
|
||||||
$event->libelle = $obj->label; // deprecated
|
$event->libelle = $obj->label; // deprecated
|
||||||
$event->label = $obj->label;
|
$event->label = $obj->label;
|
||||||
$event->percentage = $obj->percent;
|
$event->percentage = $obj->percent;
|
||||||
|
|
||||||
$event->authorid = $obj->fk_user_author; // user id of creator
|
$event->authorid = $obj->fk_user_author; // user id of creator
|
||||||
$event->userownerid = $obj->fk_user_action; // user id of owner
|
$event->userownerid = $obj->fk_user_action; // user id of owner
|
||||||
$event->fetch_userassigned(); // This load $event->userassigned
|
$event->fetch_userassigned(); // This load $event->userassigned
|
||||||
|
|
||||||
$event->priority = $obj->priority;
|
$event->priority = $obj->priority;
|
||||||
$event->fulldayevent = $obj->fulldayevent;
|
$event->fulldayevent = $obj->fulldayevent;
|
||||||
$event->location = $obj->location;
|
$event->location = $obj->location;
|
||||||
@ -752,6 +765,7 @@ if ($resql)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BIRTHDATES CALENDAR
|
||||||
// Complete $eventarray with birthdates
|
// Complete $eventarray with birthdates
|
||||||
if ($showbirthday)
|
if ($showbirthday)
|
||||||
{
|
{
|
||||||
@ -778,6 +792,7 @@ if ($showbirthday)
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
$event = new ActionComm($db);
|
$event = new ActionComm($db);
|
||||||
|
|
||||||
$event->id = $obj->rowid; // We put contact id in action id for birthdays events
|
$event->id = $obj->rowid; // We put contact id in action id for birthdays events
|
||||||
@ -788,28 +803,39 @@ if ($showbirthday)
|
|||||||
$datearray = dol_getdate($datebirth, true);
|
$datearray = dol_getdate($datebirth, true);
|
||||||
$event->datep = dol_mktime(0, 0, 0, $datearray['mon'], $datearray['mday'], $year, true); // For full day events, date are also GMT but they wont but converted during output
|
$event->datep = dol_mktime(0, 0, 0, $datearray['mon'], $datearray['mday'], $year, true); // For full day events, date are also GMT but they wont but converted during output
|
||||||
$event->datef = $event->datep;
|
$event->datef = $event->datep;
|
||||||
|
|
||||||
$event->type_code = 'BIRTHDAY';
|
$event->type_code = 'BIRTHDAY';
|
||||||
|
$event->type_label = '';
|
||||||
|
$event->type_color = '';
|
||||||
|
$event->type = 'birthdate';
|
||||||
|
$event->type_picto = 'birthdate';
|
||||||
|
|
||||||
$event->label = $langs->trans("Birthday").' '.dolGetFirstLastname($obj->firstname, $obj->lastname);
|
$event->label = $langs->trans("Birthday").' '.dolGetFirstLastname($obj->firstname, $obj->lastname);
|
||||||
$event->percentage = 100;
|
$event->percentage = 100;
|
||||||
$event->fulldayevent = 1;
|
$event->fulldayevent = 1;
|
||||||
|
|
||||||
$event->date_start_in_calendar = $event->datep;
|
$event->date_start_in_calendar = $db->jdate($event->datep);
|
||||||
$event->date_end_in_calendar = $event->datef;
|
$event->date_end_in_calendar = $db->jdate($event->datef);
|
||||||
$event->ponctuel = 0;
|
$event->ponctuel = 0;
|
||||||
|
|
||||||
// Add an entry in actionarray for each day
|
// Add an entry in eventarray for each day
|
||||||
$daycursor = $event->date_start_in_calendar;
|
$daycursor = $event->datep;
|
||||||
$annee = dol_print_date($daycursor, '%Y');
|
$annee = dol_print_date($daycursor, '%Y', 'tzuserrel');
|
||||||
$mois = dol_print_date($daycursor, '%m');
|
$mois = dol_print_date($daycursor, '%m', 'tzuserrel');
|
||||||
$jour = dol_print_date($daycursor, '%d');
|
$jour = dol_print_date($daycursor, '%d', 'tzuserrel');
|
||||||
|
|
||||||
$loop = true;
|
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt');
|
||||||
|
|
||||||
|
$eventarray[$daykey][] = $event;
|
||||||
|
|
||||||
|
/*$loop = true;
|
||||||
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
|
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
|
||||||
do {
|
do {
|
||||||
$eventarray[$daykey][] = $event;
|
$eventarray[$daykey][] = $event;
|
||||||
$daykey += 60 * 60 * 24;
|
$daykey += 60 * 60 * 24;
|
||||||
if ($daykey > $event->date_end_in_calendar) $loop = false;
|
if ($daykey > $event->date_end_in_calendar) $loop = false;
|
||||||
} while ($loop);
|
} while ($loop);
|
||||||
|
*/
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -817,23 +843,18 @@ if ($showbirthday)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->global->AGENDA_SHOW_HOLIDAYS)
|
|
||||||
{
|
|
||||||
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status";
|
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u";
|
$sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql .= " WHERE u.rowid = x.fk_user";
|
$sql .= " WHERE u.rowid = x.fk_user";
|
||||||
$sql .= " AND u.statut = '1'"; // Show only active users (0 = inactive user, 1 = active user)
|
$sql .= " AND u.statut = '1'"; // Show only active users (0 = inactive user, 1 = active user)
|
||||||
$sql .= " AND (x.statut = '2' OR x.statut = '3')"; // Show only public leaves (2 = leave wait for approval, 3 = leave approved)
|
$sql .= " AND (x.statut = '2' OR x.statut = '3')"; // Show only public leaves (2 = leave wait for approval, 3 = leave approved)
|
||||||
|
|
||||||
if ($action == 'show_day')
|
if ($action == 'show_day') {
|
||||||
{
|
|
||||||
// Request only leaves for the current selected day
|
// Request only leaves for the current selected day
|
||||||
$sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin";
|
$sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date wihout time
|
||||||
} elseif ($action == 'show_week')
|
} elseif ($action == 'show_week') {
|
||||||
{
|
|
||||||
// TODO: Add filter to reduce database request
|
// TODO: Add filter to reduce database request
|
||||||
} elseif ($action == 'show_month')
|
} elseif ($action == 'show_month') {
|
||||||
{
|
|
||||||
// TODO: Add filter to reduce database request
|
// TODO: Add filter to reduce database request
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -847,9 +868,6 @@ if ($conf->global->AGENDA_SHOW_HOLIDAYS)
|
|||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
$dateStartArray = dol_getdate(dol_stringtotime($obj->date_start, 1), true);
|
|
||||||
$dateEndArray = dol_getdate(dol_stringtotime($obj->date_end, 1), true);
|
|
||||||
|
|
||||||
$event = new ActionComm($db);
|
$event = new ActionComm($db);
|
||||||
|
|
||||||
// Need the id of the leave object for link to it
|
// Need the id of the leave object for link to it
|
||||||
@ -857,8 +875,13 @@ if ($conf->global->AGENDA_SHOW_HOLIDAYS)
|
|||||||
$event->ref = $event->id;
|
$event->ref = $event->id;
|
||||||
|
|
||||||
$event->type_code = 'HOLIDAY';
|
$event->type_code = 'HOLIDAY';
|
||||||
$event->datep = dol_mktime(0, 0, 0, $dateStartArray['mon'], $dateStartArray['mday'], $dateStartArray['year'], true);
|
$event->type_label = '';
|
||||||
$event->datef = dol_mktime(0, 0, 0, $dateEndArray['mon'], $dateEndArray['mday'], $dateEndArray['year'], true);
|
$event->type_color = '';
|
||||||
|
$event->type = 'holiday';
|
||||||
|
$event->type_picto = 'holiday';
|
||||||
|
|
||||||
|
$event->datep = $db->jdate($obj->date_start);
|
||||||
|
$event->datef = $db->jdate($obj->date_end);
|
||||||
$event->date_start_in_calendar = $event->datep;
|
$event->date_start_in_calendar = $event->datep;
|
||||||
$event->date_end_in_calendar = $event->datef;
|
$event->date_end_in_calendar = $event->datef;
|
||||||
|
|
||||||
@ -883,12 +906,11 @@ if ($conf->global->AGENDA_SHOW_HOLIDAYS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$daycursor = $event->date_start_in_calendar;
|
$daycursor = $event->date_start_in_calendar;
|
||||||
$annee = dol_print_date($daycursor, '%Y');
|
$annee = dol_print_date($daycursor, '%Y', 'tzuserrel');
|
||||||
$mois = dol_print_date($daycursor, '%m');
|
$mois = dol_print_date($daycursor, '%m', 'tzuserrel');
|
||||||
$jour = dol_print_date($daycursor, '%d');
|
$jour = dol_print_date($daycursor, '%d', 'tzuserrel');
|
||||||
|
|
||||||
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
|
|
||||||
|
|
||||||
|
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt');
|
||||||
do {
|
do {
|
||||||
$eventarray[$daykey][] = $event;
|
$eventarray[$daykey][] = $event;
|
||||||
|
|
||||||
@ -898,8 +920,8 @@ if ($conf->global->AGENDA_SHOW_HOLIDAYS)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
// EXTERNAL CALENDAR
|
||||||
// Complete $eventarray with external import Ical
|
// Complete $eventarray with external import Ical
|
||||||
if (count($listofextcals))
|
if (count($listofextcals))
|
||||||
{
|
{
|
||||||
@ -911,7 +933,7 @@ if (count($listofextcals))
|
|||||||
$offsettz = $extcal['offsettz'];
|
$offsettz = $extcal['offsettz'];
|
||||||
$colorcal = $extcal['color'];
|
$colorcal = $extcal['color'];
|
||||||
$buggedfile = $extcal['buggedfile'];
|
$buggedfile = $extcal['buggedfile'];
|
||||||
//print "url=".$url." namecal=".$namecal." colorcal=".$colorcal." buggedfile=".$buggedfile;
|
|
||||||
$ical = new ICal();
|
$ical = new ICal();
|
||||||
$ical->parse($url);
|
$ical->parse($url);
|
||||||
|
|
||||||
@ -1088,9 +1110,12 @@ if (count($listofextcals))
|
|||||||
$event->userassigned[$userId] = $userId;
|
$event->userassigned[$userId] = $userId;
|
||||||
$event->percentage = -1;
|
$event->percentage = -1;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$event->type_code = "ICALEVENT";
|
$event->type_code = "ICALEVENT";
|
||||||
}
|
$event->type_label = $namecal;
|
||||||
|
$event->type_color = $colorcal;
|
||||||
|
$event->type = 'icalevent';
|
||||||
|
$event->type_picto = 'rss';
|
||||||
|
|
||||||
$event->icalname = $namecal;
|
$event->icalname = $namecal;
|
||||||
$event->icalcolor = $colorcal;
|
$event->icalcolor = $colorcal;
|
||||||
@ -1149,15 +1174,15 @@ if (count($listofextcals))
|
|||||||
|
|
||||||
// Add an entry in actionarray for each day
|
// Add an entry in actionarray for each day
|
||||||
$daycursor = $event->date_start_in_calendar;
|
$daycursor = $event->date_start_in_calendar;
|
||||||
$annee = date('Y', $daycursor);
|
$annee = dol_print_date($daycursor, '%Y', 'tzuserrel');
|
||||||
$mois = date('m', $daycursor);
|
$mois = dol_print_date($daycursor, '%m', 'tzuserrel');
|
||||||
$jour = date('d', $daycursor);
|
$jour = dol_print_date($daycursor, '%d', 'tzuserrel');
|
||||||
|
|
||||||
// Loop on each day covered by action to prepare an index to show on calendar
|
// Loop on each day covered by action to prepare an index to show on calendar
|
||||||
$loop = true; $j = 0;
|
$loop = true; $j = 0;
|
||||||
// daykey must be date that represent day box in calendar so must be a user time
|
// daykey must be date that represent day box in calendar so must be a user time
|
||||||
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
|
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt');
|
||||||
$daykeygmt = dol_mktime(0, 0, 0, $mois, $jour, $annee, true, 0);
|
$daykeygmt = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt');
|
||||||
do {
|
do {
|
||||||
//if ($event->fulldayevent) print dol_print_date($daykeygmt,'dayhour','gmt').'-'.dol_print_date($daykey,'dayhour','gmt').'-'.dol_print_date($event->date_end_in_calendar,'dayhour','gmt').' ';
|
//if ($event->fulldayevent) print dol_print_date($daykeygmt,'dayhour','gmt').'-'.dol_print_date($daykey,'dayhour','gmt').'-'.dol_print_date($event->date_end_in_calendar,'dayhour','gmt').' ';
|
||||||
$eventarray[$daykey][] = $event;
|
$eventarray[$daykey][] = $event;
|
||||||
@ -1205,9 +1230,11 @@ if (is_readable($color_file))
|
|||||||
}
|
}
|
||||||
if (!is_array($theme_datacolor)) $theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
if (!is_array($theme_datacolor)) $theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
||||||
|
|
||||||
|
$massactionbutton ='';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1, 'object_action', 0, $nav.'<span class="marginleftonly"></span>'.$newcardbutton, '', $limit, 1, 0, 1, $viewmode);
|
print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1, 'object_action', 0, $nav.'<span class="marginleftonly"></span>'.$newcardbutton, '', $limit, 1, 0, 1, $viewmode);
|
||||||
|
|
||||||
|
// Show div with list of calendars
|
||||||
print $s;
|
print $s;
|
||||||
|
|
||||||
|
|
||||||
@ -1343,14 +1370,14 @@ if (empty($action) || $action == 'show_month') // View by month
|
|||||||
|
|
||||||
for ($iter_day = 0; $iter_day < 7; $iter_day++) {
|
for ($iter_day = 0; $iter_day < 7; $iter_day++) {
|
||||||
// Show days of the current week
|
// Show days of the current week
|
||||||
$curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd');
|
$curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); // $firstdaytoshow is in timezone of server
|
||||||
$tmparray = dol_getdate($curtime, true);
|
$tmpday = dol_print_date($curtime, '%d', 'tzuserrel');
|
||||||
$tmpday = $tmparray['mday'];
|
$tmpmonth = dol_print_date($curtime, '%m', 'tzuserrel');
|
||||||
$tmpmonth = $tmparray['mon'];
|
$tmpyear = dol_print_date($curtime, '%Y', 'tzuserrel');
|
||||||
$tmpyear = $tmparray['year'];
|
|
||||||
|
|
||||||
$style = 'cal_current_month';
|
$style = 'cal_current_month';
|
||||||
if ($iter_day == 6) $style .= ' cal_other_month_right';
|
if ($iter_day == 6) $style .= ' cal_other_month_right';
|
||||||
|
|
||||||
$today = 0;
|
$today = 0;
|
||||||
$todayarray = dol_getdate($now, 'fast');
|
$todayarray = dol_getdate($now, 'fast');
|
||||||
if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $tmpmonth && $todayarray['year'] == $tmpyear) $today = 1;
|
if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $tmpmonth && $todayarray['year'] == $tmpyear) $today = 1;
|
||||||
@ -1486,6 +1513,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
global $theme_datacolor;
|
global $theme_datacolor;
|
||||||
global $cachethirdparties, $cachecontacts, $cacheusers, $colorindexused;
|
global $cachethirdparties, $cachecontacts, $cacheusers, $colorindexused;
|
||||||
|
|
||||||
|
if ($conf->use_javascript_ajax) { // Enable the "Show more button..."
|
||||||
|
$conf->global->MAIN_JS_SWITCH_AGENDA = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$dateint = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day);
|
$dateint = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day);
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
@ -1501,11 +1532,11 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Line with title of day
|
// Line with title of day
|
||||||
print '<div id="dayevent_'.$dateint.'" class="cursorpointer dayevent tagtable centpercent nobordernopadding" onclick="window.location=\''.$urltocreate.'\';">'."\n";
|
print '<div id="dayevent_'.$dateint.'" class="dayevent tagtable centpercent nobordernopadding">'."\n";
|
||||||
|
|
||||||
if ($nonew <= 0)
|
if ($nonew <= 0)
|
||||||
{
|
{
|
||||||
print '<div class="tagtr"><div class="nowrap tagtd"><div class="left inline-block">';
|
print '<div class="tagtr cursorpointer" onclick="window.location=\''.$urltocreate.'\';"><div class="nowrap tagtd"><div class="left inline-block">';
|
||||||
print '<a class="dayevent-aday" style="color: #666" href="'.$urltoshow.'">';
|
print '<a class="dayevent-aday" style="color: #666" href="'.$urltoshow.'">';
|
||||||
if ($showinfo) print dol_print_date($curtime, 'daytextshort');
|
if ($showinfo) print dol_print_date($curtime, 'daytextshort');
|
||||||
else print dol_print_date($curtime, '%d');
|
else print dol_print_date($curtime, '%d');
|
||||||
@ -1531,13 +1562,16 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
print '<div class="tagtd centpercent agendacell sortable">';
|
print '<div class="tagtd centpercent agendacell sortable">';
|
||||||
|
|
||||||
//$curtime = dol_mktime (0, 0, 0, $month, $day, $year);
|
//$curtime = dol_mktime (0, 0, 0, $month, $day, $year);
|
||||||
$i = 0; $numother = 0; $numbirthday = 0; $numical = 0; $numicals = array();
|
$i = 0; $ireallyshown = 0; $itoshow = 0; $numother = 0; $numbirthday = 0; $numical = 0; $numicals = array();
|
||||||
$ymd = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day);
|
$ymd = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day);
|
||||||
|
|
||||||
$colorindexused[$user->id] = 0; // Color index for current user (user->id) is always 0
|
$colorindexused[$user->id] = 0; // Color index for current user (user->id) is always 0
|
||||||
$nextindextouse = is_array($colorindexused) ?count($colorindexused) : 0; // At first run this is 0, so fist user has 0, next 1, ...
|
$nextindextouse = is_array($colorindexused) ?count($colorindexused) : 0; // At first run this is 0, so fist user has 0, next 1, ...
|
||||||
//var_dump($colorindexused);
|
//var_dump($colorindexused);
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
||||||
|
$tmpholiday = new Holiday($db);
|
||||||
|
|
||||||
foreach ($eventarray as $daykey => $notused)
|
foreach ($eventarray as $daykey => $notused)
|
||||||
{
|
{
|
||||||
$annee = dol_print_date($daykey, '%Y');
|
$annee = dol_print_date($daykey, '%Y');
|
||||||
@ -1583,7 +1617,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
$cssclass = (!empty($event->icalname) ? 'family_ext'.md5($event->icalname) : 'family_other');
|
$cssclass = (!empty($event->icalname) ? 'family_ext'.md5($event->icalname) : 'family_other');
|
||||||
} elseif ($event->type_code == 'BIRTHDAY')
|
} elseif ($event->type_code == 'BIRTHDAY')
|
||||||
{
|
{
|
||||||
$numbirthday++; $colorindex = 2; $cssclass = 'family_birthday unmovable'; $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]);
|
$numbirthday++; $colorindex = 2; $cssclass = 'family_birthday '; $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]);
|
||||||
} else {
|
} else {
|
||||||
$numother++;
|
$numother++;
|
||||||
$color = ($event->icalcolor ? $event->icalcolor : -1);
|
$color = ($event->icalcolor ? $event->icalcolor : -1);
|
||||||
@ -1617,20 +1651,22 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
// Define color
|
// Define color
|
||||||
$color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]);
|
$color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]);
|
||||||
}
|
}
|
||||||
$cssclass = $cssclass.' '.$cssclass.'_day_'.$ymd;
|
$cssclass = $cssclass.' eventday_'.$ymd;
|
||||||
|
|
||||||
// Defined style to disable drag and drop feature
|
// Defined style to disable drag and drop feature
|
||||||
if ($event->type_code == 'AC_OTH_AUTO')
|
if ($event->type_code == 'AC_OTH_AUTO') {
|
||||||
{
|
|
||||||
$cssclass .= " unmovable";
|
$cssclass .= " unmovable";
|
||||||
} elseif ($event->type_code == 'ICALEVENT')
|
} elseif ($event->type_code == 'HOLIDAY') {
|
||||||
{
|
$cssclass .= " unmovable";
|
||||||
|
} elseif ($event->type_code == 'BIRTHDAY') {
|
||||||
|
$cssclass .= " unmovable";
|
||||||
|
} elseif ($event->type_code == 'ICALEVENT') {
|
||||||
$cssclass .= " unmovable";
|
$cssclass .= " unmovable";
|
||||||
} elseif ($event->date_end_in_calendar && date('Ymd', $event->date_start_in_calendar) != date('Ymd', $event->date_end_in_calendar)) {
|
} elseif ($event->date_end_in_calendar && date('Ymd', $event->date_start_in_calendar) != date('Ymd', $event->date_end_in_calendar)) {
|
||||||
$tmpyearend = date('Y', $event->date_end_in_calendar);
|
$tmpyearend = date('Y', $event->date_end_in_calendar);
|
||||||
$tmpmonthend = date('m', $event->date_end_in_calendar);
|
$tmpmonthend = date('m', $event->date_end_in_calendar);
|
||||||
$tmpdayend = date('d', $event->date_end_in_calendar);
|
$tmpdayend = date('d', $event->date_end_in_calendar);
|
||||||
if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour)
|
if ($tmpyearend != $annee || $tmpmonthend != $mois || $tmpdayend != $jour)
|
||||||
{
|
{
|
||||||
$cssclass .= " unmovable";
|
$cssclass .= " unmovable";
|
||||||
}
|
}
|
||||||
@ -1648,10 +1684,29 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
if ($action == 'show_day') { $h = 'height: 100%; '; $nowrapontd = 0; }
|
if ($action == 'show_day') { $h = 'height: 100%; '; $nowrapontd = 0; }
|
||||||
if ($action == 'show_week') { $h = 'height: 100%; '; $nowrapontd = 0; }
|
if ($action == 'show_week') { $h = 'height: 100%; '; $nowrapontd = 0; }
|
||||||
|
|
||||||
// Show rect of event
|
// Show event box
|
||||||
print "\n";
|
print "\n";
|
||||||
print '<!-- start event '.$i.' -->'."\n";
|
print '<!-- start event '.$i.' -->'."\n";
|
||||||
print '<div id="event_'.$ymd.'_'.$i.'" class="event '.$cssclass.'"';
|
|
||||||
|
$morecss = '';
|
||||||
|
if ($maxprint && $ireallyshown >= $maxprint) {
|
||||||
|
$morecss = 'showifmore';
|
||||||
|
}
|
||||||
|
if ($event->type == 'birthdate' && !GETPOST('check_birthday')) {
|
||||||
|
$morecss = 'hidden';
|
||||||
|
}
|
||||||
|
if ($event->type == 'holiday' && !GETPOST('check_holiday')) {
|
||||||
|
$morecss = 'hidden';
|
||||||
|
}
|
||||||
|
if ($morecss != 'hidden') {
|
||||||
|
$itoshow++;
|
||||||
|
}
|
||||||
|
if ($morecss != 'showifmore' && $morecss != 'hidden') {
|
||||||
|
$ireallyshown++;
|
||||||
|
}
|
||||||
|
//var_dump($event->type.' - '.$morecss.' - '.$cssclass.' - '.$i.' - '.$ireallyshown.' - '.$itoshow);
|
||||||
|
|
||||||
|
print '<div id="event_'.$ymd.'_'.$i.'" class="event family_'.$event->type.' '.$cssclass.($morecss ? ' '.$morecss : '').'"';
|
||||||
//print ' style="height: 100px;';
|
//print ' style="height: 100px;';
|
||||||
//print ' position: absolute; top: 40px; width: 50%;';
|
//print ' position: absolute; top: 40px; width: 50%;';
|
||||||
//print '"';
|
//print '"';
|
||||||
@ -1686,14 +1741,23 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
|
|
||||||
$daterange = '';
|
$daterange = '';
|
||||||
|
|
||||||
if ($event->type_code == 'BIRTHDAY') // It's a birthday
|
if ($event->type_code == 'BIRTHDAY') { // It's birthday calendar
|
||||||
{
|
|
||||||
print $event->getNomUrl(1, $maxnbofchar, 'cal_event', 'birthday', 'contact');
|
print $event->getNomUrl(1, $maxnbofchar, 'cal_event', 'birthday', 'contact');
|
||||||
} elseif ($event->type_code == 'HOLIDAY')
|
} elseif ($event->type_code == 'HOLIDAY') { // It's holiday calendar
|
||||||
{
|
$tmpholiday->fetch($event->id);
|
||||||
print $event->getNomUrl(1, $maxnbofchar, 'cal_event', 'holiday', 'user');
|
|
||||||
} elseif ($event->type_code != 'BIRTHDAY' && $event->type_code != 'HOLIDAY')
|
print $tmpholiday->getNomUrl(1);
|
||||||
{
|
|
||||||
|
$tmpid = $tmpholiday->fk_user;
|
||||||
|
if (empty($cacheusers[$tmpid])) {
|
||||||
|
$newuser = new User($db);
|
||||||
|
$newuser->fetch($tmpid);
|
||||||
|
$cacheusers[$tmpid] = $newuser;
|
||||||
|
}
|
||||||
|
|
||||||
|
$listofusertoshow .= '<br>'.$cacheusers[$tmpid]->getNomUrl(-3, '', 0, 0, 0, 0, '', 'paddingright valigntextbottom');
|
||||||
|
print $listofusertoshow;
|
||||||
|
} else { // Other calendar
|
||||||
// Picto
|
// Picto
|
||||||
if (empty($event->fulldayevent))
|
if (empty($event->fulldayevent))
|
||||||
{
|
{
|
||||||
@ -1737,8 +1801,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
$daterange .= dol_print_date($event->date_end_in_calendar, 'hour', 'tzuserrel');
|
$daterange .= dol_print_date($event->date_end_in_calendar, 'hour', 'tzuserrel');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($showinfo)
|
if ($showinfo) {
|
||||||
{
|
|
||||||
print $langs->trans("EventOnFullDay")."<br>\n";
|
print $langs->trans("EventOnFullDay")."<br>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1752,7 +1815,8 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
$event->label = $titletoshow;
|
$event->label = $titletoshow;
|
||||||
$event->libelle = $titletoshow;
|
$event->libelle = $titletoshow;
|
||||||
// Note: List of users are inside $event->userassigned. Link may be clickable depending on permissions of user.
|
// Note: List of users are inside $event->userassigned. Link may be clickable depending on permissions of user.
|
||||||
$titletoshow = $event->getNomUrl(0, $maxnbofchar, 'cal_event cal_event_title', '', 0, 0);
|
$titletoshow = (($event->type_picto || $event->type_code) ? $event->getTypePicto() : '');
|
||||||
|
$titletoshow .= $event->getNomUrl(0, $maxnbofchar, 'cal_event cal_event_title', '', 0, 0);
|
||||||
$event->label = $savlabel;
|
$event->label = $savlabel;
|
||||||
$event->libelle = $savlabel;
|
$event->libelle = $savlabel;
|
||||||
}
|
}
|
||||||
@ -1764,8 +1828,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
{
|
{
|
||||||
if (!$posuserassigned && $titletoshow) $listofusertoshow .= '<br>';
|
if (!$posuserassigned && $titletoshow) $listofusertoshow .= '<br>';
|
||||||
$posuserassigned++;
|
$posuserassigned++;
|
||||||
if (empty($cacheusers[$tmpid]))
|
if (empty($cacheusers[$tmpid])) {
|
||||||
{
|
|
||||||
$newuser = new User($db);
|
$newuser = new User($db);
|
||||||
$newuser->fetch($tmpid);
|
$newuser->fetch($tmpid);
|
||||||
$cacheusers[$tmpid] = $newuser;
|
$cacheusers[$tmpid] = $newuser;
|
||||||
@ -1837,6 +1900,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
print '</div><!-- end event '.$i.' -->'."\n";
|
print '</div><!-- end event '.$i.' -->'."\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action='.$action.'&maxprint=0&month='.$monthshown.'&year='.$year;
|
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action='.$action.'&maxprint=0&month='.$monthshown.'&year='.$year;
|
||||||
@ -1859,22 +1923,25 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_JS_SWITCH_AGENDA) && $i > $maxprint && $maxprint)
|
if (!empty($conf->global->MAIN_JS_SWITCH_AGENDA) && $itoshow > $ireallyshown && $maxprint)
|
||||||
{
|
{
|
||||||
print '<div id="more_'.$ymd.'">'.img_picto("all", "1downarrow_selected.png").' +'.$langs->trans("More").'...</div>';
|
print '<div class="center cursorpointer" id="more_'.$ymd.'">'.img_picto("All", "angle-double-down", 'class="warning"').' +'.($itoshow - $ireallyshown).'</div>';
|
||||||
//print ' +'.(count($eventarray[$daykey])-$maxprint);
|
//print ' +'.(count($eventarray[$daykey])-$maxprint);
|
||||||
|
|
||||||
print '<script type="text/javascript">'."\n";
|
print '<script type="text/javascript">'."\n";
|
||||||
print 'jQuery(document).ready(function () {'."\n";
|
print 'jQuery(document).ready(function () {'."\n";
|
||||||
print 'jQuery("#more_'.$ymd.'").click(function() { reinit_day_'.$ymd.'(); });'."\n";
|
print ' var open=0;'."\n";
|
||||||
|
print ' jQuery("#more_'.$ymd.'").click(function() { console.log("Click on showmore for '.$ymd.'"); reinit_day_'.$ymd.'(); event.stopImmediatePropagation(); });'."\n";
|
||||||
print ' function reinit_day_'.$ymd.'() {'."\n";
|
print ' function reinit_day_'.$ymd.'() {'."\n";
|
||||||
print 'var nb=0;'."\n";
|
print ' jQuery(".eventday_'.$ymd.'.showifmore").toggle();'."\n";
|
||||||
// TODO Loop on each element of day $ymd and start to toggle once $maxprint has been reached
|
print ' open = open + 1; if (open > 1) { open = 0; }'."\n";
|
||||||
print 'jQuery(".family_mytasks_day_'.$ymd.'").toggle();';
|
print ' if (open) { ';
|
||||||
|
print ' jQuery("#more_'.$ymd.'").html(\''.img_picto("All", "angle-double-up", 'class="warning"').'\');'."\n";
|
||||||
|
print ' } else { ';
|
||||||
|
print ' jQuery("#more_'.$ymd.'").html(\''.img_picto("All", "angle-double-down", 'class="warning"').' +'.($itoshow - $ireallyshown).'\');'."\n";
|
||||||
|
print ' }'."\n";
|
||||||
print ' }'."\n";
|
print ' }'."\n";
|
||||||
|
|
||||||
print '});'."\n";
|
print '});'."\n";
|
||||||
|
|
||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1921,7 +1988,6 @@ function sort_events_by_date($a, $b)
|
|||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($b->type_code === 'HOLIDAY')
|
if ($b->type_code === 'HOLIDAY')
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@ -269,11 +269,11 @@ if ($resourceid > 0) $param .= "&search_resourceid=".urlencode($resourceid);
|
|||||||
if ($search_status != '' && $search_status > -1) $param .= "&search_status=".urlencode($search_status);
|
if ($search_status != '' && $search_status > -1) $param .= "&search_status=".urlencode($search_status);
|
||||||
if ($filter) $param .= "&search_filter=".urlencode($filter);
|
if ($filter) $param .= "&search_filter=".urlencode($filter);
|
||||||
if ($filtert) $param .= "&search_filtert=".urlencode($filtert);
|
if ($filtert) $param .= "&search_filtert=".urlencode($filtert);
|
||||||
if ($socid) $param .= "&search_socid=".urlencode($socid);
|
if ($usergroup > 0) $param .= "&search_usergroup=".urlencode($usergroup);
|
||||||
|
if ($socid > 0) $param .= "&search_socid=".urlencode($socid);
|
||||||
if ($showbirthday) $param .= "&search_showbirthday=1";
|
if ($showbirthday) $param .= "&search_showbirthday=1";
|
||||||
if ($pid) $param .= "&search_projectid=".urlencode($pid);
|
if ($pid) $param .= "&search_projectid=".urlencode($pid);
|
||||||
if ($type) $param .= "&search_type=".urlencode($type);
|
if ($type) $param .= "&search_type=".urlencode($type);
|
||||||
if ($usergroup) $param .= "&search_usergroup=".urlencode($usergroup);
|
|
||||||
if ($search_id != '') $param .= '&search_title='.urlencode($search_id);
|
if ($search_id != '') $param .= '&search_title='.urlencode($search_id);
|
||||||
if ($search_title != '') $param .= '&search_title='.urlencode($search_title);
|
if ($search_title != '') $param .= '&search_title='.urlencode($search_title);
|
||||||
if ($search_note != '') $param .= '&search_note='.$search_note;
|
if ($search_note != '') $param .= '&search_note='.$search_note;
|
||||||
@ -287,6 +287,8 @@ if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
|||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||||
|
|
||||||
|
$paramnoactionodate = $param;
|
||||||
|
|
||||||
// List of mass actions available
|
// List of mass actions available
|
||||||
$arrayofmassactions = array(
|
$arrayofmassactions = array(
|
||||||
'set_all_events_to_todo' => $langs->trans("SetAllEventsToTodo"),
|
'set_all_events_to_todo' => $langs->trans("SetAllEventsToTodo"),
|
||||||
@ -308,7 +310,7 @@ $sql .= " a.id, a.code, a.label, a.note, a.datep as dp, a.datep2 as dp2, a.fulld
|
|||||||
$sql .= ' a.fk_user_author,a.fk_user_action,';
|
$sql .= ' a.fk_user_author,a.fk_user_action,';
|
||||||
$sql .= " a.fk_contact, a.note, a.percent as percent,";
|
$sql .= " a.fk_contact, a.note, a.percent as percent,";
|
||||||
$sql .= " a.fk_element, a.elementtype, a.datec, a.tms as datem,";
|
$sql .= " a.fk_element, a.elementtype, a.datec, a.tms as datem,";
|
||||||
$sql .= " c.code as type_code, c.libelle as type_label,";
|
$sql .= " c.code as type_code, c.libelle as type_label, c.color as type_color, c.type as type_type, c.picto as type_picto,";
|
||||||
$sql .= " sp.lastname, sp.firstname, sp.email, sp.phone, sp.address, sp.phone as phone_pro, sp.phone_mobile, sp.phone_perso, sp.fk_pays as country_id";
|
$sql .= " sp.lastname, sp.firstname, sp.email, sp.phone, sp.address, sp.phone as phone_pro, sp.phone_mobile, sp.phone_perso, sp.fk_pays as country_id";
|
||||||
|
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
@ -481,31 +483,31 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$viewmode = '';
|
$viewmode = '';
|
||||||
$viewmode .= '<a class="btnTitle btnTitleSelected reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1">';
|
$viewmode .= '<a class="btnTitle btnTitleSelected reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
@ -657,6 +659,7 @@ if ($resql)
|
|||||||
$actionstatic->type_code = $obj->type_code;
|
$actionstatic->type_code = $obj->type_code;
|
||||||
$actionstatic->type_label = $obj->type_label;
|
$actionstatic->type_label = $obj->type_label;
|
||||||
$actionstatic->type_picto = $obj->type_picto;
|
$actionstatic->type_picto = $obj->type_picto;
|
||||||
|
$actionstatic->type_color = $obj->type_color;
|
||||||
$actionstatic->label = $obj->label;
|
$actionstatic->label = $obj->label;
|
||||||
$actionstatic->location = $obj->location;
|
$actionstatic->location = $obj->location;
|
||||||
$actionstatic->note_private = dol_htmlentitiesbr($obj->note);
|
$actionstatic->note_private = dol_htmlentitiesbr($obj->note);
|
||||||
|
|||||||
@ -236,8 +236,8 @@ if ($resourceid > 0) $param .= "&search_resourceid=".urlencode($resourceid);
|
|||||||
if ($status || GETPOSTISSET('status')) $param .= "&search_status=".urlencode($status);
|
if ($status || GETPOSTISSET('status')) $param .= "&search_status=".urlencode($status);
|
||||||
if ($filter) $param .= "&search_filter=".urlencode($filter);
|
if ($filter) $param .= "&search_filter=".urlencode($filter);
|
||||||
if ($filtert) $param .= "&search_filtert=".urlencode($filtert);
|
if ($filtert) $param .= "&search_filtert=".urlencode($filtert);
|
||||||
if ($usergroup) $param .= "&search_usergroup=".urlencode($usergroup);
|
if ($usergroup > 0) $param .= "&search_usergroup=".urlencode($usergroup);
|
||||||
if ($socid) $param .= "&search_socid=".urlencode($socid);
|
if ($socid > 0) $param .= "&search_socid=".urlencode($socid);
|
||||||
if ($showbirthday) $param .= "&search_showbirthday=1";
|
if ($showbirthday) $param .= "&search_showbirthday=1";
|
||||||
if ($pid) $param .= "&search_projectid=".urlencode($pid);
|
if ($pid) $param .= "&search_projectid=".urlencode($pid);
|
||||||
if ($type) $param .= "&search_type=".urlencode($type);
|
if ($type) $param .= "&search_type=".urlencode($type);
|
||||||
@ -248,6 +248,8 @@ if ($begin_d != '') $param .= '&begin_d='.urlencode($begin_d);
|
|||||||
if ($end_d != '') $param .= '&end_d='.urlencode($end_d);
|
if ($end_d != '') $param .= '&end_d='.urlencode($end_d);
|
||||||
$param .= "&maxprint=".urlencode($maxprint);
|
$param .= "&maxprint=".urlencode($maxprint);
|
||||||
|
|
||||||
|
$paramnoactionodate = $param;
|
||||||
|
|
||||||
$prev = dol_get_first_day($year, 1);
|
$prev = dol_get_first_day($year, 1);
|
||||||
$prev_year = $year - 1;
|
$prev_year = $year - 1;
|
||||||
$prev_month = $month;
|
$prev_month = $month;
|
||||||
@ -352,31 +354,31 @@ if ($conf->use_javascript_ajax)
|
|||||||
$massactionbutton = '';
|
$massactionbutton = '';
|
||||||
|
|
||||||
$viewmode = '';
|
$viewmode = '';
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle btnTitleSelected reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle btnTitleSelected reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
@ -430,6 +432,8 @@ print '</div>';
|
|||||||
// Get event in an array
|
// Get event in an array
|
||||||
$eventarray = array();
|
$eventarray = array();
|
||||||
|
|
||||||
|
|
||||||
|
// DEFAULT CALENDAR + AUTOEVENT CALENDAR + CONFERENCEBOOTH CALENDAR
|
||||||
$sql = 'SELECT';
|
$sql = 'SELECT';
|
||||||
if ($usergroup > 0) $sql .= " DISTINCT";
|
if ($usergroup > 0) $sql .= " DISTINCT";
|
||||||
$sql .= ' a.id, a.label,';
|
$sql .= ' a.id, a.label,';
|
||||||
@ -439,7 +443,7 @@ $sql .= ' a.percent,';
|
|||||||
$sql .= ' a.fk_user_author,a.fk_user_action,';
|
$sql .= ' a.fk_user_author,a.fk_user_action,';
|
||||||
$sql .= ' a.transparency, a.priority, a.fulldayevent, a.location,';
|
$sql .= ' a.transparency, a.priority, a.fulldayevent, a.location,';
|
||||||
$sql .= ' a.fk_soc, a.fk_contact, a.fk_element, a.elementtype, a.fk_project,';
|
$sql .= ' a.fk_soc, a.fk_contact, a.fk_element, a.elementtype, a.fk_project,';
|
||||||
$sql .= ' ca.code, ca.color';
|
$sql .= ' ca.code, ca.libelle as type_label, ca.color, ca.type as type_type, ca.picto as type_picto';
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a";
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||||
// We must filter on resource table
|
// We must filter on resource table
|
||||||
|
|||||||
@ -236,8 +236,8 @@ if ($resourceid > 0) $param .= "&search_resourceid=".urlencode($resourceid);
|
|||||||
if ($status || GETPOSTISSET('status')) $param .= "&search_status=".urlencode($status);
|
if ($status || GETPOSTISSET('status')) $param .= "&search_status=".urlencode($status);
|
||||||
if ($filter) $param .= "&search_filter=".urlencode($filter);
|
if ($filter) $param .= "&search_filter=".urlencode($filter);
|
||||||
if ($filtert) $param .= "&search_filtert=".urlencode($filtert);
|
if ($filtert) $param .= "&search_filtert=".urlencode($filtert);
|
||||||
if ($usergroup) $param .= "&search_usergroup=".urlencode($usergroup);
|
if ($usergroup > 0) $param .= "&search_usergroup=".urlencode($usergroup);
|
||||||
if ($socid) $param .= "&search_socid=".urlencode($socid);
|
if ($socid > 0) $param .= "&search_socid=".urlencode($socid);
|
||||||
if ($showbirthday) $param .= "&search_showbirthday=1";
|
if ($showbirthday) $param .= "&search_showbirthday=1";
|
||||||
if ($pid) $param .= "&search_projectid=".urlencode($pid);
|
if ($pid) $param .= "&search_projectid=".urlencode($pid);
|
||||||
if ($type) $param .= "&search_type=".urlencode($type);
|
if ($type) $param .= "&search_type=".urlencode($type);
|
||||||
@ -248,6 +248,7 @@ if ($begin_d != '') $param .= '&begin_d='.urlencode($begin_d);
|
|||||||
if ($end_d != '') $param .= '&end_d='.urlencode($end_d);
|
if ($end_d != '') $param .= '&end_d='.urlencode($end_d);
|
||||||
$param .= "&maxprint=".urlencode($maxprint);
|
$param .= "&maxprint=".urlencode($maxprint);
|
||||||
|
|
||||||
|
$paramnoactionodate = $param;
|
||||||
|
|
||||||
$prev = dol_get_first_day_week($day, $month, $year);
|
$prev = dol_get_first_day_week($day, $month, $year);
|
||||||
//print "day=".$day." month=".$month." year=".$year;
|
//print "day=".$day." month=".$month." year=".$year;
|
||||||
@ -357,31 +358,31 @@ if ($conf->use_javascript_ajax)
|
|||||||
$massactionbutton = '';
|
$massactionbutton = '';
|
||||||
|
|
||||||
$viewmode = '';
|
$viewmode = '';
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/list.php?action=show_list&restore_lastsearch_values=1'.$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewList").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewCal").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_week&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewWeek").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
|
||||||
|
|
||||||
$viewmode .= '<a class="btnTitle btnTitleSelected reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').'">';
|
$viewmode .= '<a class="btnTitle btnTitleSelected reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
|
||||||
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
|
||||||
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
|
||||||
//$viewmode .= '</span>';
|
//$viewmode .= '</span>';
|
||||||
@ -435,10 +436,11 @@ print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $show
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Get event in an array
|
// Get event in an array
|
||||||
$eventarray = array();
|
$eventarray = array();
|
||||||
|
|
||||||
|
|
||||||
|
// DEFAULT CALENDAR + AUTOEVENT CALENDAR + CONFERENCEBOOTH CALENDAR
|
||||||
$sql = 'SELECT';
|
$sql = 'SELECT';
|
||||||
if ($usergroup > 0) $sql .= " DISTINCT";
|
if ($usergroup > 0) $sql .= " DISTINCT";
|
||||||
$sql .= ' a.id, a.label,';
|
$sql .= ' a.id, a.label,';
|
||||||
@ -448,7 +450,7 @@ $sql .= ' a.percent,';
|
|||||||
$sql .= ' a.fk_user_author,a.fk_user_action,';
|
$sql .= ' a.fk_user_author,a.fk_user_action,';
|
||||||
$sql .= ' a.transparency, a.priority, a.fulldayevent, a.location,';
|
$sql .= ' a.transparency, a.priority, a.fulldayevent, a.location,';
|
||||||
$sql .= ' a.fk_soc, a.fk_contact, a.fk_element, a.elementtype, a.fk_project,';
|
$sql .= ' a.fk_soc, a.fk_contact, a.fk_element, a.elementtype, a.fk_project,';
|
||||||
$sql .= ' ca.code, ca.color';
|
$sql .= ' ca.code, ca.libelle as type_label, ca.color, ca.type as type_type, ca.picto as type_picto';
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a";
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||||
// We must filter on resource table
|
// We must filter on resource table
|
||||||
|
|||||||
@ -116,6 +116,11 @@ $pagenext = $page + 1;
|
|||||||
if (!$sortfield) $sortfield = 'p.ref';
|
if (!$sortfield) $sortfield = 'p.ref';
|
||||||
if (!$sortorder) $sortorder = 'DESC';
|
if (!$sortorder) $sortorder = 'DESC';
|
||||||
|
|
||||||
|
$permissiontoread = $user->rights->propal->lire;
|
||||||
|
$permissiontoadd = $user->rights->propal->write;
|
||||||
|
$permissiontodelete = $user->rights->propal->supprimer;
|
||||||
|
$permissiontoclose = $user->rights->propal->cloturer;
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$module = 'propal';
|
$module = 'propal';
|
||||||
$dbtable = '';
|
$dbtable = '';
|
||||||
@ -260,13 +265,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||||||
}
|
}
|
||||||
if ($object_statut != '') $search_status = $object_statut;
|
if ($object_statut != '') $search_status = $object_statut;
|
||||||
|
|
||||||
|
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
$objectclass = 'Propal';
|
$objectclass = 'Propal';
|
||||||
$objectlabel = 'Proposals';
|
$objectlabel = 'Proposals';
|
||||||
$permissiontoread = $user->rights->propal->lire;
|
|
||||||
$permissiontodelete = $user->rights->propal->supprimer;
|
|
||||||
$permissiontoclose = $user->rights->propal->cloturer;
|
|
||||||
$uploaddir = $conf->propal->multidir_output[$conf->entity];
|
$uploaddir = $conf->propal->multidir_output[$conf->entity];
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,7 +61,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('', $langs->trans('Proposal'), 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
|
$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos';
|
||||||
|
|
||||||
|
llxHeader('', $langs->trans('Proposal'), $help_url);
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|||||||
@ -238,7 +238,7 @@ if (empty($reshook))
|
|||||||
elseif ($action == 'add' && $usercancreate)
|
elseif ($action == 'add' && $usercancreate)
|
||||||
{
|
{
|
||||||
$datecommande = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
$datecommande = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
||||||
$datelivraison = dol_mktime(12, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year'));
|
$date_delivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int'));
|
||||||
$selectedLines = GETPOST('toselect', 'array');
|
$selectedLines = GETPOST('toselect', 'array');
|
||||||
|
|
||||||
if ($datecommande == '') {
|
if ($datecommande == '') {
|
||||||
@ -271,8 +271,8 @@ if (empty($reshook))
|
|||||||
$object->fk_account = GETPOST('fk_account', 'int');
|
$object->fk_account = GETPOST('fk_account', 'int');
|
||||||
$object->availability_id = GETPOST('availability_id');
|
$object->availability_id = GETPOST('availability_id');
|
||||||
$object->demand_reason_id = GETPOST('demand_reason_id');
|
$object->demand_reason_id = GETPOST('demand_reason_id');
|
||||||
$object->date_livraison = $datelivraison; // deprecated
|
$object->date_livraison = $date_delivery; // deprecated
|
||||||
$object->delivery_date = $datelivraison;
|
$object->delivery_date = $date_delivery;
|
||||||
$object->shipping_method_id = GETPOST('shipping_method_id', 'int');
|
$object->shipping_method_id = GETPOST('shipping_method_id', 'int');
|
||||||
$object->warehouse_id = GETPOST('warehouse_id', 'int');
|
$object->warehouse_id = GETPOST('warehouse_id', 'int');
|
||||||
$object->fk_delivery_address = GETPOST('fk_address');
|
$object->fk_delivery_address = GETPOST('fk_address');
|
||||||
@ -1628,7 +1628,7 @@ if ($action == 'create' && $usercancreate)
|
|||||||
print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>';
|
print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
$date_delivery = ($date_delivery ? $date_delivery : $object->date_delivery);
|
$date_delivery = ($date_delivery ? $date_delivery : $object->date_delivery);
|
||||||
print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1);
|
print $form->selectDate($date_delivery ? $date_delivery : -1, 'liv_', 1, 1, 1);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -3283,6 +3283,7 @@ class Commande extends CommonOrder
|
|||||||
if (isset($this->note_public)) $this->note_public = trim($this->note_public);
|
if (isset($this->note_public)) $this->note_public = trim($this->note_public);
|
||||||
if (isset($this->model_pdf)) $this->model_pdf = trim($this->model_pdf);
|
if (isset($this->model_pdf)) $this->model_pdf = trim($this->model_pdf);
|
||||||
if (isset($this->import_key)) $this->import_key = trim($this->import_key);
|
if (isset($this->import_key)) $this->import_key = trim($this->import_key);
|
||||||
|
$delivery_date = empty($this->delivery_date) ? $this->date_livraison : $this->delivery_date;
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
// Put here code to add control on parameters values
|
// Put here code to add control on parameters values
|
||||||
@ -3307,6 +3308,8 @@ class Commande extends CommonOrder
|
|||||||
$sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").",";
|
$sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").",";
|
||||||
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").",";
|
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").",";
|
||||||
$sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").",";
|
$sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").",";
|
||||||
|
$sql .= " date_livraison=".(strval($this->delivery_date) != '' ? "'".$this->db->idate($this->delivery_date)."'" : 'null').",";
|
||||||
|
$sql .= " fk_shipping_method=".(isset($this->shipping_method_id) ? $this->shipping_method_id : "null").",";
|
||||||
$sql .= " fk_account=".($this->fk_account > 0 ? $this->fk_account : "null").",";
|
$sql .= " fk_account=".($this->fk_account > 0 ? $this->fk_account : "null").",";
|
||||||
$sql .= " fk_input_reason=".($this->demand_reason_id > 0 ? $this->demand_reason_id : "null").",";
|
$sql .= " fk_input_reason=".($this->demand_reason_id > 0 ? $this->demand_reason_id : "null").",";
|
||||||
$sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").",";
|
$sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").",";
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
|
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -128,23 +129,17 @@ $userstatic = new User($db);
|
|||||||
/* */
|
/* */
|
||||||
/* *************************************************************************** */
|
/* *************************************************************************** */
|
||||||
|
|
||||||
if ($id > 0 || !empty($ref))
|
if ($id > 0 || !empty($ref)) {
|
||||||
{
|
if ($object->fetch($id, $ref) > 0) {
|
||||||
$langs->trans("OrderCard");
|
|
||||||
|
|
||||||
if ($object->fetch($id, $ref) > 0)
|
|
||||||
{
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$head = commande_prepare_head($object);
|
$head = commande_prepare_head($object);
|
||||||
print dol_get_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), -1, 'order');
|
print dol_get_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), -1, 'order');
|
||||||
|
|
||||||
|
|
||||||
// Order card
|
// Order card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/commande/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/commande/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
|
||||||
$morehtmlref = '<div class="refidno">';
|
$morehtmlref = '<div class="refidno">';
|
||||||
// Ref customer
|
// Ref customer
|
||||||
$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
|
||||||
|
|||||||
@ -1398,7 +1398,7 @@ if ($resql)
|
|||||||
if ($links[$key]['type'] == 'payment_salary') $type_link = 'payment_salary';
|
if ($links[$key]['type'] == 'payment_salary') $type_link = 'payment_salary';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sqlu = "SELECT url_id FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank=".$objp->rowid." AND type='user'";
|
$sqlu = "SELECT url_id FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank=".$objp->rowid." AND (type='user' OR type='salary')";
|
||||||
$resqlu = $db->query($sqlu);
|
$resqlu = $db->query($sqlu);
|
||||||
|
|
||||||
if ($resqlu) {
|
if ($resqlu) {
|
||||||
|
|||||||
@ -585,7 +585,7 @@ foreach ($accounts as $key=>$type)
|
|||||||
if (!empty($arrayfields['balance']['checked']))
|
if (!empty($arrayfields['balance']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="nowraponall right">';
|
print '<td class="nowraponall right">';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$objecttmp->id.'">'.price($solde, 0, $langs, 0, -1, -1, $objecttmp->currency_code).'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$objecttmp->id.'">'.price($solde, 0, $langs, 1, -1, -1, $objecttmp->currency_code).'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) $totalarray['nbfield']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'balance';
|
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'balance';
|
||||||
|
|||||||
@ -58,6 +58,10 @@ $search_accountancy_account = GETPOST("search_accountancy_account");
|
|||||||
if ($search_accountancy_account == - 1) $search_accountancy_account = '';
|
if ($search_accountancy_account == - 1) $search_accountancy_account = '';
|
||||||
$search_accountancy_subledger = GETPOST("search_accountancy_subledger");
|
$search_accountancy_subledger = GETPOST("search_accountancy_subledger");
|
||||||
if ($search_accountancy_subledger == - 1) $search_accountancy_subledger = '';
|
if ($search_accountancy_subledger == - 1) $search_accountancy_subledger = '';
|
||||||
|
if (empty($search_datep_start)) $search_datep_start = GETPOST("search_datep_start", 'int');
|
||||||
|
if (empty($search_datep_end)) $search_datep_end = GETPOST("search_datep_end", 'int');
|
||||||
|
if (empty($search_datev_start)) $search_datev_start = GETPOST("search_datev_start", 'int');
|
||||||
|
if (empty($search_datev_end)) $search_datev_end = GETPOST("search_datev_end", 'int');
|
||||||
|
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
|
|||||||
@ -73,9 +73,10 @@ $terminalid = $cashcontrol->posnumber;
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$title = $langs->trans("CashControl");
|
||||||
$param = '';
|
$param = '';
|
||||||
|
|
||||||
llxHeader('', $langs->trans("CashControl"), '', '', 0, 0, array(), array(), $param);
|
llxHeader('', $title, '', '', 0, 0, array(), array(), $param);
|
||||||
|
|
||||||
/*$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro as conciliated, b.num_releve, b.num_chq,";
|
/*$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro as conciliated, b.num_releve, b.num_chq,";
|
||||||
$sql.= " b.fk_account, b.fk_type,";
|
$sql.= " b.fk_account, b.fk_type,";
|
||||||
|
|||||||
@ -289,11 +289,11 @@ if (empty($reshook))
|
|||||||
elseif ($action == 'setref' && $user->rights->facture->creer)
|
elseif ($action == 'setref' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
//var_dump(GETPOST('ref', 'alpha'));exit;
|
//var_dump(GETPOST('ref', 'alpha'));exit;
|
||||||
$result = $object->setValueFrom('title', $ref, '', null, 'text', '', $user, 'BILLREC_MODIFY');
|
$result = $object->setValueFrom('titre', $ref, '', null, 'text', '', $user, 'BILLREC_MODIFY');
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$object->titre = GETPOST('ref', 'alpha'); // deprecated
|
$object->titre = $ref; // deprecated
|
||||||
$object->title = GETPOST('ref', 'alpha');
|
$object->title = $ref;
|
||||||
$object->ref = $object->title;
|
$object->ref = $object->title;
|
||||||
} else {
|
} else {
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
@ -4120,7 +4120,7 @@ if ($action == 'create')
|
|||||||
if ($objectidnext > 0) {
|
if ($objectidnext > 0) {
|
||||||
$facthatreplace = new Facture($db);
|
$facthatreplace = new Facture($db);
|
||||||
$facthatreplace->fetch($objectidnext);
|
$facthatreplace->fetch($objectidnext);
|
||||||
print ' <span class="opacitymediumbycolor paddingleft">('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')</span>';
|
print ' <span class="opacitymediumbycolor paddingleft">('.str_replace('{s1}', $facthatreplace->getNomUrl(1), $langs->transnoentities("ReplacedByInvoice", '{s1}')).')</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) {
|
if ($object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) {
|
||||||
@ -4128,7 +4128,10 @@ if ($action == 'create')
|
|||||||
$result = $discount->fetch(0, $object->id);
|
$result = $discount->fetch(0, $object->id);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
print ' <span class="opacitymediumbycolor paddingleft">';
|
print ' <span class="opacitymediumbycolor paddingleft">';
|
||||||
print $langs->transnoentities("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount'));
|
$s = $langs->trans("CreditNoteConvertedIntoDiscount", '{s1}', '{s2}');
|
||||||
|
$s = str_replace('{s1}', $object->getLibType(1), $s);
|
||||||
|
$s = str_replace('{s2}', $discount->getNomUrl(1, 'discount'), $s);
|
||||||
|
print $s;
|
||||||
print '</span><br>';
|
print '</span><br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4139,7 +4142,9 @@ if ($action == 'create')
|
|||||||
$result = $tmptemplate->fetch($object->fk_fac_rec_source);
|
$result = $tmptemplate->fetch($object->fk_fac_rec_source);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
print ' <span class="opacitymediumbycolor paddingleft">';
|
print ' <span class="opacitymediumbycolor paddingleft">';
|
||||||
print $langs->transnoentities("GeneratedFromTemplate", '<a href="'.DOL_URL_ROOT.'/compta/facture/card-rec.php?facid='.$tmptemplate->id.'">'.dol_escape_htmltag($tmptemplate->ref).'</a>');
|
$s = $langs->transnoentities("GeneratedFromTemplate", '{s1}');
|
||||||
|
$s = str_replace('{s1}', '<a href="'.DOL_URL_ROOT.'/compta/facture/card-rec.php?facid='.$tmptemplate->id.'">'.dol_escape_htmltag($tmptemplate->ref).'</a>', $s);
|
||||||
|
print $s;
|
||||||
print '</span>';
|
print '</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -268,7 +268,7 @@ if ($search_status != '' && $search_status >= -1)
|
|||||||
if ($search_status == -1) $sql .= ' AND suspended = 1';
|
if ($search_status == -1) $sql .= ' AND suspended = 1';
|
||||||
}
|
}
|
||||||
$sql .= dolSqlDateFilter('f.date_last_gen', $search_day, $search_month, $search_year);
|
$sql .= dolSqlDateFilter('f.date_last_gen', $search_day, $search_month, $search_year);
|
||||||
$sql .= dolSqlDateFilter('f.date_last_gen', $search_day_date_when, $search_month_date_when, $search_year_date_when);
|
$sql .= dolSqlDateFilter('f.date_when', $search_day_date_when, $search_month_date_when, $search_year_date_when);
|
||||||
|
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
|
|||||||
@ -1312,7 +1312,7 @@ class Paiement extends CommonObject
|
|||||||
$invoice = new Facture($this->db);
|
$invoice = new Facture($this->db);
|
||||||
if ($invoice->fetch($billsarray[0]) > 0)
|
if ($invoice->fetch($billsarray[0]) > 0)
|
||||||
{
|
{
|
||||||
$force_thirdparty_id = $invoice->fk_soc;
|
$force_thirdparty_id = $invoice->socid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -252,7 +252,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
$sql .= " AND f.entity = ".$conf->entity;
|
$sql .= " AND f.entity = ".$conf->entity;
|
||||||
if (!empty($date_start) && !empty($date_end))
|
if (!empty($date_start) && !empty($date_end))
|
||||||
$sql .= " AND f.doc_date >= '".$db->idate($date_start)."' AND f.doc_date <= '".$db->idate($date_end)."'";
|
$sql .= " AND f.doc_date >= '".$db->idate($date_start)."' AND f.doc_date <= '".$db->idate($date_end)."'";
|
||||||
$sql .= " GROUP BY pcg_type, name, socid";
|
$sql .= " GROUP BY pcg_type DESC, name, socid";
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
$oldpcgtype = '';
|
$oldpcgtype = '';
|
||||||
@ -284,6 +284,15 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
$total_ht += (isset($objp->amount) ? $objp->amount : 0);
|
$total_ht += (isset($objp->amount) ? $objp->amount : 0);
|
||||||
$total_ttc += (isset($objp->amount) ? $objp->amount : 0);
|
$total_ttc += (isset($objp->amount) ? $objp->amount : 0);
|
||||||
|
|
||||||
|
if ($objp->pcg_type == 'INCOME') {
|
||||||
|
$total_ht_income += (isset($objp->amount) ? $objp->amount : 0);
|
||||||
|
$total_ttc_income += (isset($objp->amount) ? $objp->amount : 0);
|
||||||
|
}
|
||||||
|
if ($objp->pcg_type == 'EXPENSE') {
|
||||||
|
$total_ht_outcome -= (isset($objp->amount) ? $objp->amount : 0);
|
||||||
|
$total_ttc_outcome -= (isset($objp->amount) ? $objp->amount : 0);
|
||||||
|
}
|
||||||
|
|
||||||
// Loop on detail of all accounts
|
// Loop on detail of all accounts
|
||||||
// This make 14 calls for each detail of account (NP, N and month m)
|
// This make 14 calls for each detail of account (NP, N and month m)
|
||||||
if ($showaccountdetail != 'no')
|
if ($showaccountdetail != 'no')
|
||||||
@ -446,6 +455,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
|
|
||||||
$total_ht_income += $total_ht;
|
$total_ht_income += $total_ht;
|
||||||
$total_ttc_income += $total_ttc;
|
$total_ttc_income += $total_ttc;
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
print '<td colspan="3" class="right">'.price($total_ht).'</td>';
|
print '<td colspan="3" class="right">'.price($total_ht).'</td>';
|
||||||
@ -525,6 +535,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
|
|
||||||
$total_ht_income += $subtotal_ht;
|
$total_ht_income += $subtotal_ht;
|
||||||
$total_ttc_income += $subtotal_ttc;
|
$total_ttc_income += $subtotal_ttc;
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
print '<td colspan="3" class="right">'.price($subtotal_ht).'</td>';
|
print '<td colspan="3" class="right">'.price($subtotal_ht).'</td>';
|
||||||
@ -609,6 +620,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
|
|
||||||
$total_ht_outcome += $subtotal_ht;
|
$total_ht_outcome += $subtotal_ht;
|
||||||
$total_ttc_outcome += $subtotal_ttc;
|
$total_ttc_outcome += $subtotal_ttc;
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
||||||
@ -686,6 +698,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
|
|
||||||
$total_ht_outcome += $subtotal_ht;
|
$total_ht_outcome += $subtotal_ht;
|
||||||
$total_ttc_outcome += $subtotal_ttc;
|
$total_ttc_outcome += $subtotal_ttc;
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
||||||
@ -764,6 +777,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
|
|
||||||
$total_ht_outcome += $subtotal_ht;
|
$total_ht_outcome += $subtotal_ht;
|
||||||
$total_ttc_outcome += $subtotal_ttc;
|
$total_ttc_outcome += $subtotal_ttc;
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
||||||
@ -841,6 +855,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
|
|
||||||
$total_ht_outcome += $subtotal_ht;
|
$total_ht_outcome += $subtotal_ht;
|
||||||
$total_ttc_outcome += $subtotal_ttc;
|
$total_ttc_outcome += $subtotal_ttc;
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
||||||
@ -926,6 +941,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
|
|
||||||
$total_ht_outcome += $subtotal_ht;
|
$total_ht_outcome += $subtotal_ht;
|
||||||
$total_ttc_outcome += $subtotal_ttc;
|
$total_ttc_outcome += $subtotal_ttc;
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
if ($modecompta == 'CREANCES-DETTES') print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
if ($modecompta == 'CREANCES-DETTES') print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
||||||
print '<td colspan="3" class="right">'.price(-$subtotal_ttc).'</td>';
|
print '<td colspan="3" class="right">'.price(-$subtotal_ttc).'</td>';
|
||||||
@ -963,6 +979,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
{
|
{
|
||||||
$subtotal_ht += -$obj->amount;
|
$subtotal_ht += -$obj->amount;
|
||||||
$subtotal_ttc += -$obj->amount;
|
$subtotal_ttc += -$obj->amount;
|
||||||
|
|
||||||
$total_ht_outcome += $obj->amount;
|
$total_ht_outcome += $obj->amount;
|
||||||
$total_ttc_outcome += $obj->amount;
|
$total_ttc_outcome += $obj->amount;
|
||||||
}
|
}
|
||||||
@ -978,6 +995,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
{
|
{
|
||||||
$subtotal_ht += $obj->amount;
|
$subtotal_ht += $obj->amount;
|
||||||
$subtotal_ttc += $obj->amount;
|
$subtotal_ttc += $obj->amount;
|
||||||
|
|
||||||
$total_ht_income += $obj->amount;
|
$total_ht_income += $obj->amount;
|
||||||
$total_ttc_income += $obj->amount;
|
$total_ttc_income += $obj->amount;
|
||||||
}
|
}
|
||||||
@ -1038,8 +1056,10 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
}
|
}
|
||||||
$total_ht += $subtotal_ht;
|
$total_ht += $subtotal_ht;
|
||||||
$total_ttc += $subtotal_ttc;
|
$total_ttc += $subtotal_ttc;
|
||||||
|
|
||||||
$total_ht_income += $subtotal_ht;
|
$total_ht_income += $subtotal_ht;
|
||||||
$total_ttc_income += $subtotal_ttc;
|
$total_ttc_income += $subtotal_ttc;
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
print '<td colspan="3" class="right">'.price($subtotal_ht).'</td>';
|
print '<td colspan="3" class="right">'.price($subtotal_ht).'</td>';
|
||||||
@ -1101,8 +1121,10 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$total_ht_outcome -= 0;
|
$total_ht_outcome -= 0;
|
||||||
$total_ttc_outcome -= $amount;
|
$total_ttc_outcome -= $amount;
|
||||||
|
|
||||||
print '<tr class="oddeven"><td> </td>';
|
print '<tr class="oddeven"><td> </td>';
|
||||||
print "<td>".$langs->trans("VATToPay")."</td>\n";
|
print "<td>".$langs->trans("VATToPay")."</td>\n";
|
||||||
print '<td class="right"> </td>'."\n";
|
print '<td class="right"> </td>'."\n";
|
||||||
@ -1151,6 +1173,7 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$total_ht_income += 0;
|
$total_ht_income += 0;
|
||||||
$total_ttc_income += $amount;
|
$total_ttc_income += $amount;
|
||||||
|
|
||||||
@ -1197,8 +1220,10 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$total_ht_outcome -= 0;
|
$total_ht_outcome -= 0;
|
||||||
$total_ttc_outcome -= $amount;
|
$total_ttc_outcome -= $amount;
|
||||||
|
|
||||||
print '<tr class="oddeven"><td> </td>';
|
print '<tr class="oddeven"><td> </td>';
|
||||||
print "<td>".$langs->trans("VATPaid")."</td>\n";
|
print "<td>".$langs->trans("VATPaid")."</td>\n";
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
@ -1243,8 +1268,10 @@ if ($modecompta == 'BOOKKEEPING')
|
|||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$total_ht_income += 0;
|
$total_ht_income += 0;
|
||||||
$total_ttc_income += $amount;
|
$total_ttc_income += $amount;
|
||||||
|
|
||||||
print '<tr class="oddeven"><td> </td>';
|
print '<tr class="oddeven"><td> </td>';
|
||||||
print "<td>".$langs->trans("VATCollected")."</td>\n";
|
print "<td>".$langs->trans("VATCollected")."</td>\n";
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
@ -1279,19 +1306,22 @@ print '<tr>';
|
|||||||
print '<td colspan="4"> </td>';
|
print '<td colspan="4"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans("Outcome").'</td>';
|
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
|
||||||
print '<td class="liste_total right">'.price(price2num(-$total_ht_outcome, 'MT')).'</td>';
|
|
||||||
print '<td class="liste_total right">'.price(price2num(-$total_ttc_outcome, 'MT')).'</td>';
|
|
||||||
print '</tr>';
|
|
||||||
print '<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans("Income").'</td>';
|
print '<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans("Income").'</td>';
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
print '<td class="liste_total right">'.price(price2num($total_ht_income, 'MT')).'</td>';
|
print '<td class="liste_total right">'.price(price2num($total_ht_income, 'MT')).'</td>';
|
||||||
|
}
|
||||||
print '<td class="liste_total right">'.price(price2num($total_ttc_income, 'MT')).'</td>';
|
print '<td class="liste_total right">'.price(price2num($total_ttc_income, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
print '<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans("Outcome").'</td>';
|
||||||
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
|
print '<td class="liste_total right">'.price(price2num(-$total_ht_outcome, 'MT')).'</td>';
|
||||||
|
}
|
||||||
|
print '<td class="liste_total right">'.price(price2num(-$total_ttc_outcome, 'MT')).'</td>';
|
||||||
|
print '</tr>';
|
||||||
print '<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans("Profit").'</td>';
|
print '<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans("Profit").'</td>';
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
print '<td class="liste_total right">'.price(price2num($total_ht, 'MT')).'</td>';
|
print '<td class="liste_total right">'.price(price2num($total_ht, 'MT')).'</td>';
|
||||||
|
}
|
||||||
print '<td class="liste_total right">'.price(price2num($total_ttc, 'MT')).'</td>';
|
print '<td class="liste_total right">'.price(price2num($total_ttc, 'MT')).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -866,9 +866,9 @@ if (!empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING'))
|
|||||||
if ($obj->pcg_type == 'INCOME') {
|
if ($obj->pcg_type == 'INCOME') {
|
||||||
if (!isset($encaiss[$obj->dm])) $encaiss[$obj->dm] = 0; // To avoid warning of var not defined
|
if (!isset($encaiss[$obj->dm])) $encaiss[$obj->dm] = 0; // To avoid warning of var not defined
|
||||||
$encaiss[$obj->dm] += $obj->credit;
|
$encaiss[$obj->dm] += $obj->credit;
|
||||||
$encaiss[$obj->dm] -= $obj->credit;
|
$encaiss[$obj->dm] -= $obj->debit;
|
||||||
}
|
}
|
||||||
if ($obj->pcg_type == 'INCOME') {
|
if ($obj->pcg_type == 'EXPENSE') {
|
||||||
if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0; // To avoid warning of var not defined
|
if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0; // To avoid warning of var not defined
|
||||||
$decaiss[$obj->dm] += $obj->debit;
|
$decaiss[$obj->dm] += $obj->debit;
|
||||||
$decaiss[$obj->dm] -= $obj->credit;
|
$decaiss[$obj->dm] -= $obj->credit;
|
||||||
|
|||||||
@ -359,7 +359,7 @@ if ($action == 'create')
|
|||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans('Employee');
|
print $langs->trans('Employee');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.$form->select_dolusers($fk_user, 'userid', 1).'</td></tr>';
|
print '<td>'.img_picto('', 'user', 'class="pictofixedwidth"').$form->select_dolusers($fk_user, 'userid', 1).'</td></tr>';
|
||||||
|
|
||||||
// Project
|
// Project
|
||||||
if (!empty($conf->projet->enabled))
|
if (!empty($conf->projet->enabled))
|
||||||
@ -371,7 +371,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||||
|
|
||||||
$numproject = $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1);
|
print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1, 0, 0, 0, '', 1);
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
@ -385,7 +385,7 @@ if ($action == 'create')
|
|||||||
if (!empty($conf->banque->enabled))
|
if (!empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
|
||||||
$form->select_comptes($fk_account, 'fk_account', 0, '', 2);
|
print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes($fk_account, 'fk_account', 0, '', 2, '', 0, '', 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,11 @@ $id = GETPOST("id", 'int');
|
|||||||
$action = GETPOST("action", "alpha");
|
$action = GETPOST("action", "alpha");
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
$refund = GETPOST("refund", "int");
|
$refund = GETPOST("refund", "int");
|
||||||
|
if (GETPOSTISSET('auto_create_paiement') || $action === 'add') {
|
||||||
$auto_create_payment = GETPOST("auto_create_paiement", "int");
|
$auto_create_payment = GETPOST("auto_create_paiement", "int");
|
||||||
|
} else {
|
||||||
|
$auto_create_payment = empty($conf->global->CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT);
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($refund)) $refund = 0;
|
if (empty($refund)) $refund = 0;
|
||||||
|
|
||||||
@ -377,17 +381,10 @@ if ($action == 'create')
|
|||||||
if (!empty($conf->use_javascript_ajax))
|
if (!empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
print "\n".'<script type="text/javascript" language="javascript">';
|
print "\n".'<script type="text/javascript" language="javascript">';
|
||||||
print '$(document).ready(function () {
|
print /** @lang JavaScript */'
|
||||||
$("#radiopayment").click(function() {
|
$(document).ready(function () {
|
||||||
$("#label").val($(this).data("label"));
|
let onAutoCreatePaiementChange = function () {
|
||||||
|
if($("#auto_create_paiement").is(":checked")) {
|
||||||
});
|
|
||||||
$("#radiorefund").click(function() {
|
|
||||||
$("#label").val($(this).data("label"));
|
|
||||||
|
|
||||||
});
|
|
||||||
$("#auto_create_paiement").click(function() {
|
|
||||||
if($(this).is(":checked")) {
|
|
||||||
$("#label_fk_account").addClass("fieldrequired");
|
$("#label_fk_account").addClass("fieldrequired");
|
||||||
$("#label_type_payment").addClass("fieldrequired");
|
$("#label_type_payment").addClass("fieldrequired");
|
||||||
$(".hide_if_no_auto_create_payment").show();
|
$(".hide_if_no_auto_create_payment").show();
|
||||||
@ -396,21 +393,21 @@ if ($action == 'create')
|
|||||||
$("#label_type_payment").removeClass("fieldrequired");
|
$("#label_type_payment").removeClass("fieldrequired");
|
||||||
$(".hide_if_no_auto_create_payment").hide();
|
$(".hide_if_no_auto_create_payment").hide();
|
||||||
}
|
}
|
||||||
});';
|
};
|
||||||
|
$("#radiopayment").click(function() {
|
||||||
|
$("#label").val($(this).data("label"));
|
||||||
|
});
|
||||||
|
$("#radiorefund").click(function() {
|
||||||
|
$("#label").val($(this).data("label"));
|
||||||
|
|
||||||
if ($_REQUEST['action'] === 'add') { // form has been send but there is at least one error
|
});
|
||||||
if (empty($auto_create_payment)) {
|
$("#auto_create_paiement").click(function () {
|
||||||
print '$("#label_fk_account").removeClass("fieldrequired");
|
onAutoCreatePaiementChange();
|
||||||
$("#label_type_payment").removeClass("fieldrequired");
|
});
|
||||||
$(".hide_if_no_auto_create_payment").hide();';
|
onAutoCreatePaiementChange();
|
||||||
} else {
|
});
|
||||||
print '$("#label_fk_account").addClass("fieldrequired");
|
';
|
||||||
$("#label_type_payment").addClass("fieldrequired");
|
|
||||||
$(".hide_if_no_auto_create_payment").show();';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print '});';
|
|
||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -475,7 +472,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Auto create payment
|
// Auto create payment
|
||||||
print '<tr><td>'.$langs->trans('AutomaticCreationPayment').'</td>';
|
print '<tr><td>'.$langs->trans('AutomaticCreationPayment').'</td>';
|
||||||
print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" '.($_REQUEST['action'] === 'add' ? (empty($auto_create_payment) ? '' : 'checked="checked"') : 'checked="checked"').' value="1"></td></tr>'."\n";
|
print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_payment) ? '' : 'checked="checked"') . ' value="1"></td></tr>'."\n";
|
||||||
|
|
||||||
// Number
|
// Number
|
||||||
print '<tr class="hide_if_no_auto_create_payment"><td>'.$langs->trans('Numero');
|
print '<tr class="hide_if_no_auto_create_payment"><td>'.$langs->trans('Numero');
|
||||||
|
|||||||
@ -889,8 +889,8 @@ if (empty($reshook))
|
|||||||
$action = 'editref';
|
$action = 'editref';
|
||||||
} else {
|
} else {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
$old_filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($old_ref);
|
$old_filedir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($old_ref);
|
||||||
$new_filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
$new_filedir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
|
||||||
|
|
||||||
$files = dol_dir_list($old_filedir);
|
$files = dol_dir_list($old_filedir);
|
||||||
if (!empty($files))
|
if (!empty($files))
|
||||||
@ -935,7 +935,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
|
|
||||||
// Actions to build doc
|
// Actions to build doc
|
||||||
$upload_dir = $conf->contrat->dir_output;
|
$upload_dir = $conf->contrat->multidir_output[$object->entity];
|
||||||
$permissiontoadd = $user->rights->contrat->creer;
|
$permissiontoadd = $user->rights->contrat->creer;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||||
|
|
||||||
@ -2137,13 +2137,13 @@ if ($action == 'create')
|
|||||||
* Documents generes
|
* Documents generes
|
||||||
*/
|
*/
|
||||||
$filename = dol_sanitizeFileName($object->ref);
|
$filename = dol_sanitizeFileName($object->ref);
|
||||||
$filedir = $conf->contrat->dir_output."/".dol_sanitizeFileName($object->ref);
|
$filedir = $conf->contrat->multidir_output[$object->entity]."/".dol_sanitizeFileName($object->ref);
|
||||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||||
$genallowed = $user->rights->contrat->lire;
|
$genallowed = $user->rights->contrat->lire;
|
||||||
$delallowed = $user->rights->contrat->creer;
|
$delallowed = $user->rights->contrat->creer;
|
||||||
|
|
||||||
|
|
||||||
print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
|
print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, ($object->model_pdf ? $object->model_pdf : $conf->global->CONTRACT_ADDON_PDF), 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, '', $object);
|
||||||
|
|
||||||
|
|
||||||
// Show links to link elements
|
// Show links to link elements
|
||||||
@ -2168,7 +2168,7 @@ if ($action == 'create')
|
|||||||
// Presend form
|
// Presend form
|
||||||
$modelmail = 'contract';
|
$modelmail = 'contract';
|
||||||
$defaulttopic = 'SendContractRef';
|
$defaulttopic = 'SendContractRef';
|
||||||
$diroutput = $conf->contrat->dir_output;
|
$diroutput = $conf->contrat->multidir_output[$object->entity];
|
||||||
$trackid = 'con'.$object->id;
|
$trackid = 'con'.$object->id;
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
||||||
|
|||||||
@ -1296,7 +1296,7 @@ class Contrat extends CommonObject
|
|||||||
$ref = dol_sanitizeFileName($this->ref);
|
$ref = dol_sanitizeFileName($this->ref);
|
||||||
if ($conf->contrat->dir_output)
|
if ($conf->contrat->dir_output)
|
||||||
{
|
{
|
||||||
$dir = $conf->contrat->dir_output."/".$ref;
|
$dir = $conf->contrat->multidir_output[$this->entity]."/".$ref;
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
$res = @dol_delete_dir_recursive($dir);
|
$res = @dol_delete_dir_recursive($dir);
|
||||||
|
|||||||
@ -74,7 +74,7 @@ if ($object->id > 0)
|
|||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
}
|
}
|
||||||
|
|
||||||
$upload_dir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
|
||||||
$modulepart = 'contract';
|
$modulepart = 'contract';
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
|||||||
@ -204,7 +204,7 @@ $formcompany = new FormCompany($db);
|
|||||||
$contracttmp = new Contrat($db);
|
$contracttmp = new Contrat($db);
|
||||||
|
|
||||||
$sql = 'SELECT';
|
$sql = 'SELECT';
|
||||||
$sql .= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public,";
|
$sql .= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public, c.entity,";
|
||||||
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays as country_id, s.client, s.code_client, s.status as company_status, s.logo as company_logo,';
|
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays as country_id, s.client, s.code_client, s.status as company_status, s.logo as company_logo,';
|
||||||
$sql .= " typent.code as typent_code,";
|
$sql .= " typent.code as typent_code,";
|
||||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||||
@ -260,7 +260,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
|||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
$sql .= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public,";
|
$sql .= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public, c.entity,";
|
||||||
$sql .= ' s.rowid, s.nom, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.status, s.logo,';
|
$sql .= ' s.rowid, s.nom, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.status, s.logo,';
|
||||||
$sql .= " typent.code,";
|
$sql .= " typent.code,";
|
||||||
$sql .= " state.code_departement, state.nom";
|
$sql .= " state.code_departement, state.nom";
|
||||||
@ -644,7 +644,7 @@ while ($i < min($num, $limit))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$filename = dol_sanitizeFileName($obj->ref);
|
$filename = dol_sanitizeFileName($obj->ref);
|
||||||
$filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($obj->ref);
|
$filedir = $conf->contrat->multidir_output[$obj->entity].'/'.dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
print $formfile->getDocumentsLink($contracttmp->element, $filename, $filedir);
|
print $formfile->getDocumentsLink($contracttmp->element, $filename, $filedir);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -1097,6 +1097,7 @@ if ($action == 'remove_file')
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Validate records
|
// Validate records
|
||||||
if (!$error && $massaction == 'validate' && $permissiontoadd)
|
if (!$error && $massaction == 'validate' && $permissiontoadd)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -135,7 +135,7 @@ class box_comptes extends ModeleBoxes
|
|||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'class="right nowraponall"',
|
'td' => 'class="right nowraponall"',
|
||||||
'text' => price($solde, 0, $langs, 0, -1, -1, $objp->currency_code)
|
'text' => price($solde, 0, $langs, 1, -1, -1, $objp->currency_code)
|
||||||
);
|
);
|
||||||
|
|
||||||
$line++;
|
$line++;
|
||||||
|
|||||||
@ -248,7 +248,7 @@ class HookManager
|
|||||||
$actionclassinstance->error = 0;
|
$actionclassinstance->error = 0;
|
||||||
$actionclassinstance->errors = array();
|
$actionclassinstance->errors = array();
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::executeHooks Qualified hook found (hooktype=".$hooktype."). We call method ".$method." of class ".get_class($actionclassinstance).", module=".$module.", action=".$action." context=".$context, LOG_DEBUG);
|
dol_syslog(get_class($this)."::executeHooks Qualified hook found (hooktype=".$hooktype."). We call method ".get_class($actionclassinstance).'->'.$method.", context=".$context.", module=".$module.", action=".$action.((is_object($object) && property_exists($object, 'id')) ? ', objectid='.$object->id : ''), LOG_DEBUG);
|
||||||
|
|
||||||
// Add current context to avoid method execution in bad context, you can add this test in your method : eg if($currentcontext != 'formfile') return;
|
// Add current context to avoid method execution in bad context, you can add this test in your method : eg if($currentcontext != 'formfile') return;
|
||||||
$parameters['currentcontext'] = $context;
|
$parameters['currentcontext'] = $context;
|
||||||
|
|||||||
@ -253,9 +253,9 @@ class Form
|
|||||||
|
|
||||||
if (empty($notabletag)) $ret .= '<td class="left">';
|
if (empty($notabletag)) $ret .= '<td class="left">';
|
||||||
//else $ret.='<div class="clearboth"></div>';
|
//else $ret.='<div class="clearboth"></div>';
|
||||||
$ret .= '<input type="submit" class="button'.(empty($notabletag) ? '' : ' ').'" name="modify" value="'.$langs->trans("Modify").'">';
|
$ret .= '<input type="submit" class="smallpaddingimp button'.(empty($notabletag) ? '' : ' ').'" name="modify" value="'.$langs->trans("Modify").'">';
|
||||||
if (preg_match('/ckeditor|textarea/', $typeofdata) && empty($notabletag)) $ret .= '<br>'."\n";
|
if (preg_match('/ckeditor|textarea/', $typeofdata) && empty($notabletag)) $ret .= '<br>'."\n";
|
||||||
$ret .= '<input type="submit" class="button button-cancel'.(empty($notabletag) ? '' : ' ').'" name="cancel" value="'.$langs->trans("Cancel").'">';
|
$ret .= '<input type="submit" class="smallpaddingimp button button-cancel'.(empty($notabletag) ? '' : ' ').'" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
if (empty($notabletag)) $ret .= '</td>';
|
if (empty($notabletag)) $ret .= '</td>';
|
||||||
|
|
||||||
if (empty($notabletag)) $ret .= '</tr></table>'."\n";
|
if (empty($notabletag)) $ret .= '</tr></table>'."\n";
|
||||||
@ -672,7 +672,7 @@ class Form
|
|||||||
|
|
||||||
// Warning: if you set submit button to disabled, post using 'Enter' will no more work if there is no another input submit. So we add a hidden button
|
// Warning: if you set submit button to disabled, post using 'Enter' will no more work if there is no another input submit. So we add a hidden button
|
||||||
$ret .= '<input type="submit" name="confirmmassactioninvisible" style="display: none" tabindex="-1">'; // Hidden button BEFORE so it is the one used when we submit with ENTER.
|
$ret .= '<input type="submit" name="confirmmassactioninvisible" style="display: none" tabindex="-1">'; // Hidden button BEFORE so it is the one used when we submit with ENTER.
|
||||||
$ret .= '<input type="submit" disabled name="confirmmassaction" class="button'.(empty($conf->use_javascript_ajax) ? '' : ' hideobject').' '.$name.' '.$name.'confirmed" value="'.dol_escape_htmltag($langs->trans("Confirm")).'">';
|
$ret .= '<input type="submit" disabled name="confirmmassaction"'.(empty($conf->use_javascript_ajax) ? '' : ' style="display: none"').' class="button'.(empty($conf->use_javascript_ajax) ? '' : ' hideobject').' '.$name.' '.$name.'confirmed" value="'.dol_escape_htmltag($langs->trans("Confirm")).'">';
|
||||||
$ret .= '</div>';
|
$ret .= '</div>';
|
||||||
|
|
||||||
if (!empty($conf->use_javascript_ajax))
|
if (!empty($conf->use_javascript_ajax))
|
||||||
@ -984,6 +984,7 @@ class Form
|
|||||||
print '>'.$langs->trans("Service");
|
print '>'.$langs->trans("Service");
|
||||||
|
|
||||||
print '</select>';
|
print '</select>';
|
||||||
|
print ajax_combobox('select_'.$htmlname);
|
||||||
//if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
//if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||||
}
|
}
|
||||||
if ((empty($forceall) && empty($conf->product->enabled) && !empty($conf->service->enabled)) || $forceall == 3)
|
if ((empty($forceall) && empty($conf->product->enabled) && !empty($conf->service->enabled)) || $forceall == 3)
|
||||||
@ -2753,9 +2754,10 @@ class Form
|
|||||||
* @param int $hidelabel Hide label (0=no, 1=yes)
|
* @param int $hidelabel Hide label (0=no, 1=yes)
|
||||||
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
|
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
|
||||||
* @param string $morecss More CSS
|
* @param string $morecss More CSS
|
||||||
|
* @param string $placeholder Placeholder
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '')
|
public function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '', $placeholder = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
@ -2776,9 +2778,9 @@ class Form
|
|||||||
// mode=2 means suppliers products
|
// mode=2 means suppliers products
|
||||||
$urloption = ($socid > 0 ? 'socid='.$socid.'&' : '').'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished.'&alsoproductwithnosupplierprice='.$alsoproductwithnosupplierprice;
|
$urloption = ($socid > 0 ? 'socid='.$socid.'&' : '').'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished.'&alsoproductwithnosupplierprice='.$alsoproductwithnosupplierprice;
|
||||||
print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
||||||
print ($hidelabel ? '' : $langs->trans("RefOrLabel").' : ').'<input type="text" size="20" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'">';
|
print ($hidelabel ? '' : $langs->trans("RefOrLabel").' : ').'<input type="text" class="minwidth300" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.($placeholder ? ' placeholder="'.$placeholder.'"' : '').'>';
|
||||||
} else {
|
} else {
|
||||||
print $this->select_produits_fournisseurs_list($socid, $selected, $htmlname, $filtertype, $filtre, '', -1, 0, 0, $alsoproductwithnosupplierprice, $morecss);
|
print $this->select_produits_fournisseurs_list($socid, $selected, $htmlname, $filtertype, $filtre, '', -1, 0, 0, $alsoproductwithnosupplierprice, $morecss, 0, $placeholder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2798,9 +2800,10 @@ class Form
|
|||||||
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
|
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
|
||||||
* @param string $morecss Add more CSS
|
* @param string $morecss Add more CSS
|
||||||
* @param int $showstockinlist Show stock information (slower).
|
* @param int $showstockinlist Show stock information (slower).
|
||||||
|
* @param string $placeholder Placeholder
|
||||||
* @return array Array of keys for json
|
* @return array Array of keys for json
|
||||||
*/
|
*/
|
||||||
public function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '', $showstockinlist = 0)
|
public function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '', $showstockinlist = 0, $placeholder = '')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs, $conf, $db, $user;
|
global $langs, $conf, $db, $user;
|
||||||
@ -2884,9 +2887,9 @@ class Form
|
|||||||
$num = $this->db->num_rows($result);
|
$num = $this->db->num_rows($result);
|
||||||
|
|
||||||
//$out.='<select class="flat" id="select'.$htmlname.'" name="'.$htmlname.'">'; // remove select to have id same with combo and ajax
|
//$out.='<select class="flat" id="select'.$htmlname.'" name="'.$htmlname.'">'; // remove select to have id same with combo and ajax
|
||||||
$out .= '<select class="flat maxwidthonsmartphone'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'">';
|
$out .= '<select class="flat '.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||||
if (!$selected) $out .= '<option value="0" selected> </option>';
|
if (!$selected) $out .= '<option value="-1" selected>'.($placeholder ? $placeholder : ' ').'</option>';
|
||||||
else $out .= '<option value="0"> </option>';
|
else $out .= '<option value="-1">'.($placeholder ? $placeholder : ' ').'</option>';
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@ -3101,7 +3104,7 @@ class Form
|
|||||||
|
|
||||||
|
|
||||||
// Add new entry
|
// Add new entry
|
||||||
// "key" value of json key array is used by jQuery automatically as selected value
|
// "key" value of json key array is used by jQuery automatically as selected value. Example: 'type' = product or service, 'price_ht' = unit price without tax
|
||||||
// "label" value of json key array is used by jQuery automatically as text for combo box
|
// "label" value of json key array is used by jQuery automatically as text for combo box
|
||||||
$out .= $opt;
|
$out .= $opt;
|
||||||
array_push($outarray,
|
array_push($outarray,
|
||||||
@ -3109,7 +3112,7 @@ class Form
|
|||||||
'value'=>$outref,
|
'value'=>$outref,
|
||||||
'label'=>$outval,
|
'label'=>$outval,
|
||||||
'qty'=>$outqty,
|
'qty'=>$outqty,
|
||||||
'up'=>$objp->unitprice,
|
'price_ht'=>price2num($objp->unitprice, 'MT'),
|
||||||
'discount'=>$outdiscount,
|
'discount'=>$outdiscount,
|
||||||
'type'=>$outtype,
|
'type'=>$outtype,
|
||||||
'duration_value'=>$outdurationvalue,
|
'duration_value'=>$outdurationvalue,
|
||||||
@ -4164,6 +4167,7 @@ class Form
|
|||||||
print '<form method="POST" action="'.$page.'">';
|
print '<form method="POST" action="'.$page.'">';
|
||||||
print '<input type="hidden" name="action" value="setbankaccount">';
|
print '<input type="hidden" name="action" value="setbankaccount">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
print img_picto('', 'bank_account', 'class="pictofixedwidth"');
|
||||||
$nbaccountfound = $this->select_comptes($selected, $htmlname, 0, '', $addempty);
|
$nbaccountfound = $this->select_comptes($selected, $htmlname, 0, '', $addempty);
|
||||||
if ($nbaccountfound > 0) print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
if ($nbaccountfound > 0) print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
@ -4362,14 +4366,11 @@ class Form
|
|||||||
$moreattr = (!empty($input['moreattr']) ? ' '.$input['moreattr'] : '');
|
$moreattr = (!empty($input['moreattr']) ? ' '.$input['moreattr'] : '');
|
||||||
$morecss = (!empty($input['morecss']) ? ' '.$input['morecss'] : '');
|
$morecss = (!empty($input['morecss']) ? ' '.$input['morecss'] : '');
|
||||||
|
|
||||||
if ($input['type'] == 'text')
|
if ($input['type'] == 'text') {
|
||||||
{
|
|
||||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd"><input type="text" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></div></div>'."\n";
|
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd"><input type="text" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></div></div>'."\n";
|
||||||
} elseif ($input['type'] == 'password')
|
} elseif ($input['type'] == 'password') {
|
||||||
{
|
|
||||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd"><input type="password" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></div></div>'."\n";
|
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div><div class="tagtd"><input type="password" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$size.' value="'.$input['value'].'"'.$moreattr.' /></div></div>'."\n";
|
||||||
} elseif ($input['type'] == 'select')
|
} elseif ($input['type'] == 'select') {
|
||||||
{
|
|
||||||
if (empty($morecss)) {
|
if (empty($morecss)) {
|
||||||
$morecss = 'minwidth100';
|
$morecss = 'minwidth100';
|
||||||
}
|
}
|
||||||
@ -4377,8 +4378,7 @@ class Form
|
|||||||
if (!empty($input['label'])) $more .= $input['label'].'</div><div class="tagtd left">';
|
if (!empty($input['label'])) $more .= $input['label'].'</div><div class="tagtd left">';
|
||||||
$more .= $this->selectarray($input['name'], $input['values'], $input['default'], 1, 0, 0, $moreattr, 0, 0, 0, '', $morecss);
|
$more .= $this->selectarray($input['name'], $input['values'], $input['default'], 1, 0, 0, $moreattr, 0, 0, 0, '', $morecss);
|
||||||
$more .= '</div></div>'."\n";
|
$more .= '</div></div>'."\n";
|
||||||
} elseif ($input['type'] == 'checkbox')
|
} elseif ($input['type'] == 'checkbox') {
|
||||||
{
|
|
||||||
$more .= '<div class="tagtr">';
|
$more .= '<div class="tagtr">';
|
||||||
$more .= '<div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].' </div><div class="tagtd">';
|
$more .= '<div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].' </div><div class="tagtd">';
|
||||||
$more .= '<input type="checkbox" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$moreattr;
|
$more .= '<input type="checkbox" class="flat'.$morecss.'" id="'.$input['name'].'" name="'.$input['name'].'"'.$moreattr;
|
||||||
@ -4387,8 +4387,7 @@ class Form
|
|||||||
if (isset($input['disabled'])) $more .= ' disabled';
|
if (isset($input['disabled'])) $more .= ' disabled';
|
||||||
$more .= ' /></div>';
|
$more .= ' /></div>';
|
||||||
$more .= '</div>'."\n";
|
$more .= '</div>'."\n";
|
||||||
} elseif ($input['type'] == 'radio')
|
} elseif ($input['type'] == 'radio') {
|
||||||
{
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($input['values'] as $selkey => $selval)
|
foreach ($input['values'] as $selkey => $selval)
|
||||||
{
|
{
|
||||||
@ -4403,8 +4402,7 @@ class Form
|
|||||||
$more .= '</div></div>'."\n";
|
$more .= '</div></div>'."\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
} elseif ($input['type'] == 'date')
|
} elseif ($input['type'] == 'date') {
|
||||||
{
|
|
||||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div>';
|
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div>';
|
||||||
$more .= '<div class="tagtd">';
|
$more .= '<div class="tagtd">';
|
||||||
$more .= $this->selectDate($input['value'], $input['name'], 0, 0, 0, '', 1, 0);
|
$more .= $this->selectDate($input['value'], $input['name'], 0, 0, 0, '', 1, 0);
|
||||||
@ -4414,17 +4412,17 @@ class Form
|
|||||||
$formquestion[] = array('name'=>$input['name'].'year');
|
$formquestion[] = array('name'=>$input['name'].'year');
|
||||||
$formquestion[] = array('name'=>$input['name'].'hour');
|
$formquestion[] = array('name'=>$input['name'].'hour');
|
||||||
$formquestion[] = array('name'=>$input['name'].'min');
|
$formquestion[] = array('name'=>$input['name'].'min');
|
||||||
} elseif ($input['type'] == 'other')
|
} elseif ($input['type'] == 'other') {
|
||||||
{
|
|
||||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">';
|
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">';
|
||||||
if (!empty($input['label'])) $more .= $input['label'].'</div><div class="tagtd">';
|
if (!empty($input['label'])) $more .= $input['label'].'</div><div class="tagtd">';
|
||||||
$more .= $input['value'];
|
$more .= $input['value'];
|
||||||
$more .= '</div></div>'."\n";
|
$more .= '</div></div>'."\n";
|
||||||
} elseif ($input['type'] == 'onecolumn')
|
} elseif ($input['type'] == 'onecolumn') {
|
||||||
{
|
|
||||||
$moreonecolumn .= '<div class="margintoponly">';
|
$moreonecolumn .= '<div class="margintoponly">';
|
||||||
$moreonecolumn .= $input['value'];
|
$moreonecolumn .= $input['value'];
|
||||||
$moreonecolumn .= '</div>'."\n";
|
$moreonecolumn .= '</div>'."\n";
|
||||||
|
} elseif ($input['type'] == 'hidden') {
|
||||||
|
// Do nothing more, already added by a previous loop
|
||||||
} else {
|
} else {
|
||||||
$more .= 'Error type '.$input['type'].' for the confirm box is not a supported type';
|
$more .= 'Error type '.$input['type'].' for the confirm box is not a supported type';
|
||||||
}
|
}
|
||||||
@ -6303,7 +6301,7 @@ class Form
|
|||||||
*/
|
*/
|
||||||
public function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0, $disabled = 0)
|
public function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0, $disabled = 0)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user;
|
global $conf, $langs, $user, $hookmanager;
|
||||||
|
|
||||||
//print "$objecttmp->filter, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0, $disabled";
|
//print "$objecttmp->filter, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0, $disabled";
|
||||||
|
|
||||||
@ -6349,6 +6347,12 @@ class Form
|
|||||||
}
|
}
|
||||||
if ($objecttmp->ismultientitymanaged == 'fk_soc@societe')
|
if ($objecttmp->ismultientitymanaged == 'fk_soc@societe')
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
|
|
||||||
|
// Add where from hooks
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('selectForFormsListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
|
if (!empty($hookmanager->resPrint)) $sql .= $hookmanager->resPrint;
|
||||||
|
else {
|
||||||
$sql .= " WHERE 1=1";
|
$sql .= " WHERE 1=1";
|
||||||
if (isset($objecttmp->ismultientitymanaged) && $objecttmp->ismultientitymanaged == 1) $sql .= " AND t.entity IN (".getEntity($objecttmp->table_element).")";
|
if (isset($objecttmp->ismultientitymanaged) && $objecttmp->ismultientitymanaged == 1) $sql .= " AND t.entity IN (".getEntity($objecttmp->table_element).")";
|
||||||
if (isset($objecttmp->ismultientitymanaged) && !is_numeric($objecttmp->ismultientitymanaged)) {
|
if (isset($objecttmp->ismultientitymanaged) && !is_numeric($objecttmp->ismultientitymanaged)) {
|
||||||
@ -6369,6 +6373,7 @@ class Form
|
|||||||
}*/
|
}*/
|
||||||
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
|
$regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
|
||||||
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'Form::forgeCriteriaCallback', $objecttmp->filter).")";
|
$sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'Form::forgeCriteriaCallback', $objecttmp->filter).")";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$sql .= $this->db->order($fieldstoshow, "ASC");
|
$sql .= $this->db->order($fieldstoshow, "ASC");
|
||||||
//$sql.=$this->db->plimit($limit, 0);
|
//$sql.=$this->db->plimit($limit, 0);
|
||||||
|
|||||||
@ -355,7 +355,7 @@ class FormActions
|
|||||||
if (!is_array($selected) && !empty($selected)) $selected = explode(',', $selected);
|
if (!is_array($selected) && !empty($selected)) $selected = explode(',', $selected);
|
||||||
$out .= $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0);
|
$out .= $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0);
|
||||||
} else {
|
} else {
|
||||||
$out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth200'.($morecss ? ' '.$morecss : ''), 1);
|
$out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth300'.($morecss ? ' '.$morecss : ''), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0)
|
if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0)
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class FormAdmin
|
|||||||
if ($showempty && !$multiselect)
|
if ($showempty && !$multiselect)
|
||||||
{
|
{
|
||||||
$out .= '<option value="0"';
|
$out .= '<option value="0"';
|
||||||
if ($selected == '') $out .= ' selected';
|
if ($selected === '') $out .= ' selected';
|
||||||
$out .= '>';
|
$out .= '>';
|
||||||
if ($showempty != '1') $out .= $showempty;
|
if ($showempty != '1') $out .= $showempty;
|
||||||
else $out .= ' ';
|
else $out .= ' ';
|
||||||
@ -86,7 +86,7 @@ class FormAdmin
|
|||||||
if ($showauto)
|
if ($showauto)
|
||||||
{
|
{
|
||||||
$out .= '<option value="auto"';
|
$out .= '<option value="auto"';
|
||||||
if ($selected == 'auto') $out .= ' selected';
|
if ($selected === 'auto') $out .= ' selected';
|
||||||
$out .= '>'.$langs->trans("AutoDetectLang").'</option>';
|
$out .= '>'.$langs->trans("AutoDetectLang").'</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ class FormAdmin
|
|||||||
}
|
}
|
||||||
|
|
||||||
$valuetoshow .= ' '.picto_from_langcode($key, 'class="saturatemedium"');
|
$valuetoshow .= ' '.picto_from_langcode($key, 'class="saturatemedium"');
|
||||||
if ($selected == $keytouse) {
|
if ((string) $selected == (string) $keytouse) {
|
||||||
$out .= '<option value="'.$keytouse.'" selected data-html="'.dol_escape_htmltag($valuetoshow).'">'.$valuetoshow.'</option>';
|
$out .= '<option value="'.$keytouse.'" selected data-html="'.dol_escape_htmltag($valuetoshow).'">'.$valuetoshow.'</option>';
|
||||||
} else {
|
} else {
|
||||||
$out .= '<option value="'.$keytouse.'" data-html="'.dol_escape_htmltag($valuetoshow).'">'.$valuetoshow.'</option>';
|
$out .= '<option value="'.$keytouse.'" data-html="'.dol_escape_htmltag($valuetoshow).'">'.$valuetoshow.'</option>';
|
||||||
|
|||||||
@ -450,7 +450,7 @@ class FormFile
|
|||||||
|
|
||||||
if ($modulepart == 'company')
|
if ($modulepart == 'company')
|
||||||
{
|
{
|
||||||
$showempty = 1;
|
$showempty = 1; // can have no template active
|
||||||
if (is_array($genallowed)) $modellist = $genallowed;
|
if (is_array($genallowed)) $modellist = $genallowed;
|
||||||
else {
|
else {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php';
|
||||||
@ -514,6 +514,7 @@ class FormFile
|
|||||||
}
|
}
|
||||||
} elseif ($modulepart == 'contract')
|
} elseif ($modulepart == 'contract')
|
||||||
{
|
{
|
||||||
|
$showempty = 1; // can have no template active
|
||||||
if (is_array($genallowed)) $modellist = $genallowed;
|
if (is_array($genallowed)) $modellist = $genallowed;
|
||||||
else {
|
else {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
|
||||||
@ -577,6 +578,7 @@ class FormFile
|
|||||||
}
|
}
|
||||||
} elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
|
} elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
|
||||||
{
|
{
|
||||||
|
$showempty = 1; // can have no template active
|
||||||
if (is_array($genallowed)) $modellist = $genallowed;
|
if (is_array($genallowed)) $modellist = $genallowed;
|
||||||
else {
|
else {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_invoice/modules_facturefournisseur.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_invoice/modules_facturefournisseur.php';
|
||||||
|
|||||||
@ -113,7 +113,12 @@ class Translate
|
|||||||
} else $srclang = strtolower($langpart[0])."_".strtoupper($langpart[0]);
|
} else $srclang = strtolower($langpart[0])."_".strtoupper($langpart[0]);
|
||||||
} else { // If it's for a codetouse that is a short code xx
|
} else { // If it's for a codetouse that is a short code xx
|
||||||
// Array to convert short lang code into long code.
|
// Array to convert short lang code into long code.
|
||||||
$longforshort = array('ar'=>'ar_SA', 'el'=>'el_GR', 'ca'=>'ca_ES', 'en'=>'en_US', 'ja'=>'ja_JP', 'nb'=>'nb_NO', 'no'=>'nb_NO');
|
$longforshort = array(
|
||||||
|
'am'=>'am_ET', 'ar'=>'ar_SA', 'bn'=>'bn_DB', 'el'=>'el_GR', 'ca'=>'ca_ES', 'cs'=>'cs_CZ', 'en'=>'en_US', 'fa'=>'fa_IR',
|
||||||
|
'gl'=>'gl_ES', 'he'=>'he_IL', 'hi'=>'hi_IN', 'ja'=>'ja_JP',
|
||||||
|
'ka'=>'ka_GE', 'km'=>'km_KH', 'kn'=>'kn_IN', 'ko'=>'ko_KR', 'lo'=>'lo_LA', 'nb'=>'nb_NO', 'no'=>'nb_NO', 'ne'=>'ne_NP',
|
||||||
|
'sl'=>'sl_SI', 'sq'=>'sq_AL', 'sr'=>'sr_RS', 'sv'=>'sv_SE', 'uk'=>'uk_UA', 'vi'=>'vi_VN', 'zh'=>'zh_CN'
|
||||||
|
);
|
||||||
if (isset($longforshort[strtolower($langpart[0])])) $srclang = $longforshort[strtolower($langpart[0])];
|
if (isset($longforshort[strtolower($langpart[0])])) $srclang = $longforshort[strtolower($langpart[0])];
|
||||||
elseif (!empty($langpart[0])) $srclang = strtolower($langpart[0])."_".strtoupper($langpart[0]);
|
elseif (!empty($langpart[0])) $srclang = strtolower($langpart[0])."_".strtoupper($langpart[0]);
|
||||||
else $srclang = 'en_US';
|
else $srclang = 'en_US';
|
||||||
|
|||||||
@ -62,13 +62,16 @@ class Utils
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
if (empty($choices)) $choices = 'tempfilesold,logfiles';
|
if (empty($choices)) {
|
||||||
|
$choices = 'tempfilesold+logfiles';
|
||||||
|
}
|
||||||
|
|
||||||
dol_syslog("Utils::purgeFiles choice=".$choices, LOG_DEBUG);
|
dol_syslog("Utils::purgeFiles choice=".$choices, LOG_DEBUG);
|
||||||
|
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$countdeleted = 0;
|
$countdeleted = 0;
|
||||||
$counterror = 0;
|
$counterror = 0;
|
||||||
|
$filelog = '';
|
||||||
|
|
||||||
$choicesarray = preg_split('/[\+,]/', $choices);
|
$choicesarray = preg_split('/[\+,]/', $choices);
|
||||||
foreach ($choicesarray as $choice) {
|
foreach ($choicesarray as $choice) {
|
||||||
@ -109,7 +112,6 @@ class Utils
|
|||||||
$filesarray = dol_dir_list($dolibarr_main_data_root, "files", 0, '.*\.log[\.0-9]*(\.gz)?$', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1);
|
$filesarray = dol_dir_list($dolibarr_main_data_root, "files", 0, '.*\.log[\.0-9]*(\.gz)?$', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$filelog = '';
|
|
||||||
if (!empty($conf->syslog->enabled))
|
if (!empty($conf->syslog->enabled))
|
||||||
{
|
{
|
||||||
$filelog = $conf->global->SYSLOG_FILE;
|
$filelog = $conf->global->SYSLOG_FILE;
|
||||||
@ -143,8 +145,7 @@ class Utils
|
|||||||
if ($filesarray[$key]['fullname'] != $filelog || $choice == 'logfile' || $choice == 'logfiles')
|
if ($filesarray[$key]['fullname'] != $filelog || $choice == 'logfile' || $choice == 'logfiles')
|
||||||
{
|
{
|
||||||
$result = dol_delete_file($filesarray[$key]['fullname'], 1, 1);
|
$result = dol_delete_file($filesarray[$key]['fullname'], 1, 1);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$count++;
|
$count++;
|
||||||
$countdeleted++;
|
$countdeleted++;
|
||||||
} else {
|
} else {
|
||||||
@ -166,7 +167,9 @@ class Utils
|
|||||||
|
|
||||||
if ($count > 0) {
|
if ($count > 0) {
|
||||||
$this->output = $langs->trans("PurgeNDirectoriesDeleted", $countdeleted);
|
$this->output = $langs->trans("PurgeNDirectoriesDeleted", $countdeleted);
|
||||||
if ($count > $countdeleted) $this->output .= '<br>'.$langs->trans("PurgeNDirectoriesFailed", ($count - $countdeleted));
|
if ($count > $countdeleted) {
|
||||||
|
$this->output .= '<br>'.$langs->trans("PurgeNDirectoriesFailed", ($count - $countdeleted));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->output = $langs->trans("PurgeNothingToDelete").(in_array('tempfilesold', $choicesarray) ? ' (older than 24h for temp files)' : '');
|
$this->output = $langs->trans("PurgeNothingToDelete").(in_array('tempfilesold', $choicesarray) ? ' (older than 24h for temp files)' : '');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -137,9 +137,10 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
|
|||||||
update: update, textarea: textarea,
|
update: update, textarea: textarea,
|
||||||
pbq: item.pbq,
|
pbq: item.pbq,
|
||||||
type: item.type, qty: item.qty, discount: item.discount,
|
type: item.type, qty: item.qty, discount: item.discount,
|
||||||
pricebasetype: item.pricebasetype, price_ht: item.price_ht,
|
pricebasetype: item.pricebasetype,
|
||||||
|
price_ht: item.price_ht,
|
||||||
price_ttc: item.price_ttc,
|
price_ttc: item.price_ttc,
|
||||||
up: item.up, description : item.description,
|
description : item.description,
|
||||||
ref_customer: item.ref_customer }
|
ref_customer: item.ref_customer }
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -152,33 +153,25 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
|
|||||||
console.log("We will trigger change on input '.$htmlname.' because of the select definition of autocomplete code for input#search_'.$htmlname.'");
|
console.log("We will trigger change on input '.$htmlname.' because of the select definition of autocomplete code for input#search_'.$htmlname.'");
|
||||||
console.log("Selected id = "+ui.item.id+" - If this value is null, it means you select a record with key that is null so selection is not effective");
|
console.log("Selected id = "+ui.item.id+" - If this value is null, it means you select a record with key that is null so selection is not effective");
|
||||||
|
|
||||||
console.log("Propagate before some properties");
|
console.log("Propagate before some properties retrieved by ajax into data-xxx properties");
|
||||||
|
|
||||||
//console.log(ui.item);
|
// For supplier price and customer when price by quantity is off
|
||||||
//For supplier price
|
$("#'.$htmlname.'").attr("data-up", ui.item.price_ht);
|
||||||
$("#'.$htmlname.'").attr("data-up", ui.item.up);
|
$("#'.$htmlname.'").attr("data-base", ui.item.pricebasetype);
|
||||||
$("#'.$htmlname.'").attr("data-discount", ui.item.discount);
|
|
||||||
$("#'.$htmlname.'").attr("data-qty", ui.item.qty);
|
$("#'.$htmlname.'").attr("data-qty", ui.item.qty);
|
||||||
|
$("#'.$htmlname.'").attr("data-discount", ui.item.discount);
|
||||||
$("#'.$htmlname.'").attr("data-description", ui.item.description);
|
$("#'.$htmlname.'").attr("data-description", ui.item.description);
|
||||||
$("#'.$htmlname.'").attr("data-ref-customer", ui.item.ref_customer);
|
$("#'.$htmlname.'").attr("data-ref-customer", ui.item.ref_customer);
|
||||||
|
|
||||||
//For customer price
|
|
||||||
';
|
';
|
||||||
if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) {
|
if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) {
|
||||||
$script .= '
|
$script .= '
|
||||||
|
// For customer price when PRODUIT_CUSTOMER_PRICES_BY_QTY is on
|
||||||
$("#'.$htmlname.'").attr("data-pbq", ui.item.pbq);
|
$("#'.$htmlname.'").attr("data-pbq", ui.item.pbq);
|
||||||
$("#'.$htmlname.'").attr("data-pbqup", ui.item.price_ht);
|
$("#'.$htmlname.'").attr("data-pbqup", ui.item.price_ht);
|
||||||
$("#'.$htmlname.'").attr("data-pbqbase", ui.item.pricebasetype);
|
$("#'.$htmlname.'").attr("data-pbqbase", ui.item.pricebasetype);
|
||||||
$("#'.$htmlname.'").attr("data-pbqqty", ui.item.qty);
|
$("#'.$htmlname.'").attr("data-pbqqty", ui.item.qty);
|
||||||
$("#'.$htmlname.'").attr("data-pbqpercent", ui.item.discount);
|
$("#'.$htmlname.'").attr("data-pbqpercent", ui.item.discount);
|
||||||
';
|
';
|
||||||
} else {
|
|
||||||
$script .= '
|
|
||||||
$("#' . $htmlname . '").attr("data-up", ui.item.price_ht);
|
|
||||||
$("#' . $htmlname . '").attr("data-base", ui.item.pricebasetype);
|
|
||||||
$("#' . $htmlname . '").attr("data-qty", ui.item.qty);
|
|
||||||
$("#' . $htmlname . '").attr("data-discount", ui.item.discount);
|
|
||||||
';
|
|
||||||
}
|
}
|
||||||
$script .= '
|
$script .= '
|
||||||
$("#'.$htmlname.'").val(ui.item.id).trigger("change"); // Select new value
|
$("#'.$htmlname.'").val(ui.item.id).trigger("change"); // Select new value
|
||||||
@ -217,6 +210,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
|
|||||||
console.log("Make action update on each ui.item.update")
|
console.log("Make action update on each ui.item.update")
|
||||||
// loop on each "update" fields
|
// loop on each "update" fields
|
||||||
$.each(ui.item.update, function(key, value) {
|
$.each(ui.item.update, function(key, value) {
|
||||||
|
console.log("Set value "+value+" into #"+key);
|
||||||
$("#" + key).val(value).trigger("change");
|
$("#" + key).val(value).trigger("change");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,7 +70,7 @@ function contract_prepare_head(Contrat $object)
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
||||||
$upload_dir = $conf->contrat->dir_output."/".dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->contrat->multidir_output[$object->entity]."/".dol_sanitizeFileName($object->ref);
|
||||||
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
|
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
|
||||||
$nbLinks = Link::count($db, $object->element, $object->id);
|
$nbLinks = Link::count($db, $object->element, $object->id);
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id;
|
||||||
|
|||||||
@ -1192,6 +1192,16 @@ function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0,
|
|||||||
{
|
{
|
||||||
if ($nophperrors) $ok = @unlink($filename);
|
if ($nophperrors) $ok = @unlink($filename);
|
||||||
else $ok = unlink($filename);
|
else $ok = unlink($filename);
|
||||||
|
|
||||||
|
// If it fails and it is because of the missing write permission on parent dir
|
||||||
|
if (!$ok && file_exists(dirname($filename)) && !(fileperms(dirname($filename)) & 0200)) {
|
||||||
|
dol_syslog("Error in deletion, but parent directory exists with no permission to write, we try to change permission on parent directory and retry...", LOG_DEBUG);
|
||||||
|
@chmod(dirname($filename), fileperms(dirname($filename)) | 0200);
|
||||||
|
// Now we retry deletion
|
||||||
|
if ($nophperrors) $ok = @unlink($filename);
|
||||||
|
else $ok = unlink($filename);
|
||||||
|
}
|
||||||
|
|
||||||
if ($ok)
|
if ($ok)
|
||||||
{
|
{
|
||||||
dol_syslog("Removed file ".$filename, LOG_DEBUG);
|
dol_syslog("Removed file ".$filename, LOG_DEBUG);
|
||||||
@ -2316,10 +2326,10 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||||||
if ($fuser->rights->ficheinter->{$lire}) $accessallowed = 1;
|
if ($fuser->rights->ficheinter->{$lire}) $accessallowed = 1;
|
||||||
$original_file = $conf->ficheinter->dir_output.'/'.$original_file;
|
$original_file = $conf->ficheinter->dir_output.'/'.$original_file;
|
||||||
} // Wrapping pour les apercu conat
|
} // Wrapping pour les apercu conat
|
||||||
elseif (($modulepart == 'apercucontract') && !empty($conf->contrat->dir_output))
|
elseif (($modulepart == 'apercucontract') && !empty($conf->contrat->multidir_output[$entity]))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->contrat->{$lire}) $accessallowed = 1;
|
if ($fuser->rights->contrat->{$lire}) $accessallowed = 1;
|
||||||
$original_file = $conf->contrat->dir_output.'/'.$original_file;
|
$original_file = $conf->contrat->multidir_output[$entity].'/'.$original_file;
|
||||||
} // Wrapping pour les apercu supplier proposal
|
} // Wrapping pour les apercu supplier proposal
|
||||||
elseif (($modulepart == 'apercusupplier_proposal' || $modulepart == 'apercusupplier_proposal') && !empty($conf->supplier_proposal->dir_output))
|
elseif (($modulepart == 'apercusupplier_proposal' || $modulepart == 'apercusupplier_proposal') && !empty($conf->supplier_proposal->dir_output))
|
||||||
{
|
{
|
||||||
@ -2709,13 +2719,13 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||||||
}
|
}
|
||||||
if (!empty($conf->stock->enabled)) $original_file = $conf->stock->multidir_output[$entity].'/movement/'.$original_file;
|
if (!empty($conf->stock->enabled)) $original_file = $conf->stock->multidir_output[$entity].'/movement/'.$original_file;
|
||||||
} // Wrapping pour les contrats
|
} // Wrapping pour les contrats
|
||||||
elseif ($modulepart == 'contract' && !empty($conf->contrat->dir_output))
|
elseif ($modulepart == 'contract' && !empty($conf->contrat->multidir_output[$entity]))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i', $original_file))
|
if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i', $original_file))
|
||||||
{
|
{
|
||||||
$accessallowed = 1;
|
$accessallowed = 1;
|
||||||
}
|
}
|
||||||
$original_file = $conf->contrat->dir_output.'/'.$original_file;
|
$original_file = $conf->contrat->multidir_output[$entity].'/'.$original_file;
|
||||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."contrat WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('contract').")";
|
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."contrat WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('contract').")";
|
||||||
} // Wrapping pour les dons
|
} // Wrapping pour les dons
|
||||||
elseif ($modulepart == 'donation' && !empty($conf->don->dir_output))
|
elseif ($modulepart == 'donation' && !empty($conf->don->dir_output))
|
||||||
|
|||||||
@ -3232,7 +3232,7 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF
|
|||||||
* Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img
|
* Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img
|
||||||
* Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img
|
* Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img
|
||||||
* Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1)
|
* Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1)
|
||||||
* @param string $moreatt Add more attribute on img tag (For example 'style="float: right"')
|
* @param string $moreatt Add more attribute on img tag (For example 'class="pictofixedwidth"')
|
||||||
* @param boolean|int $pictoisfullpath If true or 1, image path is a full path
|
* @param boolean|int $pictoisfullpath If true or 1, image path is a full path
|
||||||
* @param int $srconly Return only content of the src attribute of img.
|
* @param int $srconly Return only content of the src attribute of img.
|
||||||
* @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
|
* @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
|
||||||
@ -3265,7 +3265,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
$pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
|
$pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
|
||||||
if (empty($srconly) && in_array($pictowithouttext, array(
|
if (empty($srconly) && in_array($pictowithouttext, array(
|
||||||
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
||||||
'accountancy', 'account', 'accountline', 'action', 'add', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'billa', 'billr', 'billd', 'bookmark', 'bom', 'building',
|
'accountancy', 'account', 'accountline', 'action', 'add', 'address', 'angle-double-down', 'angle-double-up', 'bank_account', 'barcode', 'bank', 'bill', 'billa', 'billr', 'billd', 'bookmark', 'bom', 'building',
|
||||||
'cash-register', 'category', 'check', 'clock', 'close_title', 'cog', 'company', 'contact', 'contract', 'cron', 'cubes',
|
'cash-register', 'category', 'check', 'clock', 'close_title', 'cog', 'company', 'contact', 'contract', 'cron', 'cubes',
|
||||||
'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'edit', 'ellipsis-h', 'email', 'eraser', 'external-link-alt', 'external-link-square-alt',
|
'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'edit', 'ellipsis-h', 'email', 'eraser', 'external-link-alt', 'external-link-square-alt',
|
||||||
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',
|
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',
|
||||||
@ -3273,11 +3273,12 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'intervention', 'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot',
|
'intervention', 'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot',
|
||||||
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'mrp', 'note', 'next',
|
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'mrp', 'note', 'next',
|
||||||
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom',
|
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom',
|
||||||
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert',
|
||||||
|
'object_folder', 'object_folder-open','object_generic',
|
||||||
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
||||||
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice',
|
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice',
|
||||||
'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label',
|
'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label',
|
||||||
'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment',
|
'object_margin', 'object_members', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment',
|
||||||
'object_lot', 'object_mrp', 'object_other',
|
'object_lot', 'object_mrp', 'object_other',
|
||||||
'object_payment', 'object_pdf', 'object_product', 'object_propal',
|
'object_payment', 'object_pdf', 'object_product', 'object_propal',
|
||||||
'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask',
|
'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask',
|
||||||
@ -3291,7 +3292,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
||||||
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
|
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
|
||||||
'generic', 'home', 'hrm', 'members', 'products', 'invoicing',
|
'generic', 'home', 'hrm', 'members', 'products', 'invoicing',
|
||||||
'payment', 'pencil-ruler', 'preview', 'project', 'projectpub', 'refresh', 'salary', 'supplier_invoice', 'ticket',
|
'payment', 'pencil-ruler', 'preview', 'project', 'projectpub', 'refresh', 'salary', 'shipment', 'supplier_invoice', 'technic', 'ticket',
|
||||||
'error', 'warning',
|
'error', 'warning',
|
||||||
'recruitmentcandidature', 'recruitmentjobposition', 'resource',
|
'recruitmentcandidature', 'recruitmentjobposition', 'resource',
|
||||||
'shapes', 'supplier_proposal', 'supplier_order', 'supplier_invoice', 'user-cog',
|
'shapes', 'supplier_proposal', 'supplier_order', 'supplier_invoice', 'user-cog',
|
||||||
@ -3318,11 +3319,11 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'conversation'=>'comments', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd',
|
'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'conversation'=>'comments', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd',
|
||||||
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins',
|
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins',
|
||||||
'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly',
|
'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly',
|
||||||
'hrm'=>'user-tie', 'margin'=>'calculator', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
|
'hrm'=>'user-tie', 'margin'=>'calculator', 'members'=>'user-friends', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
|
||||||
'email'=>'at',
|
'email'=>'at',
|
||||||
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
|
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
|
||||||
'generic'=>'file', 'holiday'=>'umbrella-beach', 'label'=>'layer-group', 'loan'=>'money-bill-alt',
|
'generic'=>'file', 'holiday'=>'umbrella-beach', 'label'=>'layer-group', 'loan'=>'money-bill-alt',
|
||||||
'member'=>'users', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
|
'member'=>'user-alt', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
|
||||||
'trip'=>'wallet', 'group'=>'users', 'movement'=>'people-carry',
|
'trip'=>'wallet', 'group'=>'users', 'movement'=>'people-carry',
|
||||||
'sign-out'=>'sign-out-alt',
|
'sign-out'=>'sign-out-alt',
|
||||||
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star',
|
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star',
|
||||||
@ -3370,11 +3371,14 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
$fakey = 'fa-'.$pictowithouttext;
|
$fakey = 'fa-'.$pictowithouttext;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($pictowithouttext, array('member', 'contract'))) {
|
if (in_array($pictowithouttext, array('holiday', 'dollyrevert', 'member', 'members', 'contract', 'group', 'resource', 'shipment'))) {
|
||||||
$fasize = '0.92em';
|
$morecss = 'em092';
|
||||||
}
|
}
|
||||||
if (in_array($pictowithouttext, array('intervention', 'payment', 'loan'))) {
|
if (in_array($pictowithouttext, array('holiday'))) {
|
||||||
$fasize = '0.80em';
|
$morecss = 'em088';
|
||||||
|
}
|
||||||
|
if (in_array($pictowithouttext, array('intervention', 'payment', 'loan', 'stock', 'technic'))) {
|
||||||
|
$morecss = 'em080';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define $marginleftonlyshort
|
// Define $marginleftonlyshort
|
||||||
@ -3423,7 +3427,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944', 'movement'=>'#a69944',
|
'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944', 'movement'=>'#a69944',
|
||||||
'other'=>'#ddd',
|
'other'=>'#ddd',
|
||||||
'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'resize'=>'#444', 'rss'=>'#cba',
|
'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'resize'=>'#444', 'rss'=>'#cba',
|
||||||
'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'user-cog'=>'#999', 'globe-americas'=>'#aaa',
|
'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'technic'=>'#999', 'uparrow'=>'#555', 'user-cog'=>'#999', 'globe-americas'=>'#aaa',
|
||||||
'website'=>'#304'
|
'website'=>'#304'
|
||||||
);
|
);
|
||||||
if (isset($arrayconvpictotocolor[$pictowithouttext])) {
|
if (isset($arrayconvpictotocolor[$pictowithouttext])) {
|
||||||
@ -7873,7 +7877,10 @@ function printCommonFooter($zone = 'private')
|
|||||||
// Add property 'required' on input
|
// Add property 'required' on input
|
||||||
print 'jQuery("input[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
|
print 'jQuery("input[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
|
||||||
print 'jQuery("textarea[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
|
print 'jQuery("textarea[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
|
||||||
print 'jQuery("select[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n"; // required on a select works only if key is "", this does not happen in Dolibarr
|
print '// required on a select works only if key is "", so we add the required attributes but also we reset the key -1 or 0 to an empty string'."\n";
|
||||||
|
print 'jQuery("select[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
|
||||||
|
print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'-1\']").prop(\'value\', \'\');'."\n";
|
||||||
|
print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'0\']").prop(\'value\', \'\');'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8202,7 +8209,7 @@ function showDirectDownloadLink($object)
|
|||||||
|
|
||||||
if ($url)
|
if ($url)
|
||||||
{
|
{
|
||||||
$out .= img_picto('', 'globe').' '.$langs->trans("DirectDownloadLink").'<br>';
|
$out .= img_picto($langs->trans("PublicDownloadLinkdesc"), 'globe').' '.$langs->trans("DirectDownloadLink").'<br>';
|
||||||
$out .= '<input type="text" id="directdownloadlink" class="quatrevingtpercent" value="'.$url.'">';
|
$out .= '<input type="text" id="directdownloadlink" class="quatrevingtpercent" value="'.$url.'">';
|
||||||
$out .= ajax_autoselect("directdownloadlink", 0);
|
$out .= ajax_autoselect("directdownloadlink", 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -189,7 +189,7 @@ function invoice_rec_prepare_head($object)
|
|||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/card-rec.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/card-rec.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("CardBill");
|
$head[$h][1] = $langs->trans("RepeatableInvoice");
|
||||||
$head[$h][2] = 'card';
|
$head[$h][2] = 'card';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
|||||||
@ -590,9 +590,9 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
||||||
$sql .= " WHERE dbt.rowid IN (".$objectid.")";
|
$sql .= " WHERE dbt.rowid IN (".$objectid.")";
|
||||||
$sql .= " AND dbt.".$dbt_keyfield." = ".$user->socid;
|
$sql .= " AND dbt.".$dbt_keyfield." = ".$user->socid;
|
||||||
} elseif (!empty($conf->societe->enabled)) {
|
} elseif (!empty($conf->societe->enabled) && !$user->rights->societe->client->voir) {
|
||||||
// If internal user: Check permission for internal users that are restricted on their objects
|
// If internal user: Check permission for internal users that are restricted on their objects
|
||||||
if ($feature != 'ticket' && !$user->rights->societe->client->voir) {
|
if ($feature != 'ticket') {
|
||||||
if (empty($dbt_keyfield)) dol_print_error('', 'Param dbt_keyfield is required but not defined');
|
if (empty($dbt_keyfield)) dol_print_error('', 'Param dbt_keyfield is required but not defined');
|
||||||
$sql = "SELECT COUNT(sc.fk_soc) as nb";
|
$sql = "SELECT COUNT(sc.fk_soc) as nb";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
||||||
@ -601,9 +601,8 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
|
|||||||
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
|
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
|
||||||
$sql .= " AND sc.fk_soc = dbt.".$dbt_keyfield;
|
$sql .= " AND sc.fk_soc = dbt.".$dbt_keyfield;
|
||||||
$sql .= " AND sc.fk_user = ".$user->id;
|
$sql .= " AND sc.fk_user = ".$user->id;
|
||||||
}
|
} else {
|
||||||
// On ticket, the thirdparty is not mandatory, so we need a special test to accept record with no thirdparties.
|
// On ticket, the thirdparty is not mandatory, so we need a special test to accept record with no thirdparties.
|
||||||
if ($feature == 'ticket' && !$user->rights->societe->client->voir) {
|
|
||||||
$sql = "SELECT COUNT(dbt.".$dbt_select.") as nb";
|
$sql = "SELECT COUNT(dbt.".$dbt_select.") as nb";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = dbt.".$dbt_keyfield." AND sc.fk_user = ".$user->id;
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = dbt.".$dbt_keyfield." AND sc.fk_user = ".$user->id;
|
||||||
|
|||||||
@ -696,6 +696,8 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
|
|
||||||
$substitarray = getCommonSubstitutionArray($langs, 0, null, null);
|
$substitarray = getCommonSubstitutionArray($langs, 0, null, null);
|
||||||
|
|
||||||
|
$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We update newmenu with entries found into database
|
* We update newmenu with entries found into database
|
||||||
* --------------------------------------------------
|
* --------------------------------------------------
|
||||||
@ -1534,7 +1536,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
if ($mainmenu == 'products') {
|
if ($mainmenu == 'products') {
|
||||||
// Products
|
// Products
|
||||||
if (!empty($conf->product->enabled)) {
|
if (!empty($conf->product->enabled)) {
|
||||||
$newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product');
|
$newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="pictofixedwidth"'));
|
||||||
$newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer);
|
$newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer);
|
||||||
$newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire);
|
$newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire);
|
||||||
if (!empty($conf->stock->enabled)) {
|
if (!empty($conf->stock->enabled)) {
|
||||||
@ -1562,7 +1564,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
|
|
||||||
// Services
|
// Services
|
||||||
if (!empty($conf->service->enabled)) {
|
if (!empty($conf->service->enabled)) {
|
||||||
$newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service');
|
$newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="pictofixedwidth"'));
|
||||||
$newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer);
|
$newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer);
|
||||||
$newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire);
|
$newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire);
|
||||||
if (!empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->facture->enabled) || !empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled)) {
|
if (!empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->facture->enabled) || !empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled)) {
|
||||||
@ -1579,7 +1581,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
// Warehouse
|
// Warehouse
|
||||||
if (!empty($conf->stock->enabled)) {
|
if (!empty($conf->stock->enabled)) {
|
||||||
$langs->load("stocks");
|
$langs->load("stocks");
|
||||||
$newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
|
$newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"'));
|
||||||
$newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer);
|
$newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer);
|
||||||
$newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire);
|
$newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire);
|
||||||
$newmenu->add("/product/stock/movement_list.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire);
|
$newmenu->add("/product/stock/movement_list.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire);
|
||||||
@ -1601,7 +1603,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
if (!empty($conf->stock->enabled)) {
|
if (!empty($conf->stock->enabled)) {
|
||||||
$langs->load("stocks");
|
$langs->load("stocks");
|
||||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
|
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
|
||||||
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
|
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"'));
|
||||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") {
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") {
|
||||||
$newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->rights->stock->creer);
|
$newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->rights->stock->creer);
|
||||||
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->rights->stock->lire);
|
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->rights->stock->lire);
|
||||||
@ -1619,7 +1621,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
// Shipments
|
// Shipments
|
||||||
if (!empty($conf->expedition->enabled)) {
|
if (!empty($conf->expedition->enabled)) {
|
||||||
$langs->load("sendings");
|
$langs->load("sendings");
|
||||||
$newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings');
|
$newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="pictofixedwidth"'));
|
||||||
$newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer);
|
$newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer);
|
||||||
$newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire);
|
$newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire);
|
||||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "sendings") {
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "sendings") {
|
||||||
@ -1633,7 +1635,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
// Receptions
|
// Receptions
|
||||||
if (!empty($conf->reception->enabled)) {
|
if (!empty($conf->reception->enabled)) {
|
||||||
$langs->load("receptions");
|
$langs->load("receptions");
|
||||||
$newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->rights->reception->lire, '', $mainmenu, 'receptions');
|
$newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->rights->reception->lire, '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="pictofixedwidth"'));
|
||||||
$newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->rights->reception->creer);
|
$newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->rights->reception->creer);
|
||||||
$newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->rights->reception->lire);
|
$newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->rights->reception->lire);
|
||||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") {
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") {
|
||||||
@ -1699,7 +1701,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Project assigned to user
|
// Project assigned to user
|
||||||
$newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->rights->projet->lire, '', $mainmenu, 'projects');
|
$newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->rights->projet->lire, '', $mainmenu, 'projects', 0, '', '', '', img_picto('', 'project', 'class="pictofixedwidth"'));
|
||||||
$newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->rights->projet->creer);
|
$newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->rights->projet->creer);
|
||||||
|
|
||||||
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 0) {
|
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 0) {
|
||||||
@ -1722,7 +1724,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
|
|
||||||
if (empty($conf->global->PROJECT_HIDE_TASKS)) {
|
if (empty($conf->global->PROJECT_HIDE_TASKS)) {
|
||||||
// Project affected to user
|
// Project affected to user
|
||||||
$newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->rights->projet->lire, '', 'project', 'tasks');
|
$newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->rights->projet->lire, '', 'project', 'tasks', 0, '', '', '', img_picto('', 'task', 'class="pictofixedwidth"'));
|
||||||
$newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
$newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
||||||
$newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->rights->projet->lire);
|
$newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||||
$newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire);
|
$newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire);
|
||||||
@ -1740,7 +1742,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
if (!empty($conf->hrm->enabled)) {
|
if (!empty($conf->hrm->enabled)) {
|
||||||
$langs->load("hrm");
|
$langs->load("hrm");
|
||||||
|
|
||||||
$newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee", $langs->trans("Employees"), 0, $user->rights->hrm->employee->read, '', $mainmenu, 'hrm');
|
$newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee", $langs->trans("Employees"), 0, $user->rights->hrm->employee->read, '', $mainmenu, 'hrm', 0, '', '', '', img_picto('', 'user', 'class="pictofixedwidth"'));
|
||||||
$newmenu->add("/user/card.php?mainmenu=hrm&leftmenu=hrm&action=create&employee=1", $langs->trans("NewEmployee"), 1, $user->rights->hrm->employee->write);
|
$newmenu->add("/user/card.php?mainmenu=hrm&leftmenu=hrm&action=create&employee=1", $langs->trans("NewEmployee"), 1, $user->rights->hrm->employee->write);
|
||||||
$newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist", $langs->trans("List"), 1, $user->rights->hrm->employee->read);
|
$newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist", $langs->trans("List"), 1, $user->rights->hrm->employee->read);
|
||||||
}
|
}
|
||||||
@ -1750,7 +1752,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("holiday", "trips"));
|
$langs->loadLangs(array("holiday", "trips"));
|
||||||
|
|
||||||
$newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->read, '', $mainmenu, 'hrm');
|
$newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->read, '', $mainmenu, 'hrm', 0, '', '', '', img_picto('', 'holiday', 'class="pictofixedwidth"'));
|
||||||
$newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->rights->holiday->write);
|
$newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->rights->holiday->write);
|
||||||
$newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("List"), 1, $user->rights->holiday->read);
|
$newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("List"), 1, $user->rights->holiday->read);
|
||||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "hrm") {
|
if ($usemenuhider || empty($leftmenu) || $leftmenu == "hrm") {
|
||||||
@ -1820,14 +1822,14 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
|
|
||||||
if (!empty($conf->export->enabled)) {
|
if (!empty($conf->export->enabled)) {
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
$newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->rights->export->lire, '', $mainmenu, 'export');
|
$newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->rights->export->lire, '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
|
||||||
$newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->rights->export->creer);
|
$newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->rights->export->creer);
|
||||||
//$newmenu->add("/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->rights->export->lire);
|
//$newmenu->add("/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->rights->export->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->import->enabled)) {
|
if (!empty($conf->import->enabled)) {
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
$newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->rights->import->run, '', $mainmenu, 'import');
|
$newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->rights->import->run, '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
|
||||||
$newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->rights->import->run);
|
$newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->rights->import->run);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1861,7 +1863,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
$newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||||
}
|
}
|
||||||
|
|
||||||
$newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Subscriptions"), 0, $user->rights->adherent->cotisation->lire);
|
$newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Subscriptions"), 0, $user->rights->adherent->cotisation->lire, '', $mainmenu, 'members', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
|
||||||
$newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members", $langs->trans("NewSubscription"), 1, $user->rights->adherent->cotisation->creer);
|
$newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members", $langs->trans("NewSubscription"), 1, $user->rights->adherent->cotisation->creer);
|
||||||
$newmenu->add("/adherents/subscription/list.php?leftmenu=members", $langs->trans("List"), 1, $user->rights->adherent->cotisation->lire);
|
$newmenu->add("/adherents/subscription/list.php?leftmenu=members", $langs->trans("List"), 1, $user->rights->adherent->cotisation->lire);
|
||||||
$newmenu->add("/adherents/stats/index.php?leftmenu=members", $langs->trans("MenuMembersStats"), 1, $user->rights->adherent->lire);
|
$newmenu->add("/adherents/stats/index.php?leftmenu=members", $langs->trans("MenuMembersStats"), 1, $user->rights->adherent->lire);
|
||||||
@ -1870,7 +1872,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
//if (! empty($conf->export->enabled) && ($usemenuhider || empty($leftmenu) || $leftmenu=="export")) $newmenu->add("/exports/index.php?leftmenu=export",$langs->trans("Datas"),1,$user->rights->adherent->export);
|
//if (! empty($conf->export->enabled) && ($usemenuhider || empty($leftmenu) || $leftmenu=="export")) $newmenu->add("/exports/index.php?leftmenu=export",$langs->trans("Datas"),1,$user->rights->adherent->export);
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
$newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("MembersTypes"), 0, $user->rights->adherent->configurer, '', $mainmenu, 'setup');
|
$newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("MembersTypes"), 0, $user->rights->adherent->configurer, '', $mainmenu, 'setup', 0, '', '', '', img_picto('', 'members', 'class="paddingright pictofixedwidth"'));
|
||||||
$newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members&action=create", $langs->trans("New"), 1, $user->rights->adherent->configurer);
|
$newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members&action=create", $langs->trans("New"), 1, $user->rights->adherent->configurer);
|
||||||
$newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("List"), 1, $user->rights->adherent->configurer);
|
$newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("List"), 1, $user->rights->adherent->configurer);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -357,8 +357,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
*
|
*
|
||||||
* @param array $array_sql SQL requests to be executed when enabling module
|
* @param array $array_sql SQL requests to be executed when enabling module
|
||||||
* @param string $options String with options when disabling module:
|
* @param string $options String with options when disabling module:
|
||||||
* - 'noboxes' = Do not insert boxes
|
* - 'noboxes' = Do all actions but do not insert boxes
|
||||||
* - 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation
|
* - 'newboxdefonly' = Do all actions but for boxes, insert def of boxes only and not boxes activation
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
protected function _init($array_sql, $options = '')
|
protected function _init($array_sql, $options = '')
|
||||||
@ -389,7 +389,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
$err += $this->insert_const(); // Test on newboxdefonly to avoid to erase value during upgrade
|
$err += $this->insert_const(); // Test on newboxdefonly to avoid to erase value during upgrade
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert boxes def into llx_boxes_def and boxes setup (into llx_boxes)
|
// Insert boxes def (into llx_boxes_def) and boxes setup (into llx_boxes)
|
||||||
if (!$err && !preg_match('/noboxes/', $options)) {
|
if (!$err && !preg_match('/noboxes/', $options)) {
|
||||||
$err += $this->insert_boxes($options);
|
$err += $this->insert_boxes($options);
|
||||||
}
|
}
|
||||||
@ -1815,7 +1815,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
if (!is_array($this->menu) || empty($this->menu)) { return 0;
|
if (!is_array($this->menu) || empty($this->menu)) {
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
||||||
@ -2172,9 +2173,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
* The init function adds tabs, constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
* The init function adds tabs, constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||||
* It also creates data directories
|
* It also creates data directories
|
||||||
*
|
*
|
||||||
* @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes')
|
* @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes', 'menuonly')
|
||||||
* 'noboxes' = Do not insert boxes 'newboxdefonly' = For boxes,
|
* 'noboxes' = Do not insert boxes 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation
|
||||||
* insert def of boxes only and not boxes activation
|
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
public function init($options = '')
|
public function init($options = '')
|
||||||
|
|||||||
@ -712,7 +712,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetXY($posxval, $posy);
|
$pdf->SetXY($posxval, $posy);
|
||||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||||
|
|
||||||
|
|||||||
@ -930,7 +930,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetXY($posxval, $posy);
|
$pdf->SetXY($posxval, $posy);
|
||||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||||
|
|
||||||
|
|||||||
@ -219,7 +219,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||||||
// Load traductions files required by page
|
// Load traductions files required by page
|
||||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
||||||
|
|
||||||
if ($conf->contrat->dir_output)
|
if ($conf->contrat->multidir_output[$object->entity])
|
||||||
{
|
{
|
||||||
// If $object is id instead of object
|
// If $object is id instead of object
|
||||||
if (!is_object($object))
|
if (!is_object($object))
|
||||||
@ -236,7 +236,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||||||
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$dir = $conf->contrat->dir_output;
|
$dir = $conf->contrat->multidir_output[$object->entity];
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref;
|
if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref;
|
||||||
$file = $dir."/".$objectref.".odt";
|
$file = $dir."/".$objectref.".odt";
|
||||||
|
|||||||
@ -201,7 +201,7 @@ class pdf_strato extends ModelePDFContract
|
|||||||
$file = $dir."/SPECIMEN.pdf";
|
$file = $dir."/SPECIMEN.pdf";
|
||||||
} else {
|
} else {
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
$dir = $conf->contrat->dir_output."/".$objectref;
|
$dir = $conf->contrat->multidir_output[$object->entity]."/".$objectref;
|
||||||
$file = $dir."/".$objectref.".pdf";
|
$file = $dir."/".$objectref.".pdf";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1004,7 +1004,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetXY($posxval, $posy);
|
$pdf->SetXY($posxval, $posy);
|
||||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||||
|
|
||||||
|
|||||||
@ -1108,7 +1108,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetXY($posxval, $posy);
|
$pdf->SetXY($posxval, $posy);
|
||||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ class modECM extends DolibarrModules
|
|||||||
// Key used in llx_const table to save module status enabled/disabled (XXX is id value)
|
// Key used in llx_const table to save module status enabled/disabled (XXX is id value)
|
||||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||||
// Name of png file (without png) used for this module
|
// Name of png file (without png) used for this module
|
||||||
$this->picto = 'folder';
|
$this->picto = 'folder-open';
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
$this->dirs = array("/ecm/temp");
|
$this->dirs = array("/ecm/temp");
|
||||||
|
|||||||
@ -188,7 +188,7 @@ class modResource extends DolibarrModules
|
|||||||
'fk_menu'=>'fk_mainmenu=tools',
|
'fk_menu'=>'fk_mainmenu=tools',
|
||||||
'type'=>'left',
|
'type'=>'left',
|
||||||
'titre'=> 'MenuResourceIndex',
|
'titre'=> 'MenuResourceIndex',
|
||||||
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
|
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em92"'),
|
||||||
'mainmenu'=>'tools',
|
'mainmenu'=>'tools',
|
||||||
'leftmenu'=> 'resource',
|
'leftmenu'=> 'resource',
|
||||||
'url'=> '/resource/list.php',
|
'url'=> '/resource/list.php',
|
||||||
|
|||||||
@ -208,7 +208,7 @@ class modTicket extends DolibarrModules
|
|||||||
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket',
|
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket',
|
||||||
'type' => 'left',
|
'type' => 'left',
|
||||||
'titre' => 'Ticket',
|
'titre' => 'Ticket',
|
||||||
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
|
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'),
|
||||||
'mainmenu' => 'ticket',
|
'mainmenu' => 'ticket',
|
||||||
'leftmenu' => 'ticket',
|
'leftmenu' => 'ticket',
|
||||||
'url' => '/ticket/index.php',
|
'url' => '/ticket/index.php',
|
||||||
|
|||||||
@ -51,7 +51,7 @@ class modWorkflow extends DolibarrModules
|
|||||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||||
$this->name = preg_replace('/^mod/i', '', get_class($this));
|
$this->name = preg_replace('/^mod/i', '', get_class($this));
|
||||||
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
|
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
|
||||||
$this->description = "Workflow management";
|
$this->description = "Inter-modules workflow management";
|
||||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||||
$this->version = 'dolibarr';
|
$this->version = 'dolibarr';
|
||||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||||
|
|||||||
@ -908,7 +908,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetXY($posxval, $posy);
|
$pdf->SetXY($posxval, $posy);
|
||||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||||
|
|
||||||
|
|||||||
@ -1048,7 +1048,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetXY($posxval, $posy);
|
$pdf->SetXY($posxval, $posy);
|
||||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||||
|
|
||||||
|
|||||||
@ -865,7 +865,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetXY($posxval, $posy);
|
$pdf->SetXY($posxval, $posy);
|
||||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement);
|
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||||
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
|
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
|
||||||
|
|
||||||
|
|||||||
@ -747,7 +747,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetXY($posxval, $posy);
|
$pdf->SetXY($posxval, $posy);
|
||||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_id);
|
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||||
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
|
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
|
||||||
|
|
||||||
|
|||||||
@ -807,7 +807,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetXY($posxval, $posy);
|
$pdf->SetXY($posxval, $posy);
|
||||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||||
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
|
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
|
||||||
|
|
||||||
|
|||||||
@ -451,8 +451,10 @@ if ($action == 'confirm_crop')
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$title= $langs->trans("ImageEditor");
|
$title= $langs->trans("ImageEditor");
|
||||||
|
$morejs = array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js');
|
||||||
|
$morecss = array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css');
|
||||||
|
|
||||||
llxHeader($head, $title, '', '', 0, 0, array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js'), array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css'));
|
llxHeader($head, $title, '', '', 0, 0, $morejs, $morecss);
|
||||||
|
|
||||||
|
|
||||||
print load_fiche_titre($title);
|
print load_fiche_titre($title);
|
||||||
|
|||||||
@ -169,6 +169,7 @@ $totalizable = $extrafields->attributes[$elementtype]['totalizable'][$attrname];
|
|||||||
$help = $extrafields->attributes[$elementtype]['help'][$attrname];
|
$help = $extrafields->attributes[$elementtype]['help'][$attrname];
|
||||||
$entitycurrentorall = $extrafields->attributes[$elementtype]['entityid'][$attrname];
|
$entitycurrentorall = $extrafields->attributes[$elementtype]['entityid'][$attrname];
|
||||||
$printable = $extrafields->attributes[$elementtype]['printable'][$attrname];
|
$printable = $extrafields->attributes[$elementtype]['printable'][$attrname];
|
||||||
|
$enabled = $extrafields->attributes[$elementtype]['enabled'][$attrname];
|
||||||
|
|
||||||
if ((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param))
|
if ((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param))
|
||||||
{
|
{
|
||||||
@ -302,6 +303,14 @@ if (in_array($type, array_keys($typewecanchangeinto)))
|
|||||||
<!-- Multicompany entity -->
|
<!-- Multicompany entity -->
|
||||||
<tr><td><?php echo $langs->trans("AllEntities"); ?></td><td class="valeur"><input id="entitycurrentorall" type="checkbox" name="entitycurrentorall"<?php echo (empty($entitycurrentorall) ? ' checked' : ''); ?>></td></tr>
|
<tr><td><?php echo $langs->trans("AllEntities"); ?></td><td class="valeur"><input id="entitycurrentorall" type="checkbox" name="entitycurrentorall"<?php echo (empty($entitycurrentorall) ? ' checked' : ''); ?>></td></tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<!-- Show Enabled property when value is not a common value -->
|
||||||
|
<?php if ($enabled != '1') { ?>
|
||||||
|
<tr class="help"><td><?php echo $langs->trans("EnabledCondition"); ?></td><td class="valeur">
|
||||||
|
<?php echo dol_escape_htmltag($enabled); ?>
|
||||||
|
<?php } ?>
|
||||||
|
</td></tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php print dol_get_fiche_end(); ?>
|
<?php print dol_get_fiche_end(); ?>
|
||||||
|
|||||||
@ -76,6 +76,11 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel
|
|||||||
{
|
{
|
||||||
foreach ($extrafields->attributes[$elementtype]['type'] as $key => $value)
|
foreach ($extrafields->attributes[$elementtype]['type'] as $key => $value)
|
||||||
{
|
{
|
||||||
|
/*if (! dol_eval($extrafields->attributes[$elementtype]['enabled'][$key], 1)) {
|
||||||
|
// TODO Uncomment this to exclude extrafields of modules not enabled. Add a link to "Show extrafields disabled"
|
||||||
|
// continue;
|
||||||
|
}*/
|
||||||
|
|
||||||
// Load language if required
|
// Load language if required
|
||||||
if (!empty($extrafields->attributes[$elementtype]['langfile'][$key])) {
|
if (!empty($extrafields->attributes[$elementtype]['langfile'][$key])) {
|
||||||
$langs->load($extrafields->attributes[$elementtype]['langfile'][$key]);
|
$langs->load($extrafields->attributes[$elementtype]['langfile'][$key]);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// This tpl file is included into the init part of pages, so before action.
|
||||||
print '<!-- extrafields_list_array_fields.tpl.php -->'."\n";
|
// So no output must be done.
|
||||||
|
|
||||||
// Protection to avoid direct call of template
|
// Protection to avoid direct call of template
|
||||||
if (empty($conf) || !is_object($conf))
|
if (empty($conf) || !is_object($conf))
|
||||||
|
|||||||
@ -32,6 +32,7 @@
|
|||||||
* $senderissupplier (0 by default, 1 or 2 for supplier invoices/orders)
|
* $senderissupplier (0 by default, 1 or 2 for supplier invoices/orders)
|
||||||
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Protection to avoid direct call of template
|
// Protection to avoid direct call of template
|
||||||
if (empty($object) || !is_object($object)) {
|
if (empty($object) || !is_object($object)) {
|
||||||
print "Error: this template page cannot be called directly as an URL";
|
print "Error: this template page cannot be called directly as an URL";
|
||||||
@ -174,7 +175,7 @@ if ($nolinesbefore) {
|
|||||||
echo ((GETPOST('prod_entry_mode', 'alpha') == 'free' || !empty($conf->global->MAIN_FREE_PRODUCT_CHECKED_BY_DEFAULT)) ? ' checked' : '');
|
echo ((GETPOST('prod_entry_mode', 'alpha') == 'free' || !empty($conf->global->MAIN_FREE_PRODUCT_CHECKED_BY_DEFAULT)) ? ' checked' : '');
|
||||||
echo '> ';
|
echo '> ';
|
||||||
// Show type selector
|
// Show type selector
|
||||||
echo $langs->trans("FreeLineOfType");
|
echo '<span class="textradioforitem">'.$langs->trans("FreeLineOfType").'</span>';
|
||||||
echo '</label>';
|
echo '</label>';
|
||||||
echo ' ';
|
echo ' ';
|
||||||
} else {
|
} else {
|
||||||
@ -193,20 +194,25 @@ if ($nolinesbefore) {
|
|||||||
// Predefined product/service
|
// Predefined product/service
|
||||||
if (!empty($conf->product->enabled) || !empty($conf->service->enabled))
|
if (!empty($conf->product->enabled) || !empty($conf->service->enabled))
|
||||||
{
|
{
|
||||||
if ($forceall >= 0 && $freelines) echo '<br>';
|
if ($forceall >= 0 && $freelines) echo '<br><span class="prod_entry_mode_predef paddingtop">';
|
||||||
echo '<span class="prod_entry_mode_predef">';
|
else echo '<span class="prod_entry_mode_predef">';
|
||||||
echo '<label for="prod_entry_mode_predef">';
|
echo '<label for="prod_entry_mode_predef">';
|
||||||
echo '<input type="radio" class="prod_entry_mode_predef" name="prod_entry_mode" id="prod_entry_mode_predef" value="predef"'.(GETPOST('prod_entry_mode') == 'predef' ? ' checked' : '').'> ';
|
echo '<input type="radio" class="prod_entry_mode_predef" name="prod_entry_mode" id="prod_entry_mode_predef" value="predef"'.(GETPOST('prod_entry_mode') == 'predef' ? ' checked' : '').'> ';
|
||||||
if (empty($senderissupplier))
|
$labelforradio = '';
|
||||||
{
|
if (empty($conf->dol_optimize_smallscreen)) {
|
||||||
if (!empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToSell');
|
if (empty($senderissupplier)) {
|
||||||
elseif ((empty($conf->product->enabled) && !empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) echo $langs->trans('PredefinedServicesToSell');
|
if (!empty($conf->product->enabled) && empty($conf->service->enabled)) $labelforradio = $langs->trans('PredefinedProductsToSell');
|
||||||
else echo $langs->trans('PredefinedProductsAndServicesToSell');
|
elseif ((empty($conf->product->enabled) && !empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) $labelforradio = $langs->trans('PredefinedServicesToSell');
|
||||||
|
else $labelforradio = $langs->trans('PredefinedProductsAndServicesToSell');
|
||||||
} else {
|
} else {
|
||||||
if (!empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToPurchase');
|
if (!empty($conf->product->enabled) && empty($conf->service->enabled)) $labelforradio = $langs->trans('PredefinedProductsToPurchase');
|
||||||
elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) echo $langs->trans('PredefinedServicesToPurchase');
|
elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) $labelforradio = $langs->trans('PredefinedServicesToPurchase');
|
||||||
else echo $langs->trans('PredefinedProductsAndServicesToPurchase');
|
else $labelforradio = $langs->trans('PredefinedProductsAndServicesToPurchase');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$labelforradio = $langs->trans('PredefinedItem');
|
||||||
|
}
|
||||||
|
print '<span class="textradioforitem">'.$labelforradio.'</span>';
|
||||||
echo '</label>';
|
echo '</label>';
|
||||||
echo ' ';
|
echo ' ';
|
||||||
$filtertype = '';
|
$filtertype = '';
|
||||||
@ -239,7 +245,7 @@ if ($nolinesbefore) {
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// $senderissupplier=2 is the same as 1 but disables test on minimum qty and disable autofill qty with minimum
|
// $senderissupplier=2 is the same as 1 but disables test on minimum qty, disable autofill qty with minimum and autofill unit price
|
||||||
if ($senderissupplier != 2)
|
if ($senderissupplier != 2)
|
||||||
{
|
{
|
||||||
$ajaxoptions = array(
|
$ajaxoptions = array(
|
||||||
@ -250,11 +256,11 @@ if ($nolinesbefore) {
|
|||||||
$alsoproductwithnosupplierprice = 0;
|
$alsoproductwithnosupplierprice = 0;
|
||||||
} else {
|
} else {
|
||||||
$ajaxoptions = array(
|
$ajaxoptions = array(
|
||||||
'update' => array('remise_percent' => 'discount') // html id tags that will be edited with each ajax json response key
|
'update' => array('remise_percent' => 'discount', 'price_ht' => 'price_ht') // html id tags that will be edited with each ajax json response key
|
||||||
);
|
);
|
||||||
$alsoproductwithnosupplierprice = 1;
|
$alsoproductwithnosupplierprice = 1;
|
||||||
}
|
}
|
||||||
$form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1, $alsoproductwithnosupplierprice, 'maxwidth500');
|
$form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1, $alsoproductwithnosupplierprice, 'minwidth300imp maxwidth500');
|
||||||
if (!empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_SUPPLIER_PRODUCTS))
|
if (!empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_SUPPLIER_PRODUCTS))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
@ -331,7 +337,7 @@ if ($nolinesbefore) {
|
|||||||
{
|
{
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecolresupplier"><input id="fourn_ref" name="fourn_ref" class="flat minwidth50 maxwidth150" value="<?php echo (GETPOSTISSET("fourn_ref") ? GETPOST("fourn_ref", 'alpha', 2) : ''); ?>"></td>
|
<td class="nobottom linecolresupplier"><input id="fourn_ref" name="fourn_ref" class="flat minwidth50 maxwidth125" value="<?php echo (GETPOSTISSET("fourn_ref") ? GETPOST("fourn_ref", 'alpha', 2) : ''); ?>"></td>
|
||||||
<?php }
|
<?php }
|
||||||
print '<td class="nobottom linecolvat right">';
|
print '<td class="nobottom linecolvat right">';
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
@ -652,7 +658,7 @@ if (!empty($usemargins) && $user->rights->margins->creer)
|
|||||||
/* When changing predefined product, we reload list of supplier prices required for margin combo */
|
/* When changing predefined product, we reload list of supplier prices required for margin combo */
|
||||||
$("#idprod, #idprodfournprice").change(function()
|
$("#idprod, #idprodfournprice").change(function()
|
||||||
{
|
{
|
||||||
console.log("Call method change() after change on #idprod or #idprodfournprice. this.val = "+$(this).val());
|
console.log("Call method change() after change on #idprod or #idprodfournprice (senderissupplier=<?php echo $senderissupplier; ?>). this.val = "+$(this).val());
|
||||||
|
|
||||||
setforpredef(); // TODO Keep vat combo visible and set it to first entry into list that match result of get_default_tva
|
setforpredef(); // TODO Keep vat combo visible and set it to first entry into list that match result of get_default_tva
|
||||||
|
|
||||||
|
|||||||
@ -53,9 +53,10 @@ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print '<td class="linecolnum c
|
|||||||
// Description
|
// Description
|
||||||
print '<td class="linecoldescription">'.$langs->trans('Description').'</td>';
|
print '<td class="linecoldescription">'.$langs->trans('Description').'</td>';
|
||||||
|
|
||||||
|
// Supplier ref
|
||||||
if ($this->element == 'supplier_proposal' || $this->element == 'order_supplier' || $this->element == 'invoice_supplier')
|
if ($this->element == 'supplier_proposal' || $this->element == 'order_supplier' || $this->element == 'invoice_supplier')
|
||||||
{
|
{
|
||||||
print '<td class="linerefsupplier"><span id="title_fourn_ref">'.$langs->trans("SupplierRef").'</span></td>';
|
print '<td class="linerefsupplier maxwidth125"><span id="title_fourn_ref">'.$langs->trans("SupplierRef").'</span></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
@ -90,6 +91,7 @@ if ($inputalsopricewithtax) print '<td class="right" style="width: 80px">'.$lang
|
|||||||
// Qty
|
// Qty
|
||||||
print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';
|
print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';
|
||||||
|
|
||||||
|
// Unit
|
||||||
if (!empty($conf->global->PRODUCT_USE_UNITS))
|
if (!empty($conf->global->PRODUCT_USE_UNITS))
|
||||||
{
|
{
|
||||||
print '<td class="linecoluseunit left">'.$langs->trans('Unit').'</td>';
|
print '<td class="linecoluseunit left">'.$langs->trans('Unit').'</td>';
|
||||||
@ -104,6 +106,7 @@ if ($this->situation_cycle_ref) {
|
|||||||
print '<td class="linecolcycleref2 right">'.$form->textwithpicto($langs->trans('TotalHT100Short'), $langs->trans('UnitPriceXQtyLessDiscount')).'</td>';
|
print '<td class="linecolcycleref2 right">'.$form->textwithpicto($langs->trans('TotalHT100Short'), $langs->trans('UnitPriceXQtyLessDiscount')).'</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Purchase price
|
||||||
if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid))
|
if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid))
|
||||||
{
|
{
|
||||||
if (!empty($user->rights->margins->creer))
|
if (!empty($user->rights->margins->creer))
|
||||||
|
|||||||
@ -654,7 +654,10 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
|||||||
|
|
||||||
if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ProjectModifiedInDolibarr", $object->ref);
|
if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ProjectModifiedInDolibarr", $object->ref);
|
||||||
$object->actionmsg = $langs->transnoentities("ProjectModifiedInDolibarr", $object->ref);
|
$object->actionmsg = $langs->transnoentities("ProjectModifiedInDolibarr", $object->ref);
|
||||||
$object->actionmsg .= "\n".$langs->transnoentities("Task").': '.$object->ref;
|
//$object->actionmsg .= "\n".$langs->transnoentities("Task").': ???';
|
||||||
|
if (!empty($object->usage_opportunity) && is_object($object->oldcopy) && $object->opp_status != $object->oldcopy->opp_status) {
|
||||||
|
$object->actionmsg .= "\n".$langs->transnoentitiesnoconv("OpportunityStatus").': '.$object->oldcopy->opp_status.' -> '.$object->opp_status;
|
||||||
|
}
|
||||||
|
|
||||||
$object->sendtoid = 0;
|
$object->sendtoid = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class InterfaceContactRoles extends DolibarrTriggers
|
|||||||
$this->description = "Triggers of this module auto link contact to company.";
|
$this->description = "Triggers of this module auto link contact to company.";
|
||||||
// 'development', 'experimental', 'dolibarr' or version
|
// 'development', 'experimental', 'dolibarr' or version
|
||||||
$this->version = self::VERSION_DOLIBARR;
|
$this->version = self::VERSION_DOLIBARR;
|
||||||
$this->picto = 'action';
|
$this->picto = 'company';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -40,7 +40,7 @@ class EcmDirectory extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||||
*/
|
*/
|
||||||
public $picto = 'dir';
|
public $picto = 'folder-open';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var int ID
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class EcmFiles extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||||
*/
|
*/
|
||||||
public $picto = 'generic';
|
public $picto = 'folder-open';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Ref hash of file path
|
* @var string Ref hash of file path
|
||||||
|
|||||||
@ -290,7 +290,7 @@ print '<div class="fichecenter">';
|
|||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border centpercent tableforfield">';
|
print '<table class="border centpercent tableforfield">';
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("ECMCreationDate").'</td><td>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("ECMCreationDate").'</td><td>';
|
||||||
print dol_print_date(dol_filemtime($fullpath), 'dayhour');
|
print dol_print_date(dol_filemtime($fullpath), 'dayhour');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
/*print '<tr><td>'.$langs->trans("ECMDirectoryForFiles").'</td><td>';
|
/*print '<tr><td>'.$langs->trans("ECMDirectoryForFiles").'</td><td>';
|
||||||
@ -321,7 +321,9 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai
|
|||||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||||
|
|
||||||
// Link for internal download
|
// Link for internal download
|
||||||
print '<tr><td>'.$langs->trans("DirectDownloadInternalLink").'</td><td>';
|
print '<tr><td>';
|
||||||
|
print $form->textwithpicto($langs->trans("DirectDownloadInternalLink"), $langs->trans("PrivateDownloadLinkDesc"));
|
||||||
|
print '</td><td>';
|
||||||
$modulepart = 'ecm';
|
$modulepart = 'ecm';
|
||||||
$forcedownload = 1;
|
$forcedownload = 1;
|
||||||
$rellink = '/document.php?modulepart='.$modulepart;
|
$rellink = '/document.php?modulepart='.$modulepart;
|
||||||
@ -347,9 +349,9 @@ print '</td></tr>';
|
|||||||
// Link for direct external download
|
// Link for direct external download
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
if ($action != 'edit') {
|
if ($action != 'edit') {
|
||||||
print $langs->trans("DirectDownloadLink");
|
print $form->textwithpicto($langs->trans("DirectDownloadLink"), $langs->trans("PublicDownloadLinkDesc"));
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans("FileSharedViaALink");
|
print $form->textwithpicto($langs->trans("FileSharedViaALink"), $langs->trans("PublicDownloadLinkDesc"));
|
||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if (!empty($object->share)) {
|
if (!empty($object->share)) {
|
||||||
|
|||||||
@ -327,7 +327,7 @@ $moreheadjs .= '</script>'."\n";
|
|||||||
llxHeader($moreheadcss.$moreheadjs, $langs->trans("ECMArea"), '', '', '', '', $morejs, '', 0, 0);
|
llxHeader($moreheadcss.$moreheadjs, $langs->trans("ECMArea"), '', '', '', '', $morejs, '', 0, 0);
|
||||||
|
|
||||||
$head = ecm_prepare_dasboard_head('');
|
$head = ecm_prepare_dasboard_head('');
|
||||||
print dol_get_fiche_head($head, 'index', $langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager"), -1, '');
|
print dol_get_fiche_head($head, 'index', '', -1, '');
|
||||||
|
|
||||||
|
|
||||||
// Add filemanager component
|
// Add filemanager component
|
||||||
|
|||||||
@ -341,7 +341,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$head = ecm_prepare_dasboard_head('');
|
$head = ecm_prepare_dasboard_head('');
|
||||||
print dol_get_fiche_head($head, 'index_auto', $langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager"), -1, '');
|
print dol_get_fiche_head($head, 'index_auto', '', -1, '');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -225,10 +225,12 @@ if (empty($reshook))
|
|||||||
if (!($object->fk_user_author > 0)) $object->fk_user_author = $user->id;
|
if (!($object->fk_user_author > 0)) $object->fk_user_author = $user->id;
|
||||||
|
|
||||||
// Check that expense report is for a user inside the hierarchy or advanced permission for all is set
|
// Check that expense report is for a user inside the hierarchy or advanced permission for all is set
|
||||||
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->writeall_advance))) {
|
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer))
|
||||||
|
|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer) && empty($user->rights->expensereport->writeall_advance))) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors');
|
setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors');
|
||||||
} else {
|
}
|
||||||
|
if (!$error) {
|
||||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) {
|
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) {
|
||||||
if (!in_array($object->fk_user_author, $childids)) {
|
if (!in_array($object->fk_user_author, $childids)) {
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user