commit
1177f017f7
@ -274,23 +274,23 @@ if ($action == 'create')
|
||||
|
||||
// Label
|
||||
print '<tr><td class="tdtop">';
|
||||
print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
|
||||
print $form->editfieldkey("Label", 'label', $object->label, $object, 1, 'alpha:32');
|
||||
print '</td><td colspan="2">';
|
||||
print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
|
||||
print $form->editfieldval("Label", 'label', $object->label, $object, 1, 'alpha:32');
|
||||
print "</td></tr>";
|
||||
|
||||
// Date start
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey("DateStart", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print $form->editfieldkey("DateStart", 'date_start', $object->date_start, $object, 1, 'datepicker');
|
||||
print '</td><td colspan="2">';
|
||||
print $form->editfieldval("DateStart", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print $form->editfieldval("DateStart", 'date_start', $object->date_start, $object, 1, 'datepicker');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey("DateEnd", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print $form->editfieldkey("DateEnd", 'date_end', $object->date_end, $object, 1, 'datepicker');
|
||||
print '</td><td colspan="2">';
|
||||
print $form->editfieldval("DateEnd", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker');
|
||||
print $form->editfieldval("DateEnd", 'date_end', $object->date_end, $object, 1, 'datepicker');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
|
||||
@ -273,7 +273,7 @@ class Adherent extends CommonObject
|
||||
'zip' => array('type' => 'varchar(10)', 'label' => 'Zip', 'enabled' => 1, 'visible' => -1, 'position' => 80),
|
||||
'town' => array('type' => 'varchar(50)', 'label' => 'Town', 'enabled' => 1, 'visible' => -1, 'position' => 85),
|
||||
'state_id' => array('type' => 'integer', 'label' => 'State id', 'enabled' => 1, 'visible' => -1, 'position' => 90),
|
||||
'country' => array('type' => 'integer', 'label' => 'Country', 'enabled' => 1, 'visible' => -1, 'position' => 95),
|
||||
'country' => array('type' => 'integer:Ccountry:core/class/ccountry.class.php', 'label' => 'Country', 'enabled' => 1, 'visible' => -1, 'position' => 95),
|
||||
'email' => array('type' => 'varchar(255)', 'label' => 'Email', 'enabled' => 1, 'visible' => -1, 'position' => 100),
|
||||
'socialnetworks' => array('type' => 'text', 'label' => 'Socialnetworks', 'enabled' => 1, 'visible' => -1, 'position' => 105),
|
||||
'phone' => array('type' => 'varchar(30)', 'label' => 'Phone', 'enabled' => 1, 'visible' => -1, 'position' => 115),
|
||||
|
||||
@ -425,10 +425,9 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
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);
|
||||
print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "Information";
|
||||
$modelmail = "member";
|
||||
@ -950,8 +949,6 @@ print "</table>\n";
|
||||
print "</div>";
|
||||
print '</form>';
|
||||
|
||||
if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit, 1);
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -58,7 +58,7 @@ llxHeader('', $langs->trans("MembersStatisticsByProperties"), '', '', 0, 0, arra
|
||||
|
||||
$title = $langs->trans("MembersStatisticsByProperties");
|
||||
|
||||
print load_fiche_titre($title, '');
|
||||
print load_fiche_titre($title, '', 'object_group');
|
||||
|
||||
dol_mkdir($dir);
|
||||
|
||||
@ -113,7 +113,8 @@ if (!count($data))
|
||||
}
|
||||
else
|
||||
{
|
||||
print load_fiche_titre($langs->trans("MembersByNature"), '', '');
|
||||
print $langs->trans("MembersByNature").'<br>';
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
// Print array
|
||||
|
||||
@ -64,7 +64,7 @@ if ($mode == 'memberbyregion') $title = $langs->trans("MembersStatisticsByRegion
|
||||
|
||||
llxHeader('', $title, '', '', 0, 0, $arrayjs);
|
||||
|
||||
print load_fiche_titre($title, $mesg);
|
||||
print load_fiche_titre($title, '', 'object_group');
|
||||
|
||||
dol_mkdir($dir);
|
||||
|
||||
|
||||
@ -215,11 +215,11 @@ print "</tr>\n";
|
||||
// Line to add new record
|
||||
print "\n";
|
||||
|
||||
print '<tr class="oddeven"><td><input type="text" class="flat" size="24" name="constname" value="'.$constname.'"></td>'."\n";
|
||||
print '<tr class="oddeven nohover"><td><input type="text" class="flat minwidth100" name="constname" value="'.$constname.'"></td>'."\n";
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat" size="30" name="constvalue" value="'.$constvalue.'">';
|
||||
print '<input type="text" class="flat minwidth100" name="constvalue" value="'.$constvalue.'">';
|
||||
print '</td><td>';
|
||||
print '<input type="text" class="flat" size="40" name="constnote" value="'.$constnote.'">';
|
||||
print '<input type="text" class="flat minwidth100" name="constnote" value="'.$constnote.'">';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
|
||||
@ -37,7 +37,7 @@ $langs->loadLangs(array("users", "admin", "other"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -30,6 +31,7 @@
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/rssparser.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("admin");
|
||||
@ -222,10 +224,13 @@ print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="norss" value="'.($lastexternalrss + 1).'">';
|
||||
print '</div><br><br>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '<br><br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans('RssNote').'</span> - <a href="'.DOL_MAIN_URL_ROOT.'/admin/boxes.php">'.$langs->trans('JumpToBoxes').'</a>';
|
||||
print '<br><br>';
|
||||
|
||||
$sql = "SELECT rowid, file, note FROM ".MAIN_DB_PREFIX."boxes_def";
|
||||
$sql .= " WHERE file = 'box_external_rss.php'";
|
||||
@ -235,8 +240,9 @@ dol_syslog("select rss boxes", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$boxlist = InfoBox::listBoxes($db, 'activated', -1, null);
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
@ -252,32 +258,32 @@ if ($resql)
|
||||
$result = $rssparser->parser($conf->global->$keyrssurl, 5, 300, $conf->externalrss->dir_temp);
|
||||
|
||||
print "<br>";
|
||||
print "<form name=\"externalrssconfig\" action=\"".$_SERVER["PHP_SELF"]."\" method=\"post\">";
|
||||
print '<form name="externalrssconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">'."\n";
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<table class="noborder centpercent">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
|
||||
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<tr class="liste_titre">';
|
||||
print "<td>".$langs->trans("RSS")." ".($i + 1)."</td>";
|
||||
print '<td class="right">';
|
||||
print "<input type=\"submit\" class=\"button\" name=\"modify\" value=\"".$langs->trans("Modify")."\">";
|
||||
print '<input type="submit" class="button buttongen" name="modify" value="'.$langs->trans("Modify").'">';
|
||||
print " ";
|
||||
print "<input type=\"submit\" class=\"button\" name=\"delete\" value=\"".$langs->trans("Delete")."\">";
|
||||
print "<input type=\"hidden\" name=\"norss\" value=\"".$idrss."\">";
|
||||
print '<input type="submit" class="button buttongen" name="delete" value="'.$langs->trans("Delete").'">';
|
||||
print '<input type="hidden" name="norss" value="'.$idrss.'">';
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
print "</tr>"."\n";
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td width=\"100px\">".$langs->trans("Title")."</td>";
|
||||
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_title_".$idrss."\" value=\"".dol_escape_htmltag($conf->global->$keyrsstitle)."\"></td>";
|
||||
print "</tr>";
|
||||
print "</tr>"."\n";
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("URL")."</td>";
|
||||
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_urlrss_".$idrss."\" value=\"".dol_escape_htmltag($conf->global->$keyrssurl)."\"></td>";
|
||||
print "</tr>";
|
||||
print "</tr>"."\n";
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
@ -295,7 +301,7 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
print "</tr>"."\n";
|
||||
|
||||
// Logo
|
||||
if ($result > 0 && empty($rss->error))
|
||||
@ -309,12 +315,19 @@ if ($resql)
|
||||
if ($imageurl) print '<img height="32" src="'.$imageurl.'">';
|
||||
else print $langs->trans("None");
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
print "</tr>"."\n";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
// Active
|
||||
$active = _isInBoxList($idrss, $boxlist) ? 'yes' : 'no';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans('WidgetEnabled').'</td>';
|
||||
print '<td>'.yn($active).'</td>';
|
||||
print "</tr>"."\n";
|
||||
|
||||
print "</form>";
|
||||
print '</table>'."\n";
|
||||
|
||||
print "</form>"."\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
@ -327,3 +340,23 @@ else
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
/**
|
||||
* Check if the given RSS feed if inside the list of boxes/widgets
|
||||
*
|
||||
* @param int $idrss The id of the RSS feed
|
||||
* @param array $boxlist A list with boxes/widgets
|
||||
* @return bool true if the rss feed is inside the box/widget list, otherwise false
|
||||
*/
|
||||
function _isInBoxList($idrss, array $boxlist)
|
||||
{
|
||||
foreach($boxlist as $box)
|
||||
{
|
||||
if($box->boxcode === "lastrssinfos" && strpos($box->note, $idrss) !== false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('errors', 'admin'));
|
||||
$langs->loadLangs(array('errors', 'admin', 'modulebuilder'));
|
||||
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
@ -318,10 +318,13 @@ if ($mode == 'desc')
|
||||
|
||||
$text .= '<span class="opacitymedium">'.$langs->trans("Version").':</span> '.$version;
|
||||
|
||||
$moduledescriptorfile = get_class($objMod).'.class.php';
|
||||
$text .= '<br><span class="opacitymedium">'.$langs->trans("DescriptorFile").':</span> '.$moduledescriptorfile;
|
||||
|
||||
$textexternal = '';
|
||||
if ($objMod->isCoreOrExternalModule() == 'external')
|
||||
{
|
||||
$textexternal .= '<br><span class="opacitymedium">'.$langs->trans("Origin").':</span> '.$langs->trans("ExternalModule", $dirofmodule);
|
||||
$textexternal .= '<br><span class="opacitymedium">'.$langs->trans("Origin").':</span> '.$langs->trans("ExternalModule").' - '.$langs->trans("InstalledInto", $dirofmodule);
|
||||
if ($objMod->editor_name != 'dolibarr') $textexternal .= '<br><span class="opacitymedium">'.$langs->trans("Publisher").':</span> '.(empty($objMod->editor_name) ? $langs->trans("Unknown") : $objMod->editor_name);
|
||||
$editor_url = $objMod->editor_url;
|
||||
if (!preg_match('/^http/', $editor_url)) $editor_url = 'http://'.$editor_url;
|
||||
|
||||
@ -482,8 +482,8 @@ if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouM
|
||||
print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup');
|
||||
|
||||
// Start to show page
|
||||
if ($mode == 'common') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDesc")."<br></span>\n";
|
||||
if ($mode == 'commonkanban') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDesc")."<br></span>\n";
|
||||
if ($mode == 'common') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDesc", img_picto('', 'switch_off'))."<br></span>\n";
|
||||
if ($mode == 'commonkanban') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDesc", img_picto('', 'switch_off'))."<br></span>\n";
|
||||
if ($mode == 'marketplace') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesMarketPlaceDesc")."<br></span>\n";
|
||||
if ($mode == 'deploy') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."<br></span>\n";
|
||||
if ($mode == 'develop') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDevelopDesc")."<br></span>\n";
|
||||
@ -541,8 +541,8 @@ if ($mode == 'common' || $mode == 'commonkanban')
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
$moreforfilter .= '<div class="floatright right">';
|
||||
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'));
|
||||
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition'));
|
||||
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'));
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
$moreforfilter .= '<div class="floatright right margintoponly marginrightonly" style="padding-top: 3px">'.$moreinfo.'</div>';
|
||||
@ -868,7 +868,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
|
||||
// Help
|
||||
print '<td class="center nowrap" style="width: 82px;">';
|
||||
//print $form->textwithpicto('', $text, 1, $imginfo, 'minheight20', 0, 2, 1);
|
||||
print '<a href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.$objMod->numero.'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto($langs->trans("ClickToShowDescription"), $imginfo).'</a>';
|
||||
print '<a href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.$objMod->numero.'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto(($objMod->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'</a>';
|
||||
print '</td>';
|
||||
|
||||
// Version
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Bahfir Abbes <contact@dolibarrpar.org>
|
||||
* Copyright (C) 2020 Thibault FOUCART <suport@ptibogxiv.net>
|
||||
*
|
||||
* 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
|
||||
@ -43,6 +44,32 @@ $action = GETPOST('action', 'aZ09');
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Action to update or add a constant
|
||||
if ($action == 'update' || $action == 'add')
|
||||
{
|
||||
$constlineid = GETPOST('rowid', 'int');
|
||||
$constname=GETPOST('constname', 'alpha');
|
||||
|
||||
$constvalue=(GETPOSTISSET('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname, 'alpha') : GETPOST('constvalue'));
|
||||
$consttype=(GETPOSTISSET('consttype_'.$constname) ? GETPOST('consttype_'.$constname, 'alphanohtml') : GETPOST('consttype'));
|
||||
$constnote=(GETPOSTISSET('constnote_'.$constname) ? GETPOST('constnote_'.$constname, 'none') : GETPOST('constnote'));
|
||||
|
||||
$typetouse = empty($oldtypetonewone[$consttype]) ? $consttype : $oldtypetonewone[$consttype];
|
||||
|
||||
$res=dolibarr_set_const($db, $constname, $constvalue, $typetouse, 0, $constnote, $conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setvalue' && $user->admin)
|
||||
{
|
||||
$db->begin();
|
||||
@ -149,46 +176,82 @@ $title = $langs->trans("ListOfNotificationsPerUser");
|
||||
if (!empty($conf->societe->enabled)) $title = $langs->trans("ListOfNotificationsPerUserOrContact");
|
||||
print load_fiche_titre($title, '', '');
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
/*print '<td>'.$langs->trans("Code").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';*/
|
||||
//print '<td class="right">'.$langs->trans("NbOfTargetedContacts").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Load array of available notifications
|
||||
$notificationtrigger = new InterfaceNotification($db);
|
||||
$listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
|
||||
$i = 0;
|
||||
foreach ($listofnotifiedevents as $notifiedevent)
|
||||
{
|
||||
$label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
|
||||
$elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
// Editing global variables not related to a specific theme
|
||||
$constantes=array();
|
||||
foreach ($listofnotifiedevents as $notifiedevent)
|
||||
{
|
||||
$label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
|
||||
$elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
|
||||
|
||||
if ($notifiedevent['elementtype'] == 'order_supplier') $elementLabel = $langs->trans('SupplierOrder');
|
||||
elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
|
||||
elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
|
||||
elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
|
||||
elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
|
||||
elseif ($notifiedevent['elementtype'] == 'shipping') $elementLabel = $langs->trans('Shipping');
|
||||
elseif ($notifiedevent['elementtype'] == 'expensereport') $elementLabel = $langs->trans('ExpenseReport');
|
||||
if ($notifiedevent['elementtype'] == 'order_supplier') $elementLabel = $langs->trans('SupplierOrder');
|
||||
elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
|
||||
elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
|
||||
elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
|
||||
elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
|
||||
elseif ($notifiedevent['elementtype'] == 'shipping') $elementLabel = $langs->trans('Shipping');
|
||||
elseif ($notifiedevent['elementtype'] == 'expensereport') $elementLabel = $langs->trans('ExpenseReport');
|
||||
|
||||
if ($i) print ', ';
|
||||
print $label;
|
||||
if ($notifiedevent['elementtype'] == 'propal') $model = 'propal_send';
|
||||
elseif ($notifiedevent['elementtype'] == 'commande') $model = 'order_send';
|
||||
elseif ($notifiedevent['elementtype'] == 'facture') $model = 'facture_send';
|
||||
elseif ($notifiedevent['elementtype'] == 'shipping') $model = 'shipping_send';
|
||||
elseif ($notifiedevent['elementtype'] == 'ficheinter') $model = 'fichinter_send';
|
||||
elseif ($notifiedevent['elementtype'] == 'expensereport') $model = 'expensereport_send';
|
||||
elseif ($notifiedevent['elementtype'] == 'order_supplier') $model = 'order_supplier_send';
|
||||
//elseif ($notifiedevent['elementtype'] == 'invoice_supplier') $model = 'invoice_supplier_send';
|
||||
elseif ($notifiedevent['elementtype'] == 'member') $model = 'member';
|
||||
|
||||
$i++;
|
||||
$constantes[$notifiedevent['code'].'_TEMPLATE'] = array('type'=>'emailtemplate:'.$model, 'label'=>$label);
|
||||
}
|
||||
|
||||
$helptext='';
|
||||
form_constantes($constantes, 0, $helptext);
|
||||
} else {
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
/*print '<td>'.$langs->trans("Code").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';*/
|
||||
//print '<td class="right">'.$langs->trans("NbOfTargetedContacts").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
|
||||
$i = 0;
|
||||
foreach ($listofnotifiedevents as $notifiedevent)
|
||||
{
|
||||
$label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
|
||||
$elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
|
||||
|
||||
if ($notifiedevent['elementtype'] == 'order_supplier') $elementLabel = $langs->trans('SupplierOrder');
|
||||
elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
|
||||
elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
|
||||
elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
|
||||
elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
|
||||
elseif ($notifiedevent['elementtype'] == 'shipping') $elementLabel = $langs->trans('Shipping');
|
||||
elseif ($notifiedevent['elementtype'] == 'expensereport') $elementLabel = $langs->trans('ExpenseReport');
|
||||
|
||||
if ($i) print ', ';
|
||||
print $label;
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '<div class="opacitymedium">';
|
||||
print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
|
||||
if (!empty($conf->societe->enabled)) print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
|
||||
|
||||
print '</div>';
|
||||
print '<br><br>';
|
||||
|
||||
@ -205,10 +268,6 @@ print '<td>'.$langs->trans("Threshold").'</td>';
|
||||
print '<td>'.'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Load array of available notifications
|
||||
$notificationtrigger = new InterfaceNotification($db);
|
||||
$listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
|
||||
|
||||
foreach ($listofnotifiedevents as $notifiedevent)
|
||||
{
|
||||
$label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
|
||||
|
||||
@ -195,7 +195,7 @@ dol_fiche_end();
|
||||
* Projects Numbering model
|
||||
*/
|
||||
|
||||
print load_fiche_titre($langs->trans("TicketNumberingModules"));
|
||||
print load_fiche_titre($langs->trans("TicketNumberingModules"), '', '');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
@ -298,7 +298,7 @@ if (!$conf->use_javascript_ajax) {
|
||||
print '<input type="hidden" name="action" value="setvarother">';
|
||||
}
|
||||
|
||||
print load_fiche_titre($langs->trans("TicketParams"));
|
||||
print load_fiche_titre($langs->trans("Other"), '', '');
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
@ -307,78 +307,6 @@ print '<td></td>';
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Activate email notifications
|
||||
/*
|
||||
print '<tr class="pair"><td>' . $langs->trans("TicketsDisableEmail") . '</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_DISABLE_ALL_MAILS');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("TICKET_DISABLE_ALL_MAILS", $arrval, $conf->global->TICKET_DISABLE_ALL_MAILS);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsDisableEmailHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Activate log by email
|
||||
print '<tr class="pair"><td>' . $langs->trans("TicketsLogEnableEmail") . '</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_ACTIVATE_LOG_BY_EMAIL');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("TICKET_ACTIVATE_LOG_BY_EMAIL", $arrval, $conf->global->TICKET_ACTIVATE_LOG_BY_EMAIL);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsLogEnableEmailHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// Also send to main email address
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketsEmailAlsoSendToMainAddress").'</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Limiter la vue des tickets à ceux assignés à l'utilisateur
|
||||
/*
|
||||
print '<tr class="pair"><td>' . $langs->trans("TicketsLimitViewAssignedOnly") . '</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_LIMIT_VIEW_ASSIGNED_ONLY');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("TICKET_LIMIT_VIEW_ASSIGNED_ONLY", $arrval, $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsLimitViewAssignedOnlyHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
/*if (!$conf->use_javascript_ajax) {
|
||||
print '<tr class="impair"><td colspan="3" align="center"><input type="submit" class="button" value="' . $langs->trans("Save") . '"></td>';
|
||||
print '</tr>';
|
||||
}*/
|
||||
|
||||
// Auto assign ticket at user who created it
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketsAutoAssignTicket").'</td>';
|
||||
print '<td class="left">';
|
||||
@ -401,7 +329,7 @@ if (!$conf->use_javascript_ajax) {
|
||||
}
|
||||
|
||||
// Admin var of module
|
||||
print load_fiche_titre($langs->trans("Notification"));
|
||||
print load_fiche_titre($langs->trans("Notification"), '', '');
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
@ -419,22 +347,6 @@ if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) {
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
// Activate log by email
|
||||
/*print '<tr class="pair"><td>' . $langs->trans("TicketsLogEnableEmail") . '</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_ACTIVATE_LOG_BY_EMAIL');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("TICKET_ACTIVATE_LOG_BY_EMAIL", $arrval, $conf->global->TICKET_ACTIVATE_LOG_BY_EMAIL);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsLogEnableEmailHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// @todo Use module notification instead...
|
||||
|
||||
// Email d'envoi des notifications
|
||||
@ -446,18 +358,36 @@ print $form->textwithpicto('', $langs->trans("TicketEmailNotificationFromHelp"),
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Email de réception des notifications
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationTo").'</td>';
|
||||
// Email for notification of TICKET_CREATE
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationTo").' ('.$langs->trans("Creation").')</td>';
|
||||
print '<td class="left">';
|
||||
print '<input type="text" name="TICKET_NOTIFICATION_EMAIL_TO" value="'.(!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? $conf->global->TICKET_NOTIFICATION_EMAIL_TO : $conf->global->TICKET_NOTIFICATION_EMAIL_FROM).'" size="20" ></td>';
|
||||
print '<input type="text" name="TICKET_NOTIFICATION_EMAIL_TO" value="'.(!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? $conf->global->TICKET_NOTIFICATION_EMAIL_TO : '').'"></td>';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketEmailNotificationToHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Also send to TICKET_NOTIFICATION_EMAIL_TO for responses (not only creation)
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketsEmailAlsoSendToMainAddress").'</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Texte d'introduction
|
||||
$mail_intro = $conf->global->TICKET_MESSAGE_MAIL_INTRO ? $conf->global->TICKET_MESSAGE_MAIL_INTRO : $langs->trans('TicketMessageMailIntroText');
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketMessageMailIntroLabelAdmin").'</label>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketMessageMailIntroLabelAdmin").' ('.$langs->trans("Responses").')';
|
||||
print '</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_INTRO', $mail_intro, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70);
|
||||
|
||||
@ -328,12 +328,11 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewAsset'), '', 'fa fa-plus-circle', dol_buildpath('/asset/card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'accountancy', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
$topicmail = "SendAssetsRef";
|
||||
|
||||
@ -253,7 +253,7 @@ if ($conf->product->enabled || $conf->product->service)
|
||||
|
||||
$nbno = $nbtotal = 0;
|
||||
|
||||
print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"), '', 'products');
|
||||
print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"), '', 'product');
|
||||
print '<br>'."\n";
|
||||
|
||||
$sql = "SELECT count(rowid) as nb, fk_product_type, datec";
|
||||
|
||||
@ -256,7 +256,7 @@ jQuery(document).ready(function() {
|
||||
// Part to create
|
||||
if ($action == 'create')
|
||||
{
|
||||
print load_fiche_titre($langs->trans("NewBOM"), '', 'cubes');
|
||||
print load_fiche_titre($langs->trans("NewBOM"), '', 'bom');
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
@ -440,12 +440,11 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bom/bom_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $user->rights->bom->write);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cubes', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bom', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
$topicmail = "SendBillOfMaterialsRef";
|
||||
|
||||
@ -144,6 +144,26 @@ class Categorie extends CommonObject
|
||||
'website_page' => 'WebsitePage'
|
||||
);
|
||||
|
||||
/**
|
||||
* @var array Title Area mapping from type string
|
||||
*
|
||||
* @note Move to const array when PHP 5.6 will be our minimum target
|
||||
*/
|
||||
public static $MAP_TYPE_TITLE_AREA = array(
|
||||
'product' => 'ProductsCategoriesArea',
|
||||
'customer' => 'CustomersCategoriesArea',
|
||||
'supplier' => 'SuppliersCategoriesArea',
|
||||
'member' => 'MembersCategoriesArea',
|
||||
'contact' => 'ContactsCategoriesArea',
|
||||
'user' => 'UsersCategoriesArea',
|
||||
'account' => 'AccountsCategoriesArea', // old for bank account
|
||||
'bank_account' => 'AccountsCategoriesArea',
|
||||
'project' => 'ProjectsCategoriesArea',
|
||||
'warehouse'=> 'StocksCategoriesArea',
|
||||
'actioncomm' => 'ActioncommCategoriesArea',
|
||||
'website_page' => 'WebsitePageCategoriesArea'
|
||||
);
|
||||
|
||||
/**
|
||||
* @var array Object table mapping from type string (table llx_...) when value of key does not match table name.
|
||||
*
|
||||
@ -291,6 +311,7 @@ class Categorie extends CommonObject
|
||||
if (!is_numeric($type)) $type = $this->MAP_ID[$type];
|
||||
|
||||
$sql = "SELECT rowid, fk_parent, entity, label, description, color, fk_soc, visible, type, ref_ext";
|
||||
$sql .= ", date_creation, tms, fk_user_creat, fk_user_modif";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."categorie";
|
||||
if ($id > 0)
|
||||
{
|
||||
@ -315,16 +336,20 @@ class Categorie extends CommonObject
|
||||
$res = $this->db->fetch_array($resql);
|
||||
|
||||
$this->id = $res['rowid'];
|
||||
//$this->ref = $res['rowid'];
|
||||
//$this->ref = $res['rowid'];
|
||||
$this->fk_parent = $res['fk_parent'];
|
||||
$this->label = $res['label'];
|
||||
$this->description = $res['description'];
|
||||
$this->color = $res['color'];
|
||||
$this->socid = $res['fk_soc'];
|
||||
$this->visible = $res['visible'];
|
||||
$this->type = $res['type'];
|
||||
$this->type = $res['type'];
|
||||
$this->ref_ext = $res['ref_ext'];
|
||||
$this->entity = $res['entity'];
|
||||
$this->date_creation = $this->db->jdate($res['date_creation']);
|
||||
$this->date_modification = $this->db->jdate($res['tms']);
|
||||
$this->user_creation = $res['fk_user_creat'];
|
||||
$this->user_modification = $res['fk_user_modif'];
|
||||
|
||||
// Retreive all extrafield
|
||||
// fetch optionals attributes and labels
|
||||
@ -389,7 +414,7 @@ class Categorie extends CommonObject
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$now = dol_now();
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (";
|
||||
$sql .= "fk_parent,";
|
||||
$sql .= " label,";
|
||||
@ -403,7 +428,9 @@ class Categorie extends CommonObject
|
||||
$sql .= " type,";
|
||||
$sql .= " import_key,";
|
||||
$sql .= " ref_ext,";
|
||||
$sql .= " entity";
|
||||
$sql .= " entity,";
|
||||
$sql .= " date_creation,";
|
||||
$sql .= " fk_user_creat";
|
||||
$sql .= ") VALUES (";
|
||||
$sql .= $this->db->escape($this->fk_parent).",";
|
||||
$sql .= "'".$this->db->escape($this->label)."',";
|
||||
@ -417,7 +444,9 @@ class Categorie extends CommonObject
|
||||
$sql .= $this->db->escape($type).",";
|
||||
$sql .= (!empty($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : 'null').",";
|
||||
$sql .= (!empty($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : 'null').",";
|
||||
$sql .= $this->db->escape($conf->entity);
|
||||
$sql .= $this->db->escape($conf->entity).",";
|
||||
$sql .= "'".$this->db->idate($now)."', ";
|
||||
$sql .= (int) $user->id;
|
||||
$sql .= ")";
|
||||
|
||||
$res = $this->db->query($sql);
|
||||
@ -515,6 +544,7 @@ class Categorie extends CommonObject
|
||||
}
|
||||
$sql .= ", visible = '".$this->db->escape($this->visible)."'";
|
||||
$sql .= ", fk_parent = ".$this->fk_parent;
|
||||
$sql .= ", fk_user_modif = ".(int) $user->id;
|
||||
$sql .= " WHERE rowid = ".$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||
|
||||
95
htdocs/categories/info.php
Normal file
95
htdocs/categories/info.php
Normal file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/categories/info.php
|
||||
* \ingroup categories
|
||||
* \brief Category info page
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php';
|
||||
|
||||
if (!$user->rights->categorie->lire) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('categories', 'sendings'));
|
||||
|
||||
$socid = 0;
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
// Security check
|
||||
if ($user->socid) $socid = $user->socid;
|
||||
$result = restrictedArea($user, 'categorie', $id, '&category');
|
||||
|
||||
$object = new Categorie($db);
|
||||
if (!$object->fetch($id) > 0) {
|
||||
dol_print_error($db);
|
||||
exit;
|
||||
}
|
||||
$type = $object->type;
|
||||
if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('', $langs->trans('Categories'), '');
|
||||
|
||||
//$object->info($object->id);
|
||||
|
||||
$head = categories_prepare_head($object, $type);
|
||||
|
||||
$title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
|
||||
|
||||
dol_fiche_head($head, 'info', $langs->trans($title), -1, 'category');
|
||||
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type);
|
||||
$linkback = '<a href="'.$backtolist.'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = ' type = '.$type;
|
||||
$object->ref = $object->label;
|
||||
$morehtmlref = '<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
|
||||
$ways = $object->print_all_ways(" >> ", '', 1);
|
||||
foreach ($ways as $way) {
|
||||
$morehtmlref .= $way."<br>\n";
|
||||
}
|
||||
$morehtmlref .= '</div>';
|
||||
|
||||
dol_banner_tab($object, 'label', $linkback, ($user->socid ? 0 : 1), 'label', 'label', $morehtmlref, '&type='.$type, 0, '', '', 1);
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dol_print_object_info($object);
|
||||
print '</td></tr></table>';
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@ -112,20 +112,12 @@ $formother = new FormOther($db);
|
||||
|
||||
if ($object->id)
|
||||
{
|
||||
if ($type == Categorie::TYPE_PRODUCT) $title = $langs->trans("ProductsCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_SUPPLIER) $title = $langs->trans("SuppliersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_CUSTOMER) $title = $langs->trans("CustomersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_MEMBER) $title = $langs->trans("MembersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_CONTACT) $title = $langs->trans("ContactCategoriesShort");
|
||||
elseif ($type == Categorie::TYPE_ACCOUNT) $title = $langs->trans("AccountsCategoriesShort");
|
||||
elseif ($type == Categorie::TYPE_PROJECT) $title = $langs->trans("ProjectsCategoriesShort");
|
||||
elseif ($type == Categorie::TYPE_USER) $title = $langs->trans("UsersCategoriesShort");
|
||||
else $title = $langs->trans("Category");
|
||||
$title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
|
||||
|
||||
$head = categories_prepare_head($object, $type);
|
||||
|
||||
|
||||
dol_fiche_head($head, 'photos', $title, -1, 'category');
|
||||
dol_fiche_head($head, 'photos', $langs->trans($title), -1, 'category');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = ' type = '.$object->type;
|
||||
|
||||
@ -173,15 +173,7 @@ $form = new Form($db);
|
||||
$formadmin = new FormAdmin($db);
|
||||
$formother = new FormOther($db);
|
||||
|
||||
if ($type == Categorie::TYPE_PRODUCT) $title = $langs->trans("ProductsCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_SUPPLIER) $title = $langs->trans("SuppliersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_CUSTOMER) $title = $langs->trans("CustomersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_MEMBER) $title = $langs->trans("MembersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_CONTACT) $title = $langs->trans("ContactCategoriesShort");
|
||||
elseif ($type == Categorie::TYPE_ACCOUNT) $title = $langs->trans("AccountsCategoriesShort");
|
||||
elseif ($type == Categorie::TYPE_PROJECT) $title = $langs->trans("ProjectsCategoriesShort");
|
||||
elseif ($type == Categorie::TYPE_USER) $title = $langs->trans("UsersCategoriesShort");
|
||||
else $title = $langs->trans("Category");
|
||||
$title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
|
||||
|
||||
$head = categories_prepare_head($object, $type);
|
||||
|
||||
@ -195,7 +187,7 @@ if (!empty($object->multilangs))
|
||||
}
|
||||
}
|
||||
|
||||
dol_fiche_head($head, 'translation', $title, -1, 'category');
|
||||
dol_fiche_head($head, 'translation', $langs->trans($title), -1, 'category');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = ' type = '.$object->type;
|
||||
|
||||
@ -207,21 +207,12 @@ $arrayofcss = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css
|
||||
$helpurl = '';
|
||||
llxHeader("", $langs->trans("Categories"), $helpurl, '', 0, 0, $arrayofjs, $arrayofcss);
|
||||
|
||||
if ($type == Categorie::TYPE_PRODUCT) { $title = $langs->trans("ProductsCategoriesArea"); $typetext = 'product'; }
|
||||
elseif ($type == Categorie::TYPE_SUPPLIER) { $title = $langs->trans("SuppliersCategoriesArea"); $typetext = 'supplier'; }
|
||||
elseif ($type == Categorie::TYPE_CUSTOMER) { $title = $langs->trans("CustomersCategoriesArea"); $typetext = 'customer'; }
|
||||
elseif ($type == Categorie::TYPE_MEMBER) { $title = $langs->trans("MembersCategoriesArea"); $typetext = 'member'; }
|
||||
elseif ($type == Categorie::TYPE_CONTACT) { $title = $langs->trans("ContactsCategoriesArea"); $typetext = 'contact'; }
|
||||
elseif ($type == Categorie::TYPE_ACCOUNT) { $title = $langs->trans("AccountsCategoriesArea"); $typetext = 'bank_account'; }
|
||||
elseif ($type == Categorie::TYPE_PROJECT) { $title = $langs->trans("ProjectsCategoriesArea"); $typetext = 'project'; }
|
||||
elseif ($type == Categorie::TYPE_USER) { $title = $langs->trans("UsersCategoriesArea"); $typetext = 'user'; }
|
||||
elseif ($type == Categorie::TYPE_WAREHOUSE) { $title = $langs->trans("StocksCategoriesArea"); $typetext = 'warehouse'; }
|
||||
else { $title = $langs->trans("CategoriesArea"); $typetext = 'unknown'; }
|
||||
$title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
|
||||
|
||||
$head = categories_prepare_head($object, $type);
|
||||
|
||||
|
||||
dol_fiche_head($head, 'card', $title, -1, 'category');
|
||||
dol_fiche_head($head, 'card', $langs->trans($title), -1, 'category');
|
||||
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type);
|
||||
$linkback = '<a href="'.$backtolist.'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = ' type = '.$object->type;
|
||||
@ -350,7 +341,7 @@ else
|
||||
{
|
||||
$categstatic = new Categorie($db);
|
||||
|
||||
$fulltree = $categstatic->get_full_arbo($typetext, $object->id, 1);
|
||||
$fulltree = $categstatic->get_full_arbo($type, $object->id, 1);
|
||||
|
||||
// Load possible missing includes
|
||||
if ($conf->global->CATEGORY_SHOW_COUNTS)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -898,33 +898,37 @@ class ActionComm extends CommonObject
|
||||
|
||||
$error = 0;
|
||||
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm";
|
||||
$sql .= " WHERE id=".$this->id;
|
||||
// remove categorie association
|
||||
if (!$error) {
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_actioncomm";
|
||||
$sql .= " WHERE fk_actioncomm=".$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
$res = $this->db->query($sql);
|
||||
if (!$res) {
|
||||
$this->error=$this->db->lasterror();
|
||||
$error++;
|
||||
$res = $this->db->query($sql);
|
||||
if (!$res) {
|
||||
$this->error = $this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
// remove actioncomm_resources
|
||||
if (!$error) {
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources";
|
||||
$sql .= " WHERE fk_actioncomm=".$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
$res = $this->db->query($sql);
|
||||
if (!$res) {
|
||||
$this->error=$this->db->lasterror();
|
||||
$this->error = $this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
// Removed extrafields
|
||||
if (!$error) {
|
||||
$result = $this->deleteExtraFields();
|
||||
$result = $this->deleteExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
@ -932,6 +936,18 @@ class ActionComm extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// remove actioncomm
|
||||
if (!$error) {
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm";
|
||||
$sql .= " WHERE id=".$this->id;
|
||||
|
||||
$res = $this->db->query($sql);
|
||||
if (!$res) {
|
||||
$this->error = $this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
if (!$notrigger)
|
||||
@ -1381,7 +1397,7 @@ class ActionComm extends CommonObject
|
||||
if ($this->type_code != 'AC_OTH_AUTO') $labeltype = $langs->trans('ActionAC_MANUAL');
|
||||
}
|
||||
|
||||
$tooltip = '<u>'.$langs->trans('ShowAction').'</u>';
|
||||
$tooltip = '<u>'.$langs->trans('Action').'</u>';
|
||||
if (!empty($this->ref))
|
||||
$tooltip .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
if (!empty($label))
|
||||
|
||||
@ -382,7 +382,6 @@ if ($resql)
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
$nav = '';
|
||||
|
||||
@ -443,7 +442,7 @@ if ($resql)
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : '')));
|
||||
}
|
||||
|
||||
print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, $nav.$newcardbutton, '', $limit);
|
||||
print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ $result = restrictedArea($user, 'mailing');
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
|
||||
$offset = $limit * $page;
|
||||
@ -129,8 +130,6 @@ if ($filteremail)
|
||||
if ($search_all) $sql .= " AND (m.titre like '%".$db->escape($search_all)."%' OR m.sujet like '%".$db->escape($search_all)."%' OR m.body like '%".$db->escape($search_all)."%')";
|
||||
if (!$sortorder) $sortorder = "ASC";
|
||||
if (!$sortfield) $sortfield = "m.rowid";
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
$sql .= $db->plimit($conf->liste_limit + 1, $offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -141,15 +140,30 @@ else
|
||||
if ($search_all) $sql .= " AND (m.titre like '%".$db->escape($search_all)."%' OR m.sujet like '%".$db->escape($search_all)."%' OR m.body like '%".$db->escape($search_all)."%')";
|
||||
if (!$sortorder) $sortorder = "ASC";
|
||||
if (!$sortfield) $sortfield = "m.rowid";
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
$sql .= $db->plimit($conf->liste_limit + 1, $offset);
|
||||
}
|
||||
|
||||
//print $sql;
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$resql = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($resql);
|
||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
{
|
||||
$page = 0;
|
||||
$offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
//print $sql;
|
||||
|
||||
dol_syslog("comm/mailing/list.php", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$title = $langs->trans("ListOfEMailings");
|
||||
if ($filteremail) $title .= ' ('.$langs->trans("SentTo", $filteremail).')';
|
||||
@ -163,17 +177,18 @@ if ($result)
|
||||
$i = 0;
|
||||
|
||||
$param = "&search_all=".urlencode($search_all);
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||
if ($filteremail) $param .= '&filteremail='.urlencode($filteremail);
|
||||
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, '', 'generic', 0, $newcardbutton);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
@ -214,12 +229,12 @@ if ($result)
|
||||
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$email->id = $obj->rowid;
|
||||
$email->ref = $obj->rowid;
|
||||
|
||||
print "<tr>";
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td>';
|
||||
print $email->getNomUrl(1);
|
||||
@ -280,7 +295,8 @@ if ($result)
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
$db->free($result);
|
||||
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1513,7 +1513,6 @@ if ($action == 'create')
|
||||
|
||||
$projectid = (!empty($objectsrc->fk_project) ? $objectsrc->fk_project : 0);
|
||||
$ref_client = (!empty($objectsrc->ref_client) ? $objectsrc->ref_client : '');
|
||||
$ref_int = (!empty($objectsrc->ref_int) ? $objectsrc->ref_int : '');
|
||||
|
||||
$soc = $objectsrc->thirdparty;
|
||||
|
||||
|
||||
@ -258,7 +258,6 @@ class Propal extends CommonObject
|
||||
'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>20),
|
||||
'ref_client' =>array('type'=>'varchar(255)', 'label'=>'RefCustomer', 'enabled'=>1, 'visible'=>-1, 'position'=>22),
|
||||
'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'RefExt', 'enabled'=>1, 'visible'=>0, 'position'=>40),
|
||||
'ref_int' =>array('type'=>'varchar(255)', 'label'=>'RefInt', 'enabled'=>1, 'visible'=>0, 'position'=>45), // deprecated
|
||||
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'position'=>23),
|
||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>24),
|
||||
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25),
|
||||
|
||||
@ -494,10 +494,9 @@ if ($resql)
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "SendPropalRef";
|
||||
$modelmail = "proposal_send";
|
||||
|
||||
@ -499,13 +499,11 @@ if ($resql)
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "SendOrderRef";
|
||||
$modelmail = "order_send";
|
||||
|
||||
@ -169,7 +169,6 @@ if (($action == 'create' || $action == 'add') && !$error)
|
||||
$object->note_public = trim($_POST['note_public']);
|
||||
$object->note = trim($_POST['note']);
|
||||
$object->ref_client = $_POST['ref_client'];
|
||||
$object->ref_int = $_POST['ref_int'];
|
||||
$object->modelpdf = $_POST['model'];
|
||||
$object->fk_project = $_POST['projectid'];
|
||||
$object->cond_reglement_id = ($_POST['type'] == 3 ? 1 : $_POST['cond_reglement_id']);
|
||||
@ -407,8 +406,6 @@ if ($action == 'create' && !$error)
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n";
|
||||
print '<input name="ref" type="hidden" value="provisoire">';
|
||||
print '<input name="ref_client" type="hidden" value="'.$ref_client.'">';
|
||||
print '<input name="ref_int" type="hidden" value="'.$ref_int.'">';
|
||||
print '<input type="hidden" name="origin" value="'.GETPOST('origin').'">';
|
||||
print '<input type="hidden" name="originid" value="'.GETPOST('originid').'">';
|
||||
print '<input type="hidden" name="autocloseorders" value="'.GETPOST('autocloseorders').'">';
|
||||
|
||||
@ -1187,7 +1187,13 @@ if ($resql)
|
||||
$reg = array();
|
||||
preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthee on tente recherche de traduction
|
||||
if ($reg[1] && $langs->trans($reg[1]) != $reg[1]) print $langs->trans($reg[1]);
|
||||
else print dol_trunc($objp->label, 40);
|
||||
else {
|
||||
if ($objp->label == '(payment_salary)') {
|
||||
print dol_trunc($langs->trans("SalaryPayment", 40));
|
||||
} else {
|
||||
print dol_trunc($objp->label, 40);
|
||||
}
|
||||
}
|
||||
//print "</a> ";
|
||||
|
||||
// Add links after description
|
||||
@ -1195,6 +1201,7 @@ if ($resql)
|
||||
$cachebankaccount = array();
|
||||
foreach ($links as $key=>$val)
|
||||
{
|
||||
print '<!-- '.$links[$key]['type'].' -->';
|
||||
if ($links[$key]['type'] == 'withdraw')
|
||||
{
|
||||
$banktransferstatic->id = $links[$key]['url_id'];
|
||||
@ -1540,7 +1547,7 @@ if ($resql)
|
||||
if ($user->rights->banque->modifier)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&rowid='.$objp->rowid.'&id='.$objp->bankid.'&page='.$page.'">';
|
||||
print img_delete();
|
||||
print img_delete('', 'class="marginleftonly"');
|
||||
print '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -243,7 +243,7 @@ class Account extends CommonObject
|
||||
/**
|
||||
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields=array(
|
||||
public $fields = array(
|
||||
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
|
||||
'ref' =>array('type'=>'varchar(12)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>25),
|
||||
'label' =>array('type'=>'varchar(30)', 'label'=>'Label', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>30),
|
||||
|
||||
@ -386,7 +386,7 @@ if ($result)
|
||||
print '</a>';
|
||||
}
|
||||
elseif ($links[$key]['type'] == 'payment_salary') {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/salaries/card.php?id='.$links[$key]['url_id'].'">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/salaries/card.php?id='.$links[$key]['url_id'].'">';
|
||||
print img_object($langs->trans('ShowPaymentSalary'), 'payment').' ';
|
||||
print $langs->trans("SalaryPayment");
|
||||
print '</a>';
|
||||
|
||||
@ -333,14 +333,13 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$permforcashfence = 1;
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permforcashfence);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cash-register', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cash-register', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
$topicmail = "SendCashControlRef";
|
||||
|
||||
@ -439,9 +439,9 @@ elseif ($id)
|
||||
|
||||
// Type
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey("Type", 'type', $langs->trans($object->type), $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'select:types_fees');
|
||||
print $form->editfieldkey("Type", 'type', $langs->trans($object->type), $object, $user->rights->deplacement->creer, 'select:types_fees');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval("Type", 'type', $form->cache_types_fees[$object->type], $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'select:types_fees');
|
||||
print $form->editfieldval("Type", 'type', $form->cache_types_fees[$object->type], $object, $user->rights->deplacement->creer, 'select:types_fees');
|
||||
print '</td></tr>';
|
||||
|
||||
// Who
|
||||
@ -453,16 +453,16 @@ elseif ($id)
|
||||
|
||||
// Date
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey("Date", 'dated', $object->date, $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'datepicker');
|
||||
print $form->editfieldkey("Date", 'dated', $object->date, $object, $user->rights->deplacement->creer, 'datepicker');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval("Date", 'dated', $object->date, $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'datepicker');
|
||||
print $form->editfieldval("Date", 'dated', $object->date, $object, $user->rights->deplacement->creer, 'datepicker');
|
||||
print '</td></tr>';
|
||||
|
||||
// Km/Price
|
||||
print '<tr><td class="tdtop">';
|
||||
print $form->editfieldkey("FeesKilometersOrAmout", 'km', $object->km, $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'numeric:6');
|
||||
print $form->editfieldkey("FeesKilometersOrAmout", 'km', $object->km, $object, $user->rights->deplacement->creer, 'numeric:6');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval("FeesKilometersOrAmout", 'km', $object->km, $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'numeric:6');
|
||||
print $form->editfieldval("FeesKilometersOrAmout", 'km', $object->km, $object, $user->rights->deplacement->creer, 'numeric:6');
|
||||
print "</td></tr>";
|
||||
|
||||
// Where
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2017-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -69,6 +69,11 @@ class FactureRec extends CommonInvoice
|
||||
*/
|
||||
public $entity;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'titre';
|
||||
|
||||
public $number;
|
||||
public $date;
|
||||
public $remise;
|
||||
@ -82,7 +87,14 @@ class FactureRec extends CommonInvoice
|
||||
public $nb_gen_done;
|
||||
public $nb_gen_max;
|
||||
|
||||
/**
|
||||
* @var int Frequency
|
||||
*/
|
||||
public $frequency;
|
||||
|
||||
/**
|
||||
* @var string Unit frequency
|
||||
*/
|
||||
public $unit_frequency;
|
||||
|
||||
public $rang;
|
||||
@ -122,7 +134,7 @@ class FactureRec extends CommonInvoice
|
||||
*/
|
||||
public $fields = array(
|
||||
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
|
||||
'titre' =>array('type'=>'varchar(100)', 'label'=>'Titre', 'enabled'=>1, 'visible'=>-1, 'position'=>15),
|
||||
'titre' =>array('type'=>'varchar(100)', 'label'=>'Titre', 'enabled'=>1, 'showoncombobox' => 1, 'visible'=>-1, 'position'=>15),
|
||||
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>20, 'index'=>1),
|
||||
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25),
|
||||
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>30),
|
||||
@ -463,10 +475,9 @@ class FactureRec extends CommonInvoice
|
||||
* @param int $rowid Id of object to load
|
||||
* @param string $ref Reference of recurring invoice
|
||||
* @param string $ref_ext External reference of invoice
|
||||
* @param int $ref_int Internal reference of other object
|
||||
* @return int >0 if OK, <0 if KO, 0 if not found
|
||||
*/
|
||||
public function fetch($rowid, $ref = '', $ref_ext = '', $ref_int = '')
|
||||
public function fetch($rowid, $ref = '', $ref_ext = '')
|
||||
{
|
||||
$sql = 'SELECT f.rowid, f.entity, f.titre as title, f.suspended, f.fk_soc, f.tva, f.localtax1, f.localtax2, f.total, f.total_ttc';
|
||||
$sql .= ', f.remise_percent, f.remise_absolue, f.remise';
|
||||
|
||||
@ -688,11 +688,10 @@ if ($resql)
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "SendBillRef";
|
||||
$modelmail = "facture_send";
|
||||
|
||||
@ -546,8 +546,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->
|
||||
|
||||
|
||||
|
||||
// Last donations
|
||||
if (!empty($conf->don->enabled) && $user->rights->societe->lire)
|
||||
// Latest donations
|
||||
if (!empty($conf->don->enabled) && $user->rights->don->lire)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||
|
||||
|
||||
@ -357,11 +357,11 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
}
|
||||
|
||||
// Invoice with Paypal transaction
|
||||
// TODO add hook possibility (regis)
|
||||
if (!empty($conf->paypalplus->enabled) && $conf->global->PAYPAL_ENABLE_TRANSACTION_MANAGEMENT && !empty($facture->ref_int))
|
||||
// TODO add hook here
|
||||
if (!empty($conf->paypalplus->enabled) && $conf->global->PAYPAL_ENABLE_TRANSACTION_MANAGEMENT && !empty($facture->ref_ext))
|
||||
{
|
||||
if (!empty($conf->global->PAYPAL_BANK_ACCOUNT)) $accountid = $conf->global->PAYPAL_BANK_ACCOUNT;
|
||||
$paymentnum = $facture->ref_int;
|
||||
$paymentnum = $facture->ref_ext;
|
||||
}
|
||||
|
||||
// Add realtime total information
|
||||
|
||||
@ -1295,7 +1295,7 @@ class Contact extends CommonObject
|
||||
$label .= '</div><div style="clear: both;"></div>';
|
||||
}
|
||||
|
||||
$label .= '<u>'.$langs->trans("ShowContact").'</u>';
|
||||
$label .= '<u>'.$langs->trans("Contact").'</u>';
|
||||
$label .= '<br><b>'.$langs->trans("Name").':</b> '.$this->getFullName($langs);
|
||||
//if ($this->civility_id) $label.= '<br><b>' . $langs->trans("Civility") . ':</b> '.$this->civility_id; // TODO Translate cibilty_id code
|
||||
if (!empty($this->poste)) $label .= '<br><b>'.$langs->trans("Poste").':</b> '.$this->poste;
|
||||
|
||||
@ -382,10 +382,9 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'commercial', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'commercial', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "SendContractRef";
|
||||
$modelmail = "contract";
|
||||
|
||||
@ -39,9 +39,13 @@ $element = GETPOST('element', 'alpha');
|
||||
$object = new GenericObject($db);
|
||||
|
||||
// Security check
|
||||
if (!empty($user->socid))
|
||||
if (!empty($user->socid)) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
|
||||
if (empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||
accessforbidden('Calling this file is allowed only when MAIN_DIRECT_STATUS_UPDATE is set');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@ -52,20 +56,24 @@ top_httphead();
|
||||
|
||||
print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||
|
||||
if ($element == 'societe' && in_array($field, array('status')))
|
||||
{
|
||||
$result = restrictedArea($user, 'societe', $id);
|
||||
if (in_array($field, array('status'))) {
|
||||
$result = restrictedArea($user, $element, $id);
|
||||
}
|
||||
elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch')))
|
||||
{
|
||||
elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products
|
||||
$result = restrictedArea($user, 'produit|service', $id, 'product&product', '', '', 'rowid');
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
accessforbidden("Bad value for combination of parameters element/field.", 0, 0, 1);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Registering new values
|
||||
if (($action == 'set') && !empty($id))
|
||||
$object->setValueFrom($field, $value, $element, $id);
|
||||
if (($action == 'set') && !empty($id)) {
|
||||
$triggerkey = strtoupper($element).'_UPDATE';
|
||||
// Special case
|
||||
if ($triggerkey == 'SOCIETE_UPDATE') {
|
||||
$triggerkey = 'COMPANY_UPDATE';
|
||||
}
|
||||
|
||||
$object->setValueFrom($field, $value, $element, $id, $user, $triggerkey);
|
||||
}
|
||||
|
||||
@ -157,7 +157,6 @@ class Ccountry // extends CommonObject
|
||||
*/
|
||||
public function fetch($id, $code = '', $code_iso = '')
|
||||
{
|
||||
global $langs;
|
||||
$sql = "SELECT";
|
||||
$sql .= " t.rowid,";
|
||||
$sql .= " t.code,";
|
||||
|
||||
@ -2354,6 +2354,8 @@ class Form
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
||||
|
||||
$num = $this->db->num_rows($result);
|
||||
|
||||
$events = null;
|
||||
@ -2882,6 +2884,7 @@ class Form
|
||||
if ($result)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
||||
|
||||
$num = $this->db->num_rows($result);
|
||||
|
||||
@ -6120,7 +6123,7 @@ class Form
|
||||
else
|
||||
{
|
||||
// For backward compatibility
|
||||
$objecttmp->fields['ref']=array('type'=>'varchar(30)', 'label'=>'Ref', 'showoncombobox'=>1);
|
||||
$objecttmp->fields['ref'] = array('type'=>'varchar(30)', 'label'=>'Ref', 'showoncombobox'=>1);
|
||||
}
|
||||
|
||||
if (empty($fieldstoshow))
|
||||
|
||||
@ -110,7 +110,7 @@ class FormFile
|
||||
|
||||
$maxlength = $size;
|
||||
|
||||
$out = "\n\n<!-- Start form attach new file -->\n";
|
||||
$out = "\n\n".'<!-- Start form attach new file --><div class="formattachnewfile">'."\n";
|
||||
|
||||
if (empty($title)) $title = $langs->trans("AttachANewFile");
|
||||
if ($title != 'none') $out .= load_fiche_titre($title, null, null);
|
||||
@ -220,11 +220,11 @@ class FormFile
|
||||
if (empty($sectionid)) $out .= '<br>';
|
||||
}
|
||||
|
||||
$out .= "\n<!-- End form attach new file -->\n";
|
||||
$out .= "\n</div><!-- End form attach new file -->\n";
|
||||
|
||||
if ($linkfiles)
|
||||
{
|
||||
$out .= "\n<!-- Start form link new url -->\n";
|
||||
$out .= "\n".'<!-- Start form link new url --><div class="formlinknewurl">'."\n";
|
||||
$langs->load('link');
|
||||
$title = $langs->trans("LinkANewFile");
|
||||
$out .= load_fiche_titre($title, null, null);
|
||||
@ -260,7 +260,7 @@ class FormFile
|
||||
$out .= '</form><br>';
|
||||
}
|
||||
|
||||
$out .= "\n<!-- End form link new url -->\n";
|
||||
$out .= "\n</div><!-- End form link new url -->\n";
|
||||
}
|
||||
|
||||
$parameters = array('socid'=>(isset($GLOBALS['socid']) ? $GLOBALS['socid'] : ''), 'id'=>(isset($GLOBALS['id']) ? $GLOBALS['id'] : ''), 'url'=>$url, 'perm'=>$perm);
|
||||
@ -1174,7 +1174,7 @@ class FormFile
|
||||
}
|
||||
|
||||
// Show list of existing files
|
||||
if ((empty($useinecm) || $useinecm == 6) && $title != 'none') print load_fiche_titre($title ? $title : $langs->trans("AttachedFiles"));
|
||||
if ((empty($useinecm) || $useinecm == 6) && $title != 'none') print load_fiche_titre($title ? $title : $langs->trans("AttachedFiles"), '', 'file-upload', 0, '', 'table-list-of-attached-files');
|
||||
if (empty($url)) $url = $_SERVER["PHP_SELF"];
|
||||
|
||||
print '<!-- html.formfile::list_of_documents -->'."\n";
|
||||
@ -1790,7 +1790,7 @@ class FormFile
|
||||
print '<!-- listOfLinks -->'."\n";
|
||||
|
||||
// Show list of associated links
|
||||
print load_fiche_titre($langs->trans("LinkedFiles"));
|
||||
print load_fiche_titre($langs->trans("LinkedFiles"), '', 'external-link-square-alt', 0, '', 'table-list-of-links');
|
||||
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].($param ? '?'.$param : '').'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
@ -354,7 +354,7 @@ class FormTicket
|
||||
{
|
||||
$formproject = new FormProjets($this->db);
|
||||
print '<tr><td><label for="project"><span class="">'.$langs->trans("Project").'</span></label></td><td>';
|
||||
print $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1);
|
||||
print $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This tool can be included into a list page with
|
||||
* Note: This tool can be included into a list page with :
|
||||
* define('USE_CUSTOME_REPORT_AS_INCLUDE', 1);
|
||||
* include DOL_DOCUMENT_ROOT.'/core/customreports.php';
|
||||
*/
|
||||
@ -214,6 +214,7 @@ if ($action == 'viewgraph') {
|
||||
}
|
||||
|
||||
// Get all possible values of fields when a 'group by' is set, and save this into $arrayofvaluesforgroupby
|
||||
// $arrayofvaluesforgroupby will be used to forge lael of each grouped series
|
||||
if (is_array($search_groupby) && count($search_groupby)) {
|
||||
foreach ($search_groupby as $gkey => $gval) {
|
||||
$gvalwithoutprefix = preg_replace('/^[a-z]+\./', '', $gval);
|
||||
@ -260,11 +261,30 @@ if (is_array($search_groupby) && count($search_groupby)) {
|
||||
$keytouse = (string) $obj->val;
|
||||
$valuetranslated = $obj->val;
|
||||
}
|
||||
|
||||
$regs = array();
|
||||
if (!empty($object->fields[$gvalwithoutprefix]['arrayofkeyval'])) {
|
||||
$valuetranslated = $object->fields[$gvalwithoutprefix]['arrayofkeyval'][$obj->val];
|
||||
if (is_null($valuetranslated)) $valuetranslated = $langs->transnoentitiesnoconv("UndefinedKey");
|
||||
$valuetranslated = $langs->trans($valuetranslated);
|
||||
}
|
||||
elseif (preg_match('/integer:([^:]+):([^:]+)$/', $object->fields[$gvalwithoutprefix]['type'], $regs)) {
|
||||
$classname = $regs[1];
|
||||
$classpath = $regs[2];
|
||||
dol_include_once($classpath);
|
||||
if (class_exists($classname)) {
|
||||
$tmpobject = new $classname($db);
|
||||
$tmpobject->fetch($obj->val);
|
||||
foreach($tmpobject->fields as $fieldkey => $field) {
|
||||
if ($field['showoncombobox']) {
|
||||
$valuetranslated = $tmpobject->$fieldkey;
|
||||
//if ($valuetranslated == '-') $valuetranslated = $langs->transnoentitiesnoconv("Unknown")
|
||||
break;
|
||||
}
|
||||
}
|
||||
//$valuetranslated = $tmpobject->ref.'eee';
|
||||
}
|
||||
}
|
||||
|
||||
$arrayofvaluesforgroupby['g_'.$gkey][$keytouse] = $valuetranslated;
|
||||
}
|
||||
@ -313,7 +333,7 @@ foreach ($arrayoftype as $key => $val) {
|
||||
}
|
||||
}
|
||||
print $form->selectarray('objecttype', $newarrayoftype, $objecttype, 0, 0, 0, '', 1, 0, 0, '', 'minwidth200', 1);
|
||||
if (empty($conf->use_javascript_ajax)) print '<input type="submit" class="button" name="changeobjecttype" value="'.$langs->trans("Refresh").'">';
|
||||
if (empty($conf->use_javascript_ajax)) print '<input type="submit" class="button buttongen" name="changeobjecttype" value="'.$langs->trans("Refresh").'">';
|
||||
else {
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
@ -414,7 +434,7 @@ if ($mode == 'graph') {
|
||||
print '</div>';
|
||||
}
|
||||
print '<div class="divadvancedsearchfield">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
print '<input type="submit" class="button buttongen" value="'.$langs->trans("Refresh").'">';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
@ -578,6 +598,8 @@ if ($sql) {
|
||||
$fieldforxkey = 'x_0';
|
||||
$xlabel = $obj->$fieldforxkey;
|
||||
$xvalwithoutprefix = preg_replace('/^[a-z]+\./', '', $xval);
|
||||
|
||||
// Define $xlabel
|
||||
if (!empty($object->fields[$xvalwithoutprefix]['arrayofkeyval'])) {
|
||||
$xlabel = $object->fields[$xvalwithoutprefix]['arrayofkeyval'][$obj->$fieldforxkey];
|
||||
}
|
||||
@ -657,6 +679,7 @@ if ($sql) {
|
||||
$xlabel = $obj->$fieldforxkey;
|
||||
$xvalwithoutprefix = preg_replace('/^[a-z]+\./', '', $xval);
|
||||
|
||||
// Define $xlabel
|
||||
if (!empty($object->fields[$xvalwithoutprefix]['arrayofkeyval'])) {
|
||||
$xlabel = $object->fields[$xvalwithoutprefix]['arrayofkeyval'][$obj->$fieldforxkey];
|
||||
}
|
||||
@ -723,7 +746,12 @@ if ($mode == 'graph') {
|
||||
|
||||
$px1->draw($filenamenb, $fileurlnb);
|
||||
|
||||
print $px1->show($totalnbofrecord ? 0 : $langs->trans("SelectYourGraphOptionsFirst"));
|
||||
$texttoshow = $langs->trans("NoRecordFound");
|
||||
if (! GETPOSTISSET('search_measures') || ! GETPOSTISSET('search_xaxis')) {
|
||||
$texttoshow = $langs->trans("SelectYourGraphOptionsFirst");
|
||||
}
|
||||
|
||||
print $px1->show($totalnbofrecord ? 0 : $texttoshow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -69,16 +69,32 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
if ($conf->browser->layout == 'phone') print '<div class="fichehalfleft">';
|
||||
else print '<table class="nobordernopadding" width="100%"><tr><td class="borderright">';
|
||||
else print '<table class="nobordernopadding centpercent"><tr><td class="borderright">';
|
||||
|
||||
print '<table class="nobordernopadding centpercent">';
|
||||
print '<table class="nobordernopadding centpercent tableforfield">';
|
||||
|
||||
if ($canedit)
|
||||
{
|
||||
// Type
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print $langs->trans("Type");
|
||||
print '</td><td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
$multiselect = 0;
|
||||
if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
|
||||
{
|
||||
$multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE));
|
||||
}
|
||||
print '<span class="fas fa-square" style=" color: #ddd;"></span>';
|
||||
print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect);
|
||||
print '</td></tr>';
|
||||
|
||||
// Assigned to
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print $langs->trans("ActionsToDoBy").' ';
|
||||
print '</td><td style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print img_picto('', 'user');
|
||||
print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
if (empty($conf->dol_optimize_smallscreen)) print ' '.$langs->trans("or").' '.$langs->trans("ToUserOfGroup").' ';
|
||||
print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit);
|
||||
@ -93,23 +109,11 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print $langs->trans("Resource");
|
||||
print ' </td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2);
|
||||
print '</td><td class="nowrap maxwidthonsmartphone" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print img_picto('', 'object_resource');
|
||||
print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr>';
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print $langs->trans("Type");
|
||||
print ' </td><td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
$multiselect = 0;
|
||||
if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
|
||||
{
|
||||
$multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE));
|
||||
}
|
||||
print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
|
||||
@ -118,6 +122,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';
|
||||
print $langs->trans("ThirdParty").' ';
|
||||
print '</td><td class="nowrap" style="padding-bottom: 2px;">';
|
||||
print img_picto('', 'company');
|
||||
print $form->select_company($socid, 'search_socid', '', 'SelectThirdParty', 0, 0, null, 0);
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -131,6 +136,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
print '<td class="nowrap" style="padding-bottom: 2px;">';
|
||||
print $langs->trans("Project").' ';
|
||||
print '</td><td class="nowrap" style="padding-bottom: 2px;">';
|
||||
print img_picto('', 'project');
|
||||
print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
* @param string $type Type of category
|
||||
* @return array Array of tabs to show
|
||||
*/
|
||||
function categories_prepare_head($object, $type)
|
||||
function categories_prepare_head(Categorie $object, $type)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
|
||||
@ -57,6 +57,11 @@ function categories_prepare_head($object, $type)
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/categories/info.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Info");
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
|
||||
@ -1228,7 +1228,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
||||
// Edit
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/contact/card.php?action=edit&id='.$obj->rowid.'&backtopage='.urlencode($backtopage).'">';
|
||||
print '<a class="editfielda paddingleft" href="'.DOL_URL_ROOT.'/contact/card.php?action=edit&id='.$obj->rowid.'&backtopage='.urlencode($backtopage).'">';
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
<?php
|
||||
/* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
/* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
* Copyright (C) 2005-2019 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019 Thibault Foucart <support@ptibogxiv.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -1549,24 +1549,26 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
||||
}
|
||||
}
|
||||
|
||||
if (!$phototoshow) // Show No photo link (picto of pbject)
|
||||
if (!$phototoshow) // Show No photo link (picto of object)
|
||||
{
|
||||
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref">';
|
||||
if ($object->element == 'action')
|
||||
{
|
||||
$width = 80;
|
||||
$cssclass = 'photorefcenter';
|
||||
$nophoto = img_picto('', 'title_agenda', '', false, 1);
|
||||
$nophoto = img_picto('No photo', 'title_agenda');
|
||||
}
|
||||
else
|
||||
{
|
||||
$width = 14; $cssclass = 'photorefcenter';
|
||||
$picto = $object->picto;
|
||||
if ($object->element == 'project' && !$object->public) $picto = 'project'; // instead of projectpub
|
||||
$nophoto = img_picto('', 'object_'.$picto, '', false, 1);
|
||||
$nophoto = img_picto('No photo', 'object_'.$picto);
|
||||
}
|
||||
$morehtmlleft .= '<!-- No photo to show -->';
|
||||
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass ? ' '.$cssclass : '').'" alt="No photo"'.($width ? ' style="width: '.$width.'px"' : '').' src="'.$nophoto.'"></div></div>';
|
||||
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref">';
|
||||
$morehtmlleft .= $nophoto;
|
||||
$morehtmlleft .= '</div></div>';
|
||||
|
||||
$morehtmlleft .= '</div>';
|
||||
}
|
||||
@ -2270,7 +2272,7 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64,
|
||||
}
|
||||
|
||||
//$rep = '<div class="nospan" style="margin-right: 10px">';
|
||||
$rep .= ($withpicto ?img_picto($langs->trans("EMail").' : '.$email, 'object_email.png').' ' : '').$newemail;
|
||||
$rep = ($withpicto ?img_picto($langs->trans("EMail").' : '.$email, 'object_email.png').' ' : '').$newemail;
|
||||
//$rep .= '</div>';
|
||||
if ($hookmanager) {
|
||||
$parameters = array('cid' => $cid, 'socid' => $socid, 'addlink' => $addlink, 'picto' => $withpicto);
|
||||
@ -3139,14 +3141,17 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
|
||||
if (empty($srconly) && in_array($pictowithouttext, array(
|
||||
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
||||
'address', 'bank_account', 'barcode', 'bank', 'bookmark', 'building', 'cash-register', 'check', 'close_title', 'company', 'contact', 'cubes',
|
||||
'delete', 'dolly', 'edit', 'ellipsis-h',
|
||||
'filter', 'file-code', 'folder', 'folder-open', 'grip', 'grip_title', 'help', 'language', 'list', 'listlight', 'note',
|
||||
'object_action', 'object_account', 'object_barcode', 'object_phoning', 'object_phoning_fax', 'object_email',
|
||||
'object_accounting', 'object_category', 'object_bookmark', 'object_bug', 'object_generic', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
||||
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_holiday', 'object_hrm', 'object_multicurrency', 'object_payment',
|
||||
'address', 'bank_account', 'barcode', 'bank', 'bookmark', 'bom', 'building', 'cash-register', 'check', 'close_title', 'company', 'contact', 'cubes',
|
||||
'delete', 'dolly', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt',
|
||||
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'grip', 'grip_title', 'help', 'language', 'list', 'listlight', 'lot', 'mrp', 'note', 'stock',
|
||||
'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bom',
|
||||
'object_category', 'object_bookmark', 'object_bug', 'object_generic', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
||||
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_dynamicprice',
|
||||
'object_holiday', 'object_hrm', 'object_multicurrency', 'object_payment',
|
||||
'object_lot', 'object_mrp', 'object_product', 'object_service', 'object_stock',
|
||||
'object_paragraph', 'object_printer', 'object_resource', 'object_rss', 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_other',
|
||||
'off', 'on', 'paiment', 'play', 'playdisabled', 'printer', 'resize', 'stats', 'trip',
|
||||
'object_phoning', 'object_phoning_fax', 'object_email',
|
||||
'off', 'on', 'paiment', 'play', 'playdisabled', 'printer', 'product', 'resize', 'service', 'stats', 'trip',
|
||||
'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', 'globe',
|
||||
'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
||||
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top',
|
||||
@ -3168,21 +3173,22 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
$pictowithouttext = str_replace('object_', '', $pictowithouttext);
|
||||
|
||||
$arrayconvpictotofa = array(
|
||||
'account'=>'university', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university',
|
||||
'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase',
|
||||
'account'=>'university', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bom'=>'cubes',
|
||||
'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'dynamicprice'=>'hand-holding-usd',
|
||||
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt',
|
||||
'accounting'=>'chart-line', 'category'=>'tag',
|
||||
'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt',
|
||||
'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
|
||||
'email'=>'at',
|
||||
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'info-circle',
|
||||
'generic'=>'file', 'holiday'=>'umbrella-beach', 'member'=>'users', 'trip'=>'wallet', 'group'=>'users',
|
||||
'generic'=>'file', 'holiday'=>'umbrella-beach', 'member'=>'users', 'mrp'=>'cubes', 'trip'=>'wallet', 'group'=>'users',
|
||||
'sign-out'=>'sign-out-alt',
|
||||
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star', 'stats' => 'chart-bar',
|
||||
'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil-alt', 'filter'=>'filter', 'split'=>'code-branch',
|
||||
'list-alt'=>'list-alt', 'calendar'=>'calendar-alt', 'calendarweek'=>'calendar-week', 'calendarmonth'=>'calendar-alt', 'calendarday'=>'calendar-day', 'calendarperuser'=>'table',
|
||||
'multicurrency'=>'dollar-sign', 'other'=>'square', 'resource'=>'laptop-house',
|
||||
'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle',
|
||||
'payment'=>'money-bill-alt', 'phoning'=>'phone', 'phoning_fax'=>'fax', 'printer'=>'print', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
||||
'payment'=>'money-bill-alt', 'phoning'=>'phone', 'phoning_fax'=>'fax', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell',
|
||||
'stock'=>'box-open', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
||||
'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach',
|
||||
'title_agenda'=>'calendar-alt',
|
||||
'playdisabled'=>'play', 'preview'=>'binoculars', 'project'=>'sitemap', 'resize'=>'crop',
|
||||
@ -3252,7 +3258,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
|
||||
// Define $color
|
||||
$arrayconvpictotocolor = array(
|
||||
'address'=>'#37a', 'building'=>'#37a', 'companies'=>'#37a', 'company'=>'#37a', 'contact'=>'#37a', 'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'listlight'=>'#999',
|
||||
'address'=>'#37a', 'building'=>'#37a', 'bom'=>'#a69944',
|
||||
'companies'=>'#37a', 'company'=>'#37a', 'contact'=>'#37a', 'dynamicprice'=>'#a69944',
|
||||
'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'listlight'=>'#999',
|
||||
'lot'=>'#a69944', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944',
|
||||
'other'=>'#ddd',
|
||||
'playdisabled'=>'#ccc', 'printer'=>'#444', 'resize'=>'#444', 'rss'=>'#cba',
|
||||
'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'warning'=>''
|
||||
|
||||
@ -441,11 +441,13 @@ function showWebsiteTemplates(Website $website)
|
||||
|
||||
$colspan = 2;
|
||||
|
||||
$thumbsbyrow = 6;
|
||||
print '<!-- For to import website template -->'."\n";
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
// Title
|
||||
print '<tr class="liste_titre"><th class="titlefield"></th>';
|
||||
print '<tr class="liste_titre"><th class="titlefield">';
|
||||
print $form->textwithpicto($langs->trans("Templates"), $langs->trans("ThemeDir").' : '.join(", ", $dirthemes));
|
||||
print '</th>';
|
||||
print '<th class="right">';
|
||||
$url = 'https://www.dolistore.com/43-web-site-templates';
|
||||
print '<a href="'.$url.'" target="_blank">';
|
||||
@ -453,73 +455,68 @@ function showWebsiteTemplates(Website $website)
|
||||
print '</a>';
|
||||
print '</th></tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("ThemeDir").'</td>';
|
||||
print '<td>';
|
||||
foreach ($dirthemes as $dirtheme)
|
||||
{
|
||||
echo '"'.$dirtheme.'" ';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td colspan="'.$colspan.'">';
|
||||
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td><div class="center">';
|
||||
|
||||
$i = 0;
|
||||
foreach ($dirthemes as $dir)
|
||||
{
|
||||
//print $dirroot.$dir;exit;
|
||||
$dirtheme = DOL_DATA_ROOT.$dir; // This include loop on $conf->file->dol_document_root
|
||||
if (is_dir($dirtheme))
|
||||
if (count($dirthemes)) {
|
||||
$i = 0;
|
||||
foreach ($dirthemes as $dir)
|
||||
{
|
||||
$handle = opendir($dirtheme);
|
||||
if (is_resource($handle))
|
||||
//print $dirroot.$dir;exit;
|
||||
$dirtheme = DOL_DATA_ROOT.$dir; // This include loop on $conf->file->dol_document_root
|
||||
if (is_dir($dirtheme))
|
||||
{
|
||||
while (($subdir = readdir($handle)) !== false)
|
||||
$handle = opendir($dirtheme);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
if (is_file($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.'
|
||||
&& substr($subdir, 0, 3) <> 'CVS' && preg_match('/\.zip$/i', $subdir))
|
||||
while (($subdir = readdir($handle)) !== false)
|
||||
{
|
||||
$subdirwithoutzip = preg_replace('/\.zip$/i', '', $subdir);
|
||||
if (is_file($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.'
|
||||
&& substr($subdir, 0, 3) <> 'CVS' && preg_match('/\.zip$/i', $subdir))
|
||||
{
|
||||
$subdirwithoutzip = preg_replace('/\.zip$/i', '', $subdir);
|
||||
|
||||
// Disable not stable themes (dir ends with _exp or _dev)
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL < 2 && preg_match('/_dev$/i', $subdir)) continue;
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match('/_exp$/i', $subdir)) continue;
|
||||
// Disable not stable themes (dir ends with _exp or _dev)
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL < 2 && preg_match('/_dev$/i', $subdir)) continue;
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match('/_exp$/i', $subdir)) continue;
|
||||
|
||||
print '<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
|
||||
print '<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
|
||||
|
||||
$file = $dirtheme."/".$subdirwithoutzip.".jpg";
|
||||
$url = DOL_URL_ROOT.'/viewimage.php?modulepart=doctemplateswebsite&file='.$subdirwithoutzip.".jpg";
|
||||
$file = $dirtheme."/".$subdirwithoutzip.".jpg";
|
||||
$url = DOL_URL_ROOT.'/viewimage.php?modulepart=doctemplateswebsite&file='.$subdirwithoutzip.".jpg";
|
||||
|
||||
if (!file_exists($file)) $url = DOL_URL_ROOT.'/public/theme/common/nophoto.png';
|
||||
if (!file_exists($file)) $url = DOL_URL_ROOT.'/public/theme/common/nophoto.png';
|
||||
|
||||
$originalfile = basename($file);
|
||||
$entity = $conf->entity;
|
||||
$modulepart = 'doctemplateswebsite';
|
||||
$cache = '';
|
||||
$title = $file;
|
||||
$originalfile = basename($file);
|
||||
$entity = $conf->entity;
|
||||
$modulepart = 'doctemplateswebsite';
|
||||
$cache = '';
|
||||
$title = $file;
|
||||
|
||||
$ret = '';
|
||||
$urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 1, '&entity='.$entity);
|
||||
if (!empty($urladvanced)) $ret .= '<a class="'.$urladvanced['css'].'" target="'.$urladvanced['target'].'" mime="'.$urladvanced['mime'].'" href="'.$urladvanced['url'].'">';
|
||||
else $ret .= '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">';
|
||||
print $ret;
|
||||
print '<img class="img-skinthumb shadow" src="'.$url.'" border="0" alt="'.$title.'" title="'.$title.'" style="margin-bottom: 5px;">';
|
||||
print '</a>';
|
||||
$ret = '';
|
||||
$urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 1, '&entity='.$entity);
|
||||
if (!empty($urladvanced)) $ret .= '<a class="'.$urladvanced['css'].'" target="'.$urladvanced['target'].'" mime="'.$urladvanced['mime'].'" href="'.$urladvanced['url'].'">';
|
||||
else $ret .= '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">';
|
||||
print $ret;
|
||||
print '<img class="img-skinthumb shadow" src="'.$url.'" border="0" alt="'.$title.'" title="'.$title.'" style="margin-bottom: 5px;">';
|
||||
print '</a>';
|
||||
|
||||
print '<br>';
|
||||
print $subdir.' ('.dol_print_size(dol_filesize($dirtheme."/".$subdir), 1, 1).')';
|
||||
print '<br><a href="'.$_SERVER["PHP_SELF"].'?action=importsiteconfirm&website='.$website->ref.'&templateuserfile='.$subdir.'" class="button">'.$langs->trans("Load").'</a>';
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
print $subdir.' ('.dol_print_size(dol_filesize($dirtheme."/".$subdir), 1, 1).')';
|
||||
print '<br><a href="'.$_SERVER["PHP_SELF"].'?action=importsiteconfirm&website='.$website->ref.'&templateuserfile='.$subdir.'" class="button">'.$langs->trans("Load").'</a>';
|
||||
print '</div>';
|
||||
|
||||
$i++;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("None").'</span>';
|
||||
}
|
||||
|
||||
print '</div></td></tr></table>';
|
||||
|
||||
|
||||
@ -333,7 +333,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile)
|
||||
* @param array $events_array Array of events ("uid","startdate","summary","url","desc","author","category") or Array of WebsitePage
|
||||
* @param string $outputfile Output file
|
||||
* @param string $filter (optional) Filter
|
||||
* @param string $url Url
|
||||
* @param string $url Url (If empty, forge URL for agenda RSS export)
|
||||
* @return int < 0 if ko, Nb of events in file if ok
|
||||
*/
|
||||
function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filter = '', $url = '')
|
||||
@ -402,9 +402,10 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt
|
||||
$tmpevent['uid'] = $event->id;
|
||||
$tmpevent['startdate'] = $event->date_creation;
|
||||
$tmpevent['summary'] = $event->title;
|
||||
$tmpevent['url'] = $event->urlpage.'.php';
|
||||
$tmpevent['url'] = $event->fullpageurl ? $event->fullpageurl : $event->pageurl.'.php';
|
||||
$tmpevent['author'] = $event->author_alias ? $event->author_alias : 'unknown';
|
||||
//$tmpevent['category'] = '';
|
||||
$tmpevent['desc'] = $event->description;
|
||||
|
||||
$event = $tmpevent;
|
||||
}
|
||||
|
||||
@ -2321,7 +2321,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
print '</span>'; */
|
||||
|
||||
print '<div class="valignmiddle inline-block">';
|
||||
print '<a class="valignmiddle inline-block" href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.$this->numero.'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto($langs->trans("ClickToShowDescription"), $imginfo).'</a>';
|
||||
print '<a class="valignmiddle inline-block" href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.$this->numero.'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'</a>';
|
||||
print '</div><br>';
|
||||
|
||||
print '<div class="valignmiddle inline-block info-box-actions">';
|
||||
|
||||
@ -141,8 +141,11 @@ class CommActionRapport
|
||||
$hookmanager = new HookManager($this->db);
|
||||
}
|
||||
$hookmanager->initHooks(array('pdfgeneration'));
|
||||
$parameters = array('file'=>$file, 'outputlangs'=>$outputlangs);
|
||||
|
||||
global $action;
|
||||
$object = new stdClass();
|
||||
|
||||
$parameters = array('file'=>$file, 'outputlangs'=>$outputlangs);
|
||||
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
$pdf = pdf_getInstance($this->format);
|
||||
@ -171,7 +174,7 @@ class CommActionRapport
|
||||
|
||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
|
||||
$nbpage = $this->_pages($pdf, $outputlangs);
|
||||
$nbpage = $this->_pages($pdf, $outputlangs); // Write content
|
||||
|
||||
if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages();
|
||||
$pdf->Close();
|
||||
@ -258,21 +261,23 @@ class CommActionRapport
|
||||
|
||||
// Calculate height of text
|
||||
$text = '';
|
||||
if (!preg_match('/^'.preg_quote($obj->label).'/', $obj->note)) $text = $obj->label."\n";
|
||||
$text .= $obj->note;
|
||||
$text = dol_trunc(dol_htmlentitiesbr_decode($text), 150);
|
||||
if (!preg_match('/^'.preg_quote($obj->label, '/').'/', $obj->note)) $text = $obj->label."\n";
|
||||
$text .= dolGetFirstLineOfText(dol_string_nohtmltag($obj->note), 2);
|
||||
// Add status to text
|
||||
$text .= "\n";
|
||||
$status = dol_htmlentitiesbr_decode($eventstatic->getLibStatut(1, 1));
|
||||
$status = $outputlangs->trans("Status").': '.dol_htmlentitiesbr_decode($eventstatic->getLibStatut(1, 1));
|
||||
$text .= $status;
|
||||
if ($obj->fk_project > 0)
|
||||
{
|
||||
$projectstatic->fetch($obj->fk_project);
|
||||
$text .= ($status ? ' - ' : '').$outputlangs->transnoentitiesnoconv("Project").": ".dol_htmlentitiesbr_decode($projectstatic->getNomUrl(0, 'nolink'));
|
||||
if ($projectstatic->ref) {
|
||||
$text .= ($status ? ' - ' : '').$outputlangs->transnoentitiesnoconv("Project").": ".dol_htmlentitiesbr_decode($projectstatic->ref);
|
||||
}
|
||||
}
|
||||
|
||||
//print 'd'.$text; exit;
|
||||
$nboflines = dol_nboflines($text);
|
||||
|
||||
$heightlinemax = max(2 * $height, $nboflines * $height);
|
||||
// Check if there is enough space to print record
|
||||
if ((1 + $y + $heightlinemax) >= ($this->page_hauteur - $this->marge_haute))
|
||||
@ -294,12 +299,13 @@ class CommActionRapport
|
||||
else
|
||||
$textdate .= " -> ".dol_print_date($this->db->jdate($obj->dp2), "hour");
|
||||
}
|
||||
$pdf->MultiCell(22, $height, $textdate, 0, 'L', 0);
|
||||
$textdate = $outputlangs->trans("ID").' '.$obj->id.' - '.$textdate;
|
||||
$pdf->MultiCell(45 - $this->marge_gauche, $height, $textdate, 0, 'L', 0);
|
||||
$y0 = $pdf->GetY();
|
||||
|
||||
// Third party
|
||||
$pdf->SetXY(26, $y);
|
||||
$pdf->MultiCell(32, $height, dol_trunc($outputlangs->convToOutputCharset($obj->thirdparty), 32), 0, 'L', 0);
|
||||
$pdf->SetXY(45, $y);
|
||||
$pdf->MultiCell(28, $height, dol_trunc($outputlangs->convToOutputCharset($obj->thirdparty), 28), 0, 'L', 0);
|
||||
$y1 = $pdf->GetY();
|
||||
|
||||
// Action code
|
||||
@ -309,7 +315,7 @@ class CommActionRapport
|
||||
if ($code == 'AC_OTH') $code = 'AC_MANUAL';
|
||||
if ($code == 'AC_OTH_AUTO') $code = 'AC_AUTO';
|
||||
}
|
||||
$pdf->SetXY(60, $y);
|
||||
$pdf->SetXY(73, $y);
|
||||
$labelactiontype = $outputlangs->transnoentitiesnoconv("Action".$code);
|
||||
$labelactiontypeshort = $outputlangs->transnoentitiesnoconv("Action".$code.'Short');
|
||||
$pdf->MultiCell(32, $height, dol_trunc($outputlangs->convToOutputCharset($labelactiontypeshort == "Action".$code.'Short' ? $labelactiontype : $labelactiontypeshort), 32), 0, 'L', 0);
|
||||
@ -317,7 +323,7 @@ class CommActionRapport
|
||||
|
||||
// Description of event
|
||||
$pdf->SetXY(106, $y);
|
||||
$pdf->MultiCell(94, $height, $outputlangs->convToOutputCharset($text), 0, 'L', 0);
|
||||
$pdf->MultiCell(94, $height, $outputlangs->convToOutputCharset(dol_string_nohtmltag($text, 0)), 0, 'L', 0);
|
||||
$y3 = $pdf->GetY();
|
||||
|
||||
$i++;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2018 Francis Appels <francis.appels@z-application.com>
|
||||
* Copyright (C) 2019 Markus Welters <markus@welters.de>
|
||||
* Copyright (C) 2019 Rafael Ingenleuf <ingenleuf@welters.de>
|
||||
* Copyright (C) 2020 Marc Guenneugues <marc.guenneugues@simicar.fr>
|
||||
*
|
||||
* 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
|
||||
@ -348,13 +349,21 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$initialY = $tab_top + 7;
|
||||
$nexY = $tab_top + 7;
|
||||
|
||||
$showpricebeforepagebreak = 1;
|
||||
$pdf->setTopMargin($tab_top_newpage);
|
||||
// Loop on each lines
|
||||
for ($i = 0; $i < $nblines; $i++) {
|
||||
$pdf->SetFont('', '', $default_font_size - 2); // Into loop to work with multipage
|
||||
$i = 0;
|
||||
while ($i < $nblines) {
|
||||
$pdf->SetFont('', '', $default_font_size - 2); // Into loop to work with multipage
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$pdf->setTopMargin($tab_top_newpage);
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($showpricebeforepagebreak)) {
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||
} else {
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it.
|
||||
}
|
||||
|
||||
$pageposbefore = $pdf->getPage();
|
||||
$curY = $nexY;
|
||||
$pdf->startTransaction();
|
||||
@ -365,7 +374,28 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pdf->rollbackTransaction(true);
|
||||
$pageposafter = $pageposbefore;
|
||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($showpricebeforepagebreak)) {
|
||||
$pdf->AddPage('', '', true);
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
$showpricebeforepagebreak = 1;
|
||||
$nexY = $tab_top_newpage;
|
||||
$nexY += ($pdf->getFontSize() * 1.3); // Passe espace entre les lignes
|
||||
$pdf->SetFont('', '', $default_font_size - 2); // Into loop to work with multipage
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$pdf->setTopMargin($tab_top_newpage);
|
||||
continue;
|
||||
} else {
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter);
|
||||
$showpricebeforepagebreak = 0;
|
||||
}
|
||||
|
||||
$this->printLine($pdf, $object, $i, $curY, $default_font_size, $outputlangs, $hidedetails);
|
||||
$pageposafter = $pdf->getPage();
|
||||
$posyafter = $pdf->GetY();
|
||||
@ -394,6 +424,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
{
|
||||
$pdf->commitTransaction();
|
||||
}
|
||||
$i++;
|
||||
//nexY
|
||||
$nexY = $pdf->GetY();
|
||||
$pageposafter = $pdf->getPage();
|
||||
@ -423,6 +454,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
while ($pagenb < $pageposafter)
|
||||
{
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
|
||||
|
||||
@ -355,7 +355,24 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
||||
if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||
|
||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
// Set certificate
|
||||
$cert=empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT;
|
||||
// If use has no certificate, we try to take the company one
|
||||
if (!$cert) {
|
||||
$cert = empty($conf->global->CERTIFICATE_CRT) ? '' : $conf->global->CERTIFICATE_CRT;
|
||||
}
|
||||
// If a certificate is found
|
||||
if ($cert) {
|
||||
$info = array(
|
||||
'Name' => $this->emetteur->name,
|
||||
'Location' => getCountry($this->emetteur->country_code, 0),
|
||||
'Reason' => 'INVOICE',
|
||||
'ContactInfo' => $this->emetteur->email
|
||||
);
|
||||
$pdf->setSignature($cert, $cert, $this->emetteur->name, '', 2, $info);
|
||||
}
|
||||
|
||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
|
||||
// Set $this->atleastonediscount if you have at least one discount
|
||||
for ($i = 0; $i < $nblines; $i++)
|
||||
|
||||
@ -375,6 +375,23 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name));
|
||||
if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||
|
||||
// Set certificate
|
||||
$cert=empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT;
|
||||
// If use has no certificate, we try to take the company one
|
||||
if (!$cert) {
|
||||
$cert = empty($conf->global->CERTIFICATE_CRT) ? '' : $conf->global->CERTIFICATE_CRT;
|
||||
}
|
||||
// If a certificate is found
|
||||
if ($cert) {
|
||||
$info = array(
|
||||
'Name' => $this->emetteur->name,
|
||||
'Location' => getCountry($this->emetteur->country_code, 0),
|
||||
'Reason' => 'INVOICE',
|
||||
'ContactInfo' => $this->emetteur->email
|
||||
);
|
||||
$pdf->setSignature($cert, $cert, $this->emetteur->name, '', 2, $info);
|
||||
}
|
||||
|
||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
|
||||
// Does we have at least one line with discount $this->atleastonediscount
|
||||
@ -759,16 +776,15 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$parameters = array(
|
||||
'object' => $object,
|
||||
'i' => $i,
|
||||
'pdf' =>& $pdf,
|
||||
'curY' =>& $curY,
|
||||
'nexY' =>& $nexY,
|
||||
'pdf' => &$pdf,
|
||||
'curY' => &$curY,
|
||||
'nexY' => &$nexY,
|
||||
'outputlangs' => $outputlangs,
|
||||
'hidedetails' => $hidedetails
|
||||
);
|
||||
$reshook = $hookmanager->executeHooks('printPDFline', $parameters, $this); // Note that $object may have been modified by hook
|
||||
|
||||
|
||||
|
||||
$sign = 1;
|
||||
if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1;
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
@ -1249,7 +1265,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
*/
|
||||
protected function drawTotalTable(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||
{
|
||||
global $conf, $mysoc;
|
||||
global $conf, $mysoc, $hookmanager;
|
||||
|
||||
$sign = 1;
|
||||
if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1;
|
||||
@ -1278,16 +1294,22 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
||||
}
|
||||
|
||||
// Add trigger to allow to edit $object
|
||||
$parameters = array(
|
||||
'object' => &$object,
|
||||
'outputlangs' => $outputlangs,
|
||||
);
|
||||
$hookmanager->executeHooks('beforePercentCalculation', $parameters, $this); // Note that $object may have been modified by hook
|
||||
|
||||
// overall percentage of advancement
|
||||
$percent = 0;
|
||||
$i = 0;
|
||||
foreach ($object->lines as $line)
|
||||
{
|
||||
if (!class_exists('TSubtotal') || !TSubtotal::isModSubtotalLine($line)) {
|
||||
$percent += $line->situation_percent;
|
||||
$i++;
|
||||
}
|
||||
$percent += $line->situation_percent;
|
||||
$i++;
|
||||
}
|
||||
|
||||
if (!empty($i)) {
|
||||
$avancementGlobal = $percent / $i;
|
||||
}
|
||||
@ -1316,7 +1338,6 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$total_a_payer_ttc = 0;
|
||||
}
|
||||
|
||||
$deja_paye = 0;
|
||||
$i = 1;
|
||||
if (!empty($TPreviousIncoice)) {
|
||||
$pdf->setY($tab2_top);
|
||||
@ -1348,7 +1369,6 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, $displayAmount, 0, 'R', 1);
|
||||
|
||||
$i++;
|
||||
$deja_paye += $fac->total_ht;
|
||||
$posy += $tab2_hl;
|
||||
|
||||
$pdf->setY($posy);
|
||||
@ -1675,7 +1695,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities('SituationTotalRayToRest'), 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_a_payer_ttc-$deja_paye, 0, $outputlangs), 0, 'R', 1);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_a_payer_ttc-$deja_regle, 0, $outputlangs), 0, 'R', 1);
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ class modDynamicPrices extends DolibarrModules
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
// Name of image file used for this module.
|
||||
$this->picto = 'technic';
|
||||
$this->picto = 'dynamicprice';
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
|
||||
@ -102,7 +102,7 @@ class modExpenseReport extends DolibarrModules
|
||||
$r++;
|
||||
|
||||
// Array to add new pages in new tabs
|
||||
$this->tabs[] = array('data'=>'user:+expensereport:ExpenseReport:expensereport:$user->rights->expensereport->lire:/expensereport/list.php?mainmenu=hrm&id=__ID__');
|
||||
$this->tabs[] = array();
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array(); // List of boxes
|
||||
|
||||
@ -57,7 +57,7 @@ class modProductBatch extends DolibarrModules
|
||||
// Key used in llx_const table to save module status enabled/disabled (where dluo is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
|
||||
$this->picto = 'stock';
|
||||
$this->picto = 'lot';
|
||||
|
||||
$this->module_parts = array();
|
||||
|
||||
|
||||
@ -451,6 +451,7 @@ class modSociete extends DolibarrModules
|
||||
's.fk_multicurrency' => 'MulticurrencyUsed',
|
||||
's.multicurrency_code' => 'MulticurrencyCurrency'
|
||||
);
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES)) $this->import_fields_array[$r]['s.price_level']='PriceLevel';
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@ -158,11 +158,11 @@ class modWebsite extends DolibarrModules
|
||||
$this->remove($options);
|
||||
|
||||
// Copy flags and octicons directory
|
||||
$dirarray = array('common/flags', 'common/octicons');
|
||||
foreach ($dirarray as $dir)
|
||||
$dirarray = array('common/flags'=>'flags', 'common/octicons/build/svg'=>'octicons');
|
||||
foreach ($dirarray as $dirfrom => $dirtarget)
|
||||
{
|
||||
$src = DOL_DOCUMENT_ROOT.'/theme/'.$dir;
|
||||
$dest = DOL_DATA_ROOT.'/medias/image/'.$dir;
|
||||
$src = DOL_DOCUMENT_ROOT.'/theme/'.$dirfrom;
|
||||
$dest = DOL_DATA_ROOT.'/medias/image/'.$dirtarget;
|
||||
|
||||
if (is_dir($src))
|
||||
{
|
||||
|
||||
@ -188,11 +188,9 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
||||
|
||||
|
||||
// Send email to notification email
|
||||
|
||||
$sendto = $conf->global->TICKET_NOTIFICATION_EMAIL_TO;
|
||||
if (!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) && empty($object->context['disableticketemail']))
|
||||
{
|
||||
$sendto = $conf->global->TICKET_NOTIFICATION_EMAIL_TO;
|
||||
|
||||
if ($sendto)
|
||||
{
|
||||
// Init to avoid errors
|
||||
|
||||
@ -2553,7 +2553,7 @@ elseif ($id || $ref)
|
||||
|
||||
// This is just to generate a delivery receipt
|
||||
//var_dump($object->linkedObjectsIds['delivery']);
|
||||
if ($conf->livraison_bon->enabled && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED) && $user->rights->expedition->livraison->creer && count($object->linkedObjectsIds['delivery']) == 0)
|
||||
if ($conf->livraison_bon->enabled && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED) && $user->rights->expedition->livraison->creer && empty($object->linkedObjectsIds['delivery']))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create_delivery">'.$langs->trans("CreateDeliveryOrder").'</a>';
|
||||
}
|
||||
|
||||
@ -451,7 +451,7 @@ class Shipments extends DolibarrApi
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->shipment->supprimer) {
|
||||
if (!DolibarrApiAccess::$user->rights->expedition->supprimer) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
$result = $this->shipment->fetch($id);
|
||||
|
||||
@ -373,7 +373,6 @@ if ($resql)
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="'.($action == 'edit' ? 'update' : 'list').'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
@ -477,7 +476,7 @@ if ($resql)
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewTrip'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expensereport/card.php?action=create');
|
||||
}
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'trip', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'trip', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
}
|
||||
|
||||
$topicmail = "SendExpenseReport";
|
||||
|
||||
@ -329,12 +329,11 @@ if ($resql)
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "Information";
|
||||
$modelmail = "intervention";
|
||||
|
||||
@ -671,12 +671,12 @@ if ($resql)
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "SendOrderRef";
|
||||
$modelmail = "order_supplier_send";
|
||||
|
||||
@ -327,8 +327,6 @@ if ($action == 'create' && !$error) {
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n";
|
||||
print '<input name="ref" type="hidden" value="provisoire">';
|
||||
print '<input name="ref_client" type="hidden" value="'.$ref_client.'">';
|
||||
print '<input name="ref_int" type="hidden" value="'.$ref_int.'">';
|
||||
print '<input type="hidden" name="origin" value="'.GETPOST('origin').'">';
|
||||
print '<input type="hidden" name="originid" value="'.GETPOST('originid').'">';
|
||||
print '<input type="hidden" name="socid" value="'.$soc->id.'">';
|
||||
|
||||
@ -523,11 +523,10 @@ if ($resql)
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
|
||||
print_barre_liste($langs->trans("BillsSuppliers").($socid ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($langs->trans("BillsSuppliers").($socid ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "SendBillRef";
|
||||
$modelmail = "invoice_supplier_send";
|
||||
|
||||
@ -391,7 +391,6 @@ if ($resql)
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="'.($action == 'edit' ? 'update' : 'list').'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
@ -441,7 +440,7 @@ if ($resql)
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=request');
|
||||
}
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_hrm', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_hrm', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
}
|
||||
|
||||
$topicmail = "Information";
|
||||
|
||||
@ -508,7 +508,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||
$dashboardlines = array_merge($dashboardlines, $hookmanager->resArray);
|
||||
}
|
||||
|
||||
/* grouping dashboard stats */
|
||||
/* Open object dashboard */
|
||||
$dashboardgroup = array(
|
||||
'action' =>
|
||||
array(
|
||||
@ -573,7 +573,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||
'ticket' =>
|
||||
array(
|
||||
'groupName' => 'Tickets',
|
||||
'globalStatsKey' => 'OpenTickets',
|
||||
'globalStatsKey' => 'ticket',
|
||||
'stats' =>
|
||||
array('ticket_opened'),
|
||||
),
|
||||
@ -719,7 +719,6 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$openedDashBoard .= '<div class="box-flex-item">'."\n";
|
||||
$openedDashBoard .= ' <div class="info-box '.$openedDashBoardSize.'">'."\n";
|
||||
$openedDashBoard .= ' <span class="info-box-icon bg-infoxbox-'.$groupKeyLowerCase.'">'."\n";
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- 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
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_societe_log
|
||||
(
|
||||
id integer AUTO_INCREMENT PRIMARY KEY,
|
||||
datel datetime,
|
||||
fk_soc integer, -- Ne pas mettre de controle d'integrite sur les tables de logs
|
||||
fk_statut integer, -- Ne pas mettre de controle d'integrite sur les tables de logs
|
||||
fk_user integer, -- Ne pas mettre de controle d'integrite sur les tables de logs
|
||||
author varchar(30),
|
||||
label varchar(128)
|
||||
)ENGINE=innodb;
|
||||
@ -477,6 +477,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
|
||||
'MAIN_MODULE_DON'=>'newboxdefonly',
|
||||
'MAIN_MODULE_ECM'=>'newboxdefonly',
|
||||
'MAIN_MODULE_EXTERNALSITE'=>'newboxdefonly',
|
||||
'MAIN_MODULE_EXPENSEREPORT'=>'newboxdefonly',
|
||||
'MAIN_MODULE_FACTURE'=>'newboxdefonly',
|
||||
'MAIN_MODULE_FOURNISSEUR'=>'newboxdefonly',
|
||||
'MAIN_MODULE_HOLIDAY'=>'newboxdefonly',
|
||||
@ -4697,6 +4698,16 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
|
||||
$mod->init($reloadmode);
|
||||
}
|
||||
}
|
||||
elseif ($moduletoreload == 'MAIN_MODULE_EXPENSEREPORT')
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Expense Report module");
|
||||
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modExpenseReport.class.php';
|
||||
if ($res) {
|
||||
$mod = new modExpenseReport($db);
|
||||
//$mod->remove('noboxes');
|
||||
$mod->init($reloadmode);
|
||||
}
|
||||
}
|
||||
elseif ($moduletoreload == 'MAIN_MODULE_DON') // Permission has changed into 3.0
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Don module");
|
||||
|
||||
@ -199,7 +199,7 @@ FeatureDisabledInDemo=Feature disabled in demo
|
||||
FeatureAvailableOnlyOnStable=Feature only available on official stable versions
|
||||
BoxesDesc=Widgets are components showing some information that you can add to personalize some pages. You can choose between showing the widget or not by selecting target page and clicking 'Activate', or by clicking the trashcan to disable it.
|
||||
OnlyActiveElementsAreShown=Only elements from <a href="%s">enabled modules</a> are shown.
|
||||
ModulesDesc=The modules/applications determine which features are available in the software. Some modules require permissions to be granted to users after activating the module. Click the on/off button (at end of module line) to enable/disable a module/application.
|
||||
ModulesDesc=The modules/applications determine which features are available in the software. Some modules require permissions to be granted to users after activating the module. Click the on/off button <span class="small valignmiddle">%s</span> of each module to enable or disable a module/application.
|
||||
ModulesMarketPlaceDesc=You can find more modules to download on external websites on the Internet...
|
||||
ModulesDeployDesc=If permissions on your file system allow it, you can use this tool to deploy an external module. The module will then be visible on the tab <strong>%s</strong>.
|
||||
ModulesMarketPlaces=Find external app/modules
|
||||
@ -447,7 +447,8 @@ KeepEmptyToUseDefault=Keep empty to use default value
|
||||
DefaultLink=Default link
|
||||
SetAsDefault=Set as default
|
||||
ValueOverwrittenByUserSetup=Warning, this value may be overwritten by user specific setup (each user can set his own clicktodial url)
|
||||
ExternalModule=External module - Installed into directory %s
|
||||
ExternalModule=External module
|
||||
InstalledInto=Installed into directory %s
|
||||
BarcodeInitForthird-parties=Mass barcode init for third-parties
|
||||
BarcodeInitForProductsOrServices=Mass barcode init or reset for products or services
|
||||
CurrentlyNWithoutBarCode=Currently, you have <strong>%s</strong> record on <strong>%s</strong> %s without barcode defined.
|
||||
@ -948,7 +949,7 @@ DictionaryCanton=States/Provinces
|
||||
DictionaryRegion=Regions
|
||||
DictionaryCountry=Countries
|
||||
DictionaryCurrency=Currencies
|
||||
DictionaryCivility=Title of civility
|
||||
DictionaryCivility=Honorific titles
|
||||
DictionaryActions=Types of agenda events
|
||||
DictionarySocialContributions=Types of social or fiscal taxes
|
||||
DictionaryVAT=VAT Rates or Sales Tax Rates
|
||||
@ -1990,3 +1991,5 @@ EmailTemplate=Template for email
|
||||
EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax
|
||||
PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF.
|
||||
FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book.
|
||||
RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard
|
||||
JumpToBoxes=Jump to Setup -> Widgets
|
||||
|
||||
@ -58,8 +58,8 @@ SuppliersInvoices=Vendors invoices
|
||||
SupplierBill=Vendor invoice
|
||||
SupplierBills=suppliers invoices
|
||||
Payment=Payment
|
||||
PaymentBack=Payment back
|
||||
CustomerInvoicePaymentBack=Payment back
|
||||
PaymentBack=Refund
|
||||
CustomerInvoicePaymentBack=Refund
|
||||
Payments=Payments
|
||||
PaymentsBack=Refunds
|
||||
paymentInInvoiceCurrency=in invoices currency
|
||||
|
||||
@ -34,7 +34,7 @@ GraphInBarsAreLimitedToNMeasures=Grapics are limited to %s measures in 'Bars' mo
|
||||
OnlyOneFieldForXAxisIsPossible=Only 1 field is currently possible as X-Axis. Only the first selected field has been selected.
|
||||
AtLeastOneMeasureIsRequired=At least 1 field for measure is required
|
||||
AtLeastOneXAxisIsRequired=At least 1 field for X-Axis is required
|
||||
|
||||
LatestBlogPosts=Latest Blog Posts
|
||||
Notify_ORDER_VALIDATE=Sales order validated
|
||||
Notify_ORDER_SENTBYMAIL=Sales order sent by mail
|
||||
Notify_ORDER_SUPPLIER_SENTBYMAIL=Purchase order sent by email
|
||||
|
||||
@ -165,11 +165,9 @@ if ($resql)
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
|
||||
print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ $staticmo = new Mo($db);
|
||||
|
||||
llxHeader('', $langs->trans("MRP"), '');
|
||||
|
||||
print load_fiche_titre($langs->trans("MRPArea"), '', 'cubes');
|
||||
print load_fiche_titre($langs->trans("MRPArea"), '', 'mrp');
|
||||
|
||||
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
@ -203,7 +203,7 @@ jQuery(document).ready(function() {
|
||||
// Part to create
|
||||
if ($action == 'create')
|
||||
{
|
||||
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Mo")), '', 'cubes');
|
||||
print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Mo")), '', 'mrp');
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
@ -306,7 +306,7 @@ if ($action == 'create')
|
||||
// Part to edit record
|
||||
if (($id || $ref) && $action == 'edit')
|
||||
{
|
||||
print load_fiche_titre($langs->trans("MO"), '', 'cubes');
|
||||
print load_fiche_titre($langs->trans("MO"), '', 'mrp');
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
@ -356,12 +356,11 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/mrp/mo_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cubes', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'mrp', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
$topicmail = "SendMoRef";
|
||||
|
||||
@ -250,12 +250,11 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewSurvey'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/opensurvey/wizard/index.php', '', $user->rights->opensurvey->write);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
$topicmail = "SendOpenSurveyRef";
|
||||
|
||||
@ -31,7 +31,7 @@ $statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOn
|
||||
<!-- BEGIN PHP TEMPLATE -->
|
||||
|
||||
<?php
|
||||
print load_fiche_titre($langs->trans("NewProduct"), '', 'products');
|
||||
print load_fiche_titre($langs->trans("NewProduct"), '', 'product');
|
||||
dol_fiche_head('');
|
||||
?>
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ $statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOn
|
||||
<!-- BEGIN PHP TEMPLATE CREATE.TPL -->
|
||||
|
||||
<?php
|
||||
print load_fiche_titre($langs->trans("NewService"), '', 'products');
|
||||
print load_fiche_titre($langs->trans("NewService"), '', 'service');
|
||||
dol_fiche_head('');
|
||||
?>
|
||||
|
||||
|
||||
@ -971,10 +971,16 @@ else
|
||||
print '<input type="hidden" name="barcode_auto" value="1">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
|
||||
if ($type == 1) $title = $langs->trans("NewService");
|
||||
else $title = $langs->trans("NewProduct");
|
||||
if ($type == 1) {
|
||||
$picto = 'service';
|
||||
$title = $langs->trans("NewService");
|
||||
}
|
||||
else {
|
||||
$picto = 'product';
|
||||
$title = $langs->trans("NewProduct");
|
||||
}
|
||||
$linkback = "";
|
||||
print load_fiche_titre($title, $linkback, 'products');
|
||||
print load_fiche_titre($title, $linkback, $picto);
|
||||
|
||||
dol_fiche_head('');
|
||||
|
||||
|
||||
@ -3598,11 +3598,11 @@ class Product extends CommonObject
|
||||
// phpcs:enable
|
||||
global $conf, $user;
|
||||
|
||||
$sql = "SELECT sum(c.qty), date_format(c.date_valid, '%Y%m')";
|
||||
$sql = "SELECT sum(d.qty), date_format(d.date_valid, '%Y%m')";
|
||||
if ($mode == 'bynumber') {
|
||||
$sql .= ", count(DISTINCT c.rowid)";
|
||||
}
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."mrp_mo as c LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."mrp_mo as d LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON d.fk_soc = s.rowid";
|
||||
if ($filteronproducttype >= 0) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."product as p";
|
||||
}
|
||||
@ -3610,27 +3610,27 @@ class Product extends CommonObject
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
}
|
||||
|
||||
$sql .= " WHERE c.entity IN (".getEntity('mo').")";
|
||||
$sql .= " AND c.status > 0";
|
||||
$sql .= " WHERE d.entity IN (".getEntity('mo').")";
|
||||
$sql .= " AND d.status > 0";
|
||||
|
||||
if ($this->id > 0) {
|
||||
$sql .= " AND c.fk_product =".$this->id;
|
||||
$sql .= " AND d.fk_product =".$this->id;
|
||||
} else {
|
||||
$sql .= " AND c.fk_product > 0";
|
||||
$sql .= " AND d.fk_product > 0";
|
||||
}
|
||||
if ($filteronproducttype >= 0) {
|
||||
$sql .= " AND p.rowid = c.fk_product AND p.fk_product_type =".$filteronproducttype;
|
||||
$sql .= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype;
|
||||
}
|
||||
|
||||
if (!$user->rights->societe->client->voir && !$socid) {
|
||||
$sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
$sql .= " AND d.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
}
|
||||
if ($socid > 0) {
|
||||
$sql .= " AND c.fk_soc = ".$socid;
|
||||
$sql .= " AND d.fk_soc = ".$socid;
|
||||
}
|
||||
$sql .= $morefilter;
|
||||
$sql .= " GROUP BY date_format(c.date_valid,'%Y%m')";
|
||||
$sql .= " ORDER BY date_format(c.date_valid,'%Y%m') DESC";
|
||||
$sql .= " GROUP BY date_format(d.date_valid,'%Y%m')";
|
||||
$sql .= " ORDER BY date_format(d.date_valid,'%Y%m') DESC";
|
||||
|
||||
return $this->_get_stats($sql, $mode, $year);
|
||||
}
|
||||
@ -4415,9 +4415,9 @@ class Product extends CommonObject
|
||||
if ($maxlength) { $newref = dol_trunc($newref, $maxlength, 'middle');
|
||||
}
|
||||
|
||||
if ($this->type == Product::TYPE_PRODUCT) { $label = '<u>'.$langs->trans("ShowProduct").'</u>';
|
||||
if ($this->type == Product::TYPE_PRODUCT) { $label = '<u>'.$langs->trans("Product").'</u>';
|
||||
}
|
||||
if ($this->type == Product::TYPE_SERVICE) { $label = '<u>'.$langs->trans("ShowService").'</u>';
|
||||
if ($this->type == Product::TYPE_SERVICE) { $label = '<u>'.$langs->trans("Service").'</u>';
|
||||
}
|
||||
if (!empty($this->ref)) {
|
||||
$label .= '<br><b>'.$langs->trans('ProductRef').':</b> '.$this->ref;
|
||||
|
||||
@ -77,7 +77,7 @@ if ((isset($_GET["type"]) && $_GET["type"] == 1) || empty($conf->product->enable
|
||||
llxHeader("", $langs->trans("ProductsAndServices"), $helpurl);
|
||||
|
||||
$linkback = "";
|
||||
print load_fiche_titre($transAreaType, $linkback, 'products');
|
||||
print load_fiche_titre($transAreaType, $linkback, 'product');
|
||||
|
||||
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
@ -148,7 +148,7 @@ jQuery(document).ready(function() {
|
||||
// Part to create
|
||||
if ($action == 'create')
|
||||
{
|
||||
print load_fiche_titre($langs->trans("NewInventory"), '', 'products');
|
||||
print load_fiche_titre($langs->trans("NewInventory"), '', 'product');
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
@ -183,7 +183,7 @@ if ($action == 'create')
|
||||
// Part to edit record
|
||||
if (($id || $ref) && $action == 'edit')
|
||||
{
|
||||
print load_fiche_titre($langs->trans("Inventory"), '', 'products');
|
||||
print load_fiche_titre($langs->trans("Inventory"), '', 'product');
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
@ -322,7 +322,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/inventory/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'products', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'product', 0, $newcardbutton, '', $limit);
|
||||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
$topicmail = "Information";
|
||||
|
||||
@ -540,7 +540,10 @@ if ($resql)
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
if (empty($arrayfields['p.fk_product_type']['checked'])) print '<input type="hidden" name="search_type" value="'.dol_escape_htmltag($search_type).'">';
|
||||
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'products', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
$picto = 'product';
|
||||
if ($type == 1) $picto = 'service';
|
||||
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$topicmail = "Information";
|
||||
$modelmail = "product";
|
||||
|
||||
@ -76,7 +76,7 @@ $title = $langs->trans("Statistics");
|
||||
|
||||
llxHeader('', $title, $helpurl);
|
||||
|
||||
print load_fiche_titre($title, $mesg, 'products');
|
||||
print load_fiche_titre($title, $mesg, 'product');
|
||||
|
||||
|
||||
$param = '';
|
||||
|
||||
@ -76,7 +76,7 @@ $title = $langs->trans("Statistics");
|
||||
|
||||
llxHeader('', $title, $helpurl);
|
||||
|
||||
print load_fiche_titre($title, $mesg, 'products');
|
||||
print load_fiche_titre($title, $mesg, 'product');
|
||||
|
||||
|
||||
$param = '';
|
||||
|
||||
@ -219,7 +219,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'products', 0, '', '', $limit);
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'product', 0, '', '', $limit);
|
||||
|
||||
if (!empty($catid))
|
||||
{
|
||||
|
||||
@ -233,7 +233,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'products', 0, '', '', $limit);
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'product', 0, '', '', $limit);
|
||||
|
||||
|
||||
if (!empty($catid))
|
||||
|
||||
@ -104,7 +104,10 @@ if (!$id && empty($ref))
|
||||
$title = $langs->trans("Statistics");
|
||||
}
|
||||
|
||||
print load_fiche_titre($title, $mesg, 'products');
|
||||
$picto = 'product';
|
||||
if ($type == 1) $picto = 'service';
|
||||
|
||||
print load_fiche_titre($title, $mesg, $picto);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -248,7 +248,7 @@ llxHeader("", $langs->trans("WarehouseCard"), $help_url);
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
print load_fiche_titre($langs->trans("NewWarehouse"));
|
||||
print load_fiche_titre($langs->trans("NewWarehouse"), '', 'stock');
|
||||
|
||||
dol_set_focus('input[name="libelle"]');
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ class Productlot extends CommonObject
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
public $picto = 'barcode';
|
||||
public $picto = 'lot';
|
||||
|
||||
/**
|
||||
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
@ -50,7 +50,7 @@ $warehouse = new Entrepot($db);
|
||||
$help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks';
|
||||
llxHeader("", $langs->trans("Stocks"), $help_url);
|
||||
|
||||
print load_fiche_titre($langs->trans("StocksArea"));
|
||||
print load_fiche_titre($langs->trans("StocksArea"), '', 'stock');
|
||||
|
||||
|
||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||
|
||||
@ -360,7 +360,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('MenuNewWarehouse'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/stock/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $user->rights->stock->creer);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'stock', 0, $newcardbutton, '', $limit);
|
||||
|
||||
// Add code for pre mass action (confirmation or email presend form)
|
||||
$topicmail = "Information";
|
||||
|
||||
@ -323,7 +323,7 @@ $title = $langs->trans('MassMovement');
|
||||
|
||||
llxHeader('', $title);
|
||||
|
||||
print load_fiche_titre($langs->trans("MassStockTransferShort"));
|
||||
print load_fiche_titre($langs->trans("MassStockTransferShort"), '', 'stock');
|
||||
|
||||
$titletoadd = $langs->trans("Select");
|
||||
$buttonrecord = $langs->trans("RecordMovement");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user