Merge remote-tracking branch 'Upstream/develop' into develop-accounting
This commit is contained in:
commit
7cc3fe9c95
@ -16,12 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/admin/fiscalyear.php
|
* \file htdocs/accountancy/admin/fiscalyear.php
|
||||||
* \ingroup fiscal year
|
* \ingroup fiscal year
|
||||||
* \brief Setup page to configure fiscal year
|
* \brief Setup page to configure fiscal year
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
|
||||||
@ -55,6 +55,8 @@ $object = new Fiscalyear($db);
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$max=100;
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
llxHeader('',$title);
|
llxHeader('',$title);
|
||||||
@ -68,9 +70,6 @@ $sql.= " FROM ".MAIN_DB_PREFIX."accounting_fiscalyear as f";
|
|||||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
$max=10;
|
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$var=false;
|
$var=false;
|
||||||
@ -85,7 +84,7 @@ if ($result)
|
|||||||
print '<td>'.$langs->trans("Label").'</td>';
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
print '<td>'.$langs->trans("DateStart").'</td>';
|
print '<td>'.$langs->trans("DateStart").'</td>';
|
||||||
print '<td>'.$langs->trans("DateEnd").'</td>';
|
print '<td>'.$langs->trans("DateEnd").'</td>';
|
||||||
print '<td>'.$langs->trans("Statut").'</td>';
|
print '<td align="right">'.$langs->trans("Statut").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if ($num)
|
if ($num)
|
||||||
@ -102,7 +101,7 @@ if ($result)
|
|||||||
print '<td align="left">'.$obj->label.'</td>';
|
print '<td align="left">'.$obj->label.'</td>';
|
||||||
print '<td align="left">'.dol_print_date($db->jdate($obj->date_start),'day').'</td>';
|
print '<td align="left">'.dol_print_date($db->jdate($obj->date_start),'day').'</td>';
|
||||||
print '<td align="left">'.dol_print_date($db->jdate($obj->date_end),'day').'</td>';
|
print '<td align="left">'.dol_print_date($db->jdate($obj->date_end),'day').'</td>';
|
||||||
print '<td>'.$fiscalyearstatic->LibStatut($obj->statut,5).'</td>';
|
print '<td align="right">'.$fiscalyearstatic->LibStatut($obj->statut,5).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
$i++;
|
$i++;
|
||||||
@ -115,7 +114,6 @@ if ($result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</form>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -16,11 +16,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/admin/fiscalyear_card.php
|
* \file htdocs/accountancy/admin/fiscalyear_card.php
|
||||||
* \brief Page to show a fiscal year
|
* \brief Page to show a fiscal year
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php';
|
||||||
@ -51,6 +51,7 @@ $object = new Fiscalyear($db);
|
|||||||
$date_start=dol_mktime(0,0,0,GETPOST('fiscalyearmonth','int'),GETPOST('fiscalyearday','int'),GETPOST('fiscalyearyear','int'));
|
$date_start=dol_mktime(0,0,0,GETPOST('fiscalyearmonth','int'),GETPOST('fiscalyearday','int'),GETPOST('fiscalyearyear','int'));
|
||||||
$date_end=dol_mktime(0,0,0,GETPOST('fiscalyearendmonth','int'),GETPOST('fiscalyearendday','int'),GETPOST('fiscalyearendyear','int'));
|
$date_end=dol_mktime(0,0,0,GETPOST('fiscalyearendmonth','int'),GETPOST('fiscalyearendday','int'),GETPOST('fiscalyearendyear','int'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -75,8 +76,6 @@ else if ($action == 'add')
|
|||||||
{
|
{
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$db->begin();
|
|
||||||
|
|
||||||
$object->date_start = $date_start;
|
$object->date_start = $date_start;
|
||||||
$object->date_end = $date_end;
|
$object->date_end = $date_end;
|
||||||
$object->label = GETPOST('label','alpha');
|
$object->label = GETPOST('label','alpha');
|
||||||
@ -96,15 +95,21 @@ else if ($action == 'add')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
$id = $object->create($user);
|
$id = $object->create($user);
|
||||||
|
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
|
$db->commit();
|
||||||
|
|
||||||
header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
|
header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$db->rollback();
|
||||||
|
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessage($object->error, 'errors');
|
||||||
$action='create';
|
$action='create';
|
||||||
}
|
}
|
||||||
@ -207,10 +212,10 @@ else if ($id)
|
|||||||
{
|
{
|
||||||
$head = fiscalyear_prepare_head($object);
|
$head = fiscalyear_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron');
|
|
||||||
|
|
||||||
if ($action == 'edit')
|
if ($action == 'edit')
|
||||||
{
|
{
|
||||||
|
dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron');
|
||||||
|
|
||||||
print '<form name="update" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
print '<form name="update" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
@ -252,7 +257,7 @@ else if ($id)
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print '</div>';
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -265,6 +270,8 @@ else if ($id)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/fiscalyear.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/fiscalyear.php">'.$langs->trans("BackToList").'</a>';
|
||||||
@ -300,9 +307,9 @@ else if ($id)
|
|||||||
// Statut
|
// Statut
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">'.$object->getLibStatut(4).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">'.$object->getLibStatut(4).'</td></tr>';
|
||||||
|
|
||||||
print "</table><br>";
|
print "</table>";
|
||||||
|
|
||||||
print '</div>';
|
dol_fiche_end();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Barre d'actions
|
* Barre d'actions
|
||||||
@ -16,11 +16,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/admin/fiscalyear_card.php
|
* \file htdocs/accountancy/admin/fiscalyear_card.php
|
||||||
* \brief Page to show info of a fiscal year
|
* \brief Page to show info of a fiscal year
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
@ -55,6 +55,10 @@ $contactid=GETPOST('contactid','int');
|
|||||||
$origin=GETPOST('origin','alpha');
|
$origin=GETPOST('origin','alpha');
|
||||||
$originid=GETPOST('originid','int');
|
$originid=GETPOST('originid','int');
|
||||||
|
|
||||||
|
$fulldayevent=GETPOST('fullday');
|
||||||
|
$datep=dol_mktime($fulldayevent?'00':GETPOST("aphour"), $fulldayevent?'00':GETPOST("apmin"), 0, GETPOST("apmonth"), GETPOST("apday"), GETPOST("apyear"));
|
||||||
|
$datef=dol_mktime($fulldayevent?'23':GETPOST("p2hour"), $fulldayevent?'59':GETPOST("p2min"), $fulldayevent?'59':'0', GETPOST("p2month"), GETPOST("p2day"), GETPOST("p2year"));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid','int');
|
$socid = GETPOST('socid','int');
|
||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
@ -63,6 +67,7 @@ $result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions|
|
|||||||
if ($user->societe_id && $socid) $result = restrictedArea($user,'societe',$socid);
|
if ($user->societe_id && $socid) $result = restrictedArea($user,'societe',$socid);
|
||||||
|
|
||||||
$error=GETPOST("error");
|
$error=GETPOST("error");
|
||||||
|
$donotclearsession=0;
|
||||||
|
|
||||||
$cactioncomm = new CActionComm($db);
|
$cactioncomm = new CActionComm($db);
|
||||||
$object = new ActionComm($db);
|
$object = new ActionComm($db);
|
||||||
@ -82,6 +87,19 @@ $hookmanager->initHooks(array('actioncard'));
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (GETPOST('addassignedtouser'))
|
||||||
|
{
|
||||||
|
// Add a new user
|
||||||
|
if (GETPOST('affectedto') > 0)
|
||||||
|
{
|
||||||
|
$assignedtouser=array();
|
||||||
|
if (!empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true);
|
||||||
|
$assignedtouser[GETPOST('affectedto')]=array('transparency'=>GETPOST('transparency'),'mandatory'=>1);
|
||||||
|
$_SESSION['assignedtouser']=dol_json_encode($assignedtouser);
|
||||||
|
}
|
||||||
|
$donotclearsession=1;
|
||||||
|
$action='create';
|
||||||
|
}
|
||||||
// Add action
|
// Add action
|
||||||
if ($action == 'add_action')
|
if ($action == 'add_action')
|
||||||
{
|
{
|
||||||
@ -104,12 +122,11 @@ if ($action == 'add_action')
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fulldayevent=GETPOST('fullday');
|
|
||||||
$percentage=in_array(GETPOST('status'),array(-1,100))?GETPOST('status'):GETPOST("percentage"); // If status is -1 or 100, percentage is not defined and we must use status
|
$percentage=in_array(GETPOST('status'),array(-1,100))?GETPOST('status'):GETPOST("percentage"); // If status is -1 or 100, percentage is not defined and we must use status
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$datep=dol_mktime($fulldayevent?'00':$_POST["aphour"], $fulldayevent?'00':$_POST["apmin"], 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]);
|
$datep=dol_mktime($fulldayevent?'00':GETPOST("aphour"), $fulldayevent?'00':GETPOST("apmin"), 0, GETPOST("apmonth"), GETPOST("apday"), GETPOST("apyear"));
|
||||||
$datef=dol_mktime($fulldayevent?'23':$_POST["p2hour"], $fulldayevent?'59':$_POST["p2min"], $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]);
|
$datef=dol_mktime($fulldayevent?'23':GETPOST("p2hour"), $fulldayevent?'59':GETPOST("p2min"), $fulldayevent?'59':'0', GETPOST("p2month"), GETPOST("p2day"), GETPOST("p2year"));
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (! $datef && $percentage == 100)
|
if (! $datef && $percentage == 100)
|
||||||
@ -519,15 +536,16 @@ if ($action == 'create')
|
|||||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked="checked"':'').'></td></tr>';
|
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked="checked"':'').'></td></tr>';
|
||||||
|
|
||||||
// Date start
|
// Date start
|
||||||
$datep=$object->datep;
|
$datep=($datep?$datep:$object->datep);
|
||||||
if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0);
|
if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0);
|
||||||
print '<tr><td width="30%" class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").'</span></td><td>';
|
print '<tr><td width="30%" class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").'</span></td><td>';
|
||||||
if (GETPOST("afaire") == 1) $form->select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend');
|
if (GETPOST("afaire") == 1) $form->select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend');
|
||||||
else if (GETPOST("afaire") == 2) $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend');
|
else if (GETPOST("afaire") == 2) $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||||
else $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
|
else $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date end
|
// Date end
|
||||||
$datef=$object->datef;
|
$datef=($datef?$datef:$object->datef);
|
||||||
if (GETPOST('datef','int',1)) $datef=dol_stringtotime(GETPOST('datef','int',1),0);
|
if (GETPOST('datef','int',1)) $datef=dol_stringtotime(GETPOST('datef','int',1),0);
|
||||||
print '<tr><td><span id="dateend"'.(GETPOST("actioncode") == 'AC_RDV'?' class="fieldrequired"':'').'>'.$langs->trans("DateActionEnd").'</span></td><td>';
|
print '<tr><td><span id="dateend"'.(GETPOST("actioncode") == 'AC_RDV'?' class="fieldrequired"':'').'>'.$langs->trans("DateActionEnd").'</span></td><td>';
|
||||||
if (GETPOST("afaire") == 1) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
if (GETPOST("afaire") == 1) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend');
|
||||||
@ -539,29 +557,29 @@ if ($action == 'create')
|
|||||||
print '<tr><td width="10%">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td>';
|
print '<tr><td width="10%">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$percent=-1;
|
$percent=-1;
|
||||||
if (isset($_GET['status']) || isset($_POST['status']))
|
if (isset($_GET['status']) || isset($_POST['status'])) $percent=GETPOST('status');
|
||||||
{
|
else if (isset($_GET['percentage']) || isset($_POST['percentage'])) $percent=GETPOST('percentage');
|
||||||
$percent=GETPOST('status');
|
|
||||||
}
|
|
||||||
else if (isset($_GET['percentage']) || isset($_POST['percentage']))
|
|
||||||
{
|
|
||||||
$percent=GETPOST('percentage');
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (GETPOST("afaire") == 1) $percent=0;
|
if (GETPOST('complete') == '0' || GETPOST("afaire") == 1) $percent='0';
|
||||||
else if (GETPOST("afaire") == 2) $percent=100;
|
else if (GETPOST('complete') == 100 || GETPOST("afaire") == 2) $percent=100;
|
||||||
}
|
}
|
||||||
$formactions->form_select_status_action('formaction',$percent,1,'complete');
|
$formactions->form_select_status_action('formaction',$percent,1,'complete');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Location
|
// Location
|
||||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.$object->location.'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.(GETPOST('location')?GETPOST('location'):$object->location).'"></td></tr>';
|
||||||
|
|
||||||
// Assigned to
|
// Assigned to
|
||||||
$var=false;
|
$var=false;
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
|
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
|
||||||
$form->select_users(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1);
|
if (empty($donotclearsession))
|
||||||
|
{
|
||||||
|
$assignedtouser=GETPOST("affectedtouser")?GETPOST("affectedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id);
|
||||||
|
$_SESSION['assignedtouser']=dol_json_encode(array($assignedtouser=>array('transparency'=>1,'mandatory'=>1)));
|
||||||
|
}
|
||||||
|
//print $form->select_dolusers_forevent('affectedto',1);
|
||||||
|
print $form->select_dolusers(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -579,7 +597,7 @@ if ($action == 'create')
|
|||||||
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
||||||
{
|
{
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td>';
|
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td>';
|
||||||
$form->select_users(GETPOST("doneby")?GETPOST("doneby"):(! empty($object->userdone->id) && $percent==100?$object->userdone->id:0),'doneby',1);
|
print $form->select_dolusers(GETPOST("doneby")?GETPOST("doneby"):(! empty($object->userdone->id) && $percent==100?$object->userdone->id:0),'doneby',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -652,7 +670,7 @@ if ($action == 'create')
|
|||||||
// Description
|
// Description
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
$doleditor=new DolEditor('note',(GETPOST('note')?GETPOST('note'):$object->note),'',240,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,90);
|
$doleditor=new DolEditor('note',(GETPOST('note')?GETPOST('note'):$object->note),'',180,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_6,90);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -998,7 +998,7 @@ elseif ($action == 'show_week') // View by week
|
|||||||
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$tmpmonth && $todayarray['year']==$tmpyear) $today=1;
|
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$tmpmonth && $todayarray['year']==$tmpyear) $today=1;
|
||||||
if ($today) $style='cal_today';
|
if ($today) $style='cal_today';
|
||||||
|
|
||||||
echo ' <td class="'.$style.' nowrap" width="14%" valign="top">';
|
echo ' <td class="'.$style.'" width="14%" valign="top">';
|
||||||
show_day_events($db, $tmpday, $tmpmonth, $tmpyear, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
show_day_events($db, $tmpday, $tmpmonth, $tmpyear, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
@ -1032,7 +1032,7 @@ else // View by day
|
|||||||
echo ' <td align="center">'.$langs->trans("Day".$arraytimestamp['wday'])."</td>\n";
|
echo ' <td align="center">'.$langs->trans("Day".$arraytimestamp['wday'])."</td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo ' <td class="'.$style.' nowrap" width="14%" valign="top">';
|
echo ' <td class="'.$style.'" width="14%" valign="top">';
|
||||||
$maxnbofchar=80;
|
$maxnbofchar=80;
|
||||||
show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
@ -1073,18 +1073,20 @@ $db->close();
|
|||||||
* @param int $maxprint Nb of actions to show each day on month view (0 means no limit)
|
* @param int $maxprint Nb of actions to show each day on month view (0 means no limit)
|
||||||
* @param int $maxnbofchar Nb of characters to show for event line
|
* @param int $maxnbofchar Nb of characters to show for event line
|
||||||
* @param string $newparam Parameters on current URL
|
* @param string $newparam Parameters on current URL
|
||||||
* @param int $showinfo Add extended information (used by day view)
|
* @param int $showinfo Add extended information (used by day and week view)
|
||||||
* @param int $minheight Minimum height for each event. 60px by default.
|
* @param int $minheight Minimum height for each event. 60px by default.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60)
|
function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60)
|
||||||
{
|
{
|
||||||
global $user, $conf, $langs;
|
global $user, $conf, $langs;
|
||||||
global $filter, $filtera, $filtert, $filterd, $status, $actioncode; // Filters used into search form
|
global $action, $filter, $filtera, $filtert, $filterd, $status, $actioncode; // Filters used into search form
|
||||||
global $theme_datacolor;
|
global $theme_datacolor;
|
||||||
global $cachethirdparties, $cachecontacts, $colorindexused;
|
global $cachethirdparties, $cachecontacts, $colorindexused;
|
||||||
|
|
||||||
print '<div id="dayevent_'.sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day).'" class="dayevent">'."\n";
|
print '<div id="dayevent_'.sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day).'" class="dayevent">'."\n";
|
||||||
|
|
||||||
|
// Line with title of day
|
||||||
$curtime = dol_mktime(0, 0, 0, $month, $day, $year);
|
$curtime = dol_mktime(0, 0, 0, $month, $day, $year);
|
||||||
print '<table class="nobordernopadding" width="100%">';
|
print '<table class="nobordernopadding" width="100%">';
|
||||||
print '<tr><td align="left" class="nowrap">';
|
print '<tr><td align="left" class="nowrap">';
|
||||||
@ -1092,7 +1094,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
print 'action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
|
print 'action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
|
||||||
print $newparam;
|
print $newparam;
|
||||||
print '">';
|
print '">';
|
||||||
if ($showinfo) print dol_print_date($curtime,'daytext');
|
if ($showinfo) print dol_print_date($curtime,'daytextshort');
|
||||||
else print dol_print_date($curtime,'%d');
|
else print dol_print_date($curtime,'%d');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td><td align="right" class="nowrap">';
|
print '</td><td align="right" class="nowrap">';
|
||||||
@ -1107,7 +1109,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr height="'.$minheight.'"><td valign="top" colspan="2" class="nowrap sortable" style="padding-bottom: 2px;">';
|
|
||||||
|
// Line with td contains all div of each events
|
||||||
|
print '<tr height="'.$minheight.'"><td valign="top" colspan="2" class="sortable" style="padding-bottom: 2px;">';
|
||||||
|
print '<div style="width: 100%; position: relative;">';
|
||||||
|
|
||||||
//$curtime = dol_mktime (0, 0, 0, $month, $day, $year);
|
//$curtime = dol_mktime (0, 0, 0, $month, $day, $year);
|
||||||
$i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array();
|
$i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array();
|
||||||
@ -1192,15 +1197,23 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
$cssclass.= " unsortable";
|
$cssclass.= " unsortable";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$h=''; $nowrapontd=1;
|
||||||
|
if ($action == 'show_day') { $h='height: 100%; '; $nowrapontd=0; }
|
||||||
|
if ($action == 'show_week') { $h='height: 100%; '; $nowrapontd=0; }
|
||||||
|
|
||||||
// Show rect of event
|
// Show rect of event
|
||||||
print '<div id="event_'.$ymd.'_'.$i.'" class="event '.$cssclass.'">';
|
print '<div id="event_'.$ymd.'_'.$i.'" class="event '.$cssclass.'"';
|
||||||
print '<ul class="cal_event"><li class="cal_event">';
|
//print ' style="height: 100px;';
|
||||||
print '<table class="cal_event'.(empty($event->transparency)?'':' cal_event_busy').'" style="';
|
//print ' position: absolute; top: 40px; width: 50%;';
|
||||||
|
//print '"';
|
||||||
|
print '>';
|
||||||
|
print '<ul class="cal_event" style="'.$h.'"><li class="cal_event" style="'.$h.'">';
|
||||||
|
print '<table class="cal_event'.(empty($event->transparency)?'':' cal_event_busy').'" style="'.$h;
|
||||||
print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,1).'));';
|
print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,1).'));';
|
||||||
//if (! empty($event->transparency)) print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,1).'));';
|
//if (! empty($event->transparency)) print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,1).'));';
|
||||||
//else print 'background-color: transparent !important; background: none; border: 1px solid #bbb;';
|
//else print 'background-color: transparent !important; background: none; border: 1px solid #bbb;';
|
||||||
print ' -moz-border-radius:4px;" width="100%"><tr>';
|
print ' -moz-border-radius:4px;" width="100%"><tr>';
|
||||||
print '<td class="nowrap cal_event'.($event->type_code == 'BIRTHDAY'?' cal_event_birthday':'').'">';
|
print '<td class="'.($nowrapontd?'nowrap ':'').'cal_event'.($event->type_code == 'BIRTHDAY'?' cal_event_birthday':'').'">';
|
||||||
if ($event->type_code == 'BIRTHDAY') // It's a birthday
|
if ($event->type_code == 'BIRTHDAY') // It's a birthday
|
||||||
{
|
{
|
||||||
print $event->getNomUrl(1,$maxnbofchar,'cal_event','birthday','contact');
|
print $event->getNomUrl(1,$maxnbofchar,'cal_event','birthday','contact');
|
||||||
@ -1367,6 +1380,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</div>'."\n";
|
print '</div>'."\n";
|
||||||
|
|||||||
@ -43,6 +43,7 @@ $pid=GETPOST("projectid",'int',3);
|
|||||||
$status=GETPOST("status",'alpha');
|
$status=GETPOST("status",'alpha');
|
||||||
$type=GETPOST('type');
|
$type=GETPOST('type');
|
||||||
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':''));
|
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':''));
|
||||||
|
$dateselect=dol_mktime(0, 0, 0, GETPOST('dateselectmonth'), GETPOST('dateselectday'), GETPOST('dateselectyear'));
|
||||||
|
|
||||||
if ($actioncode == '') $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE);
|
if ($actioncode == '') $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE);
|
||||||
if ($status == '' && ! isset($_GET['status']) && ! isset($_POST['status'])) $status=(empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS)?'':$conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
if ($status == '' && ! isset($_GET['status']) && ! isset($_POST['status'])) $status=(empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS)?'':$conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||||
@ -178,6 +179,8 @@ if ($filtera > 0 || $filtert > 0 || $filterd > 0 || $usergroup > 0)
|
|||||||
if ($usergroup > 0) $sql.= ($filtera>0||$filtert>0||$filterd>0?" OR ":"")." ugu.fk_usergroup = ".$usergroup;
|
if ($usergroup > 0) $sql.= ($filtera>0||$filtert>0||$filterd>0?" OR ":"")." ugu.fk_usergroup = ".$usergroup;
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
}
|
}
|
||||||
|
//if ($dateselect > 0) $sql.= " AND a.datep BETWEEN '".$db->idate($dateselect)."' AND '".$db->idate($dateselect+3600*24-1).'"';
|
||||||
|
if ($dateselect > 0) $sql.= " AND a.datep BETWEEN '".$db->idate($dateselect)."' AND '".$db->idate($dateselect+3600*24-1)."'";
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
$sql.= $db->plimit($limit + 1, $offset);
|
$sql.= $db->plimit($limit + 1, $offset);
|
||||||
//print $sql;
|
//print $sql;
|
||||||
@ -191,9 +194,11 @@ if ($resql)
|
|||||||
|
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
$title=$langs->trans("DoneAndToDoActions");
|
/*$title=$langs->trans("DoneAndToDoActions");
|
||||||
if ($status == 'done') $title=$langs->trans("DoneActions");
|
if ($status == 'done') $title=$langs->trans("DoneActions");
|
||||||
if ($status == 'todo') $title=$langs->trans("ToDoActions");
|
if ($status == 'todo') $title=$langs->trans("ToDoActions");
|
||||||
|
*/
|
||||||
|
$title=$langs->trans("ListOfEvents");
|
||||||
|
|
||||||
$newtitle=$langs->trans($title);
|
$newtitle=$langs->trans($title);
|
||||||
|
|
||||||
@ -225,6 +230,8 @@ if ($resql)
|
|||||||
print_barre_liste($newtitle, $page, $_SERVER["PHP_SELF"], $param,$sortfield,$sortorder,$link,$num,0,'');
|
print_barre_liste($newtitle, $page, $_SERVER["PHP_SELF"], $param,$sortfield,$sortorder,$link,$num,0,'');
|
||||||
//print '<br>';
|
//print '<br>';
|
||||||
|
|
||||||
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'?'.$param.'">'."\n";
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -240,6 +247,22 @@ if ($resql)
|
|||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"a.percent",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"a.percent",$param,"",'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td class="liste_titre"></td>';
|
||||||
|
print '<td class="liste_titre" align="center">';
|
||||||
|
print $form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1);
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre"></td>';
|
||||||
|
print '<td class="liste_titre"></td>';
|
||||||
|
print '<td class="liste_titre"></td>';
|
||||||
|
print '<td class="liste_titre"></td>';
|
||||||
|
print '<td class="liste_titre"></td>';
|
||||||
|
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
|
//print ' ';
|
||||||
|
//print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||||
|
print '</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
$contactstatic = new Contact($db);
|
$contactstatic = new Contact($db);
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;
|
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;
|
||||||
@ -349,6 +372,9 @@ if ($resql)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,7 +88,7 @@ class Fiscalyear
|
|||||||
$sql.= ") VALUES (";
|
$sql.= ") VALUES (";
|
||||||
$sql.= " '".$this->label."'";
|
$sql.= " '".$this->label."'";
|
||||||
$sql.= ", '".$this->db->idate($this->date_start)."'";
|
$sql.= ", '".$this->db->idate($this->date_start)."'";
|
||||||
$sql.= ", '".$this->db->idate($this->date_end)."'";
|
$sql.= ", ".($this->date_end ? "'".$this->db->idate($this->date_end)."'":"null");
|
||||||
$sql.= ", ".$this->statut;
|
$sql.= ", ".$this->statut;
|
||||||
$sql.= ", ".$conf->entity;
|
$sql.= ", ".$conf->entity;
|
||||||
$sql.= ", '".$this->db->idate($now)."'";
|
$sql.= ", '".$this->db->idate($now)."'";
|
||||||
@ -109,14 +109,14 @@ class Fiscalyear
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->lasterror();
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error()." sql=".$sql;
|
$this->error=$this->db->lasterror()." sql=".$sql;
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -144,9 +144,9 @@ class Fiscalyear
|
|||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."accounting_fiscalyear";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."accounting_fiscalyear";
|
||||||
$sql .= " SET label = '".$this->label."'";
|
$sql .= " SET label = '".$this->label."'";
|
||||||
$sql .= ", date_start = '".$this->db->idate($this->date_start)."'";
|
$sql .= ", date_start = '".$this->db->idate($this->date_start)."'";
|
||||||
$sql .= ", date_end = '".$this->db->idate($this->date_end)."'";
|
$sql .= ", date_end = ".($this->date_end ? "'".$this->db->idate($this->date_end)."'" : "null");
|
||||||
$sql .= ", statut = '".$this->statut."'";
|
$sql .= ", statut = '".$this->statut."'";
|
||||||
$sql .= ", datec = " . ($this->datec != '' ? $this->db->idate($this->datec) : 'null');
|
$sql .= ", datec = " . ($this->datec != '' ? "'".$this->db->idate($this->datec)."'" : 'null');
|
||||||
$sql .= ", fk_user_modif = " . $user->id;
|
$sql .= ", fk_user_modif = " . $user->id;
|
||||||
$sql .= " WHERE rowid = ".$this->id;
|
$sql .= " WHERE rowid = ".$this->id;
|
||||||
|
|
||||||
@ -160,6 +160,7 @@ class Fiscalyear
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->lasterror();
|
$this->error=$this->db->lasterror();
|
||||||
|
dol_syslog($this->error, LOG_ERR);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -194,7 +195,7 @@ class Fiscalyear
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->lasterror();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,7 +221,7 @@ class Fiscalyear
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->lasterror();
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1273,6 +1273,49 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return select list of users. Selected users are stored into session.
|
||||||
|
*
|
||||||
|
* @param string $htmlname Field name in form
|
||||||
|
* @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
|
||||||
|
* @param array $exclude Array list of users id to exclude
|
||||||
|
* @param int $disabled If select list must be disabled
|
||||||
|
* @param array $include Array list of users id to include or 'hierarchy' to have only supervised users
|
||||||
|
* @param array $enableonly Array list of users id to be enabled. All other must be disabled
|
||||||
|
* @param int $force_entity 0 or Id of environment to force
|
||||||
|
* @param int $maxlength Maximum length of string into list (0=no limit)
|
||||||
|
* @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status
|
||||||
|
* @param string $morefilter Add more filters into sql request
|
||||||
|
* @return string HTML select string
|
||||||
|
* @see select_dolgroups
|
||||||
|
*/
|
||||||
|
function select_dolusers_forevent($htmlname='userid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity=0, $maxlength=0, $showstatus=0, $morefilter='')
|
||||||
|
{
|
||||||
|
global $conf,$user,$langs;
|
||||||
|
|
||||||
|
$userstatic=new User($this->db);
|
||||||
|
|
||||||
|
// Method with no ajax
|
||||||
|
//$out.='<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
$out.=$this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter);
|
||||||
|
$out.='<input type="submit" class="button" name="addassignedtouser" value="'.dol_escape_htmltag($langs->trans("Add")).'">';
|
||||||
|
$assignedtouser=array();
|
||||||
|
if (!empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true);
|
||||||
|
if (count($assignedtouser)) $out.='<br>';
|
||||||
|
foreach($assignedtouser as $key => $value)
|
||||||
|
{
|
||||||
|
$userstatic->fetch($key);
|
||||||
|
$out.=$userstatic->getNomUrl(1);
|
||||||
|
//$out.=' '.($value['mandatory']?$langs->trans("Mandatory"):$langs->trans("Optional"));
|
||||||
|
//$out.=' '.($value['transparency']?$langs->trans("Busy"):$langs->trans("NotBusy"));
|
||||||
|
$out.='<br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
//$out.='</form>';
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_list
|
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_list
|
||||||
*
|
*
|
||||||
@ -3932,11 +3975,12 @@ class Form
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a HTML select string, built from an array of key+value.
|
* Return a HTML select string, built from an array of key+value.
|
||||||
|
* Note: Do not use returned string into a langs->trans function, content may be entity encoded twice.
|
||||||
*
|
*
|
||||||
* @param string $htmlname Name of html select area
|
* @param string $htmlname Name of html select area
|
||||||
* @param array $array Array with key+value
|
* @param array $array Array with key+value
|
||||||
* @param string $id Preselected key
|
* @param string $id Preselected key
|
||||||
* @param int $show_empty 1 si il faut ajouter une valeur vide dans la liste, 0 sinon
|
* @param int $show_empty 0 no empty value allowed, 1 to add an empty value into list (value is '' or ' ').
|
||||||
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
|
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
|
||||||
* @param int $value_as_key 1 to use value as key
|
* @param int $value_as_key 1 to use value as key
|
||||||
* @param string $moreparam Add more parameters onto the select tag
|
* @param string $moreparam Add more parameters onto the select tag
|
||||||
@ -3945,7 +3989,7 @@ class Form
|
|||||||
* @param int $disabled Html select box is disabled
|
* @param int $disabled Html select box is disabled
|
||||||
* @param int $sort 'ASC' or 'DESC' =Sort on label, '' or 'NONE'=Do not sort
|
* @param int $sort 'ASC' or 'DESC' =Sort on label, '' or 'NONE'=Do not sort
|
||||||
* @param string $morecss Add more class to css styles
|
* @param string $morecss Add more class to css styles
|
||||||
* @return string HTML select string
|
* @return string HTML select string.
|
||||||
*/
|
*/
|
||||||
static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='')
|
static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='')
|
||||||
{
|
{
|
||||||
@ -3982,11 +4026,11 @@ class Form
|
|||||||
|
|
||||||
if ($key_in_label)
|
if ($key_in_label)
|
||||||
{
|
{
|
||||||
$selectOptionValue = dol_htmlentitiesbr($key.' - '.($maxlen?dol_trunc($value,$maxlen):$value));
|
$selectOptionValue = dol_escape_htmltag($key.' - '.($maxlen?dol_trunc($value,$maxlen):$value));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$selectOptionValue = dol_htmlentitiesbr($maxlen?dol_trunc($value,$maxlen):$value);
|
$selectOptionValue = dol_escape_htmltag($maxlen?dol_trunc($value,$maxlen):$value);
|
||||||
if ($value == '' || $value == '-') $selectOptionValue=' ';
|
if ($value == '' || $value == '-') $selectOptionValue=' ';
|
||||||
}
|
}
|
||||||
$out.=$selectOptionValue;
|
$out.=$selectOptionValue;
|
||||||
|
|||||||
@ -501,14 +501,14 @@ function calendars_prepare_head($param)
|
|||||||
$head[$h][2] = 'cardday';
|
$head[$h][2] = 'cardday';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/action/listactions.php'.($param?'?'.$param:'');
|
|
||||||
$head[$h][1] = $langs->trans("ViewList");
|
|
||||||
$head[$h][2] = 'cardlist';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/action/peruser.php'.($param?'?'.$param:'');
|
$head[$h][0] = DOL_URL_ROOT.'/comm/action/peruser.php'.($param?'?'.$param:'');
|
||||||
$head[$h][1] = $langs->trans("ViewPerUser");
|
$head[$h][1] = $langs->trans("ViewPerUser");
|
||||||
$head[$h][2] = 'cardperuser';
|
$head[$h][2] = 'cardperuser';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/comm/action/listactions.php'.($param?'?'.$param:'');
|
||||||
|
$head[$h][1] = $langs->trans("ViewList");
|
||||||
|
$head[$h][2] = 'cardlist';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$object=new stdClass();
|
$object=new stdClass();
|
||||||
|
|||||||
@ -337,7 +337,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0)
|
|||||||
width: "500px" */
|
width: "500px" */
|
||||||
|
|
||||||
$msg = '<script type="text/javascript">
|
$msg = '<script type="text/javascript">
|
||||||
$(function() {
|
$(document).ready(function() {
|
||||||
$("#'.$htmlname.'").combobox({
|
$("#'.$htmlname.'").combobox({
|
||||||
minLengthToAutocomplete : '.$minLengthToAutocomplete.',
|
minLengthToAutocomplete : '.$minLengthToAutocomplete.',
|
||||||
selected : function(event,ui) {
|
selected : function(event,ui) {
|
||||||
|
|||||||
@ -34,7 +34,7 @@ function fiscalyear_prepare_head($object)
|
|||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT . '/admin/fiscalyear_card.php?id=' . $object->id;
|
$head[$h][0] = DOL_URL_ROOT . '/accountancy/admin/fiscalyear_card.php?id=' . $object->id;
|
||||||
$head[$h][1] = $langs->trans("Card");
|
$head[$h][1] = $langs->trans("Card");
|
||||||
$head[$h][2] = 'card';
|
$head[$h][2] = 'card';
|
||||||
$h++;
|
$h++;
|
||||||
@ -45,7 +45,7 @@ function fiscalyear_prepare_head($object)
|
|||||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'fiscalyear');
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'fiscalyear');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT . '/admin/fiscalyear_info.php?id=' . $object->id;
|
$head[$h][0] = DOL_URL_ROOT . '/accountancy/admin/fiscalyear_info.php?id=' . $object->id;
|
||||||
$head[$h][1] = $langs->trans("Info");
|
$head[$h][1] = $langs->trans("Info");
|
||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|||||||
@ -501,7 +501,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$newmenu->add("/admin/modules.php?mainmenu=home", $langs->trans("Modules").$warnpicto,1);
|
$newmenu->add("/admin/modules.php?mainmenu=home", $langs->trans("Modules").$warnpicto,1);
|
||||||
$newmenu->add("/admin/menus.php?mainmenu=home", $langs->trans("Menus"),1);
|
$newmenu->add("/admin/menus.php?mainmenu=home", $langs->trans("Menus"),1);
|
||||||
$newmenu->add("/admin/ihm.php?mainmenu=home", $langs->trans("GUISetup"),1);
|
$newmenu->add("/admin/ihm.php?mainmenu=home", $langs->trans("GUISetup"),1);
|
||||||
$newmenu->add("/admin/fiscalyear.php?mainmenu=home", $langs->trans("Fiscalyear"),1);
|
|
||||||
if (! in_array($langs->defaultlang,array('en_US','en_GB','en_NZ','en_AU','fr_FR','fr_BE','es_ES','ca_ES')))
|
if (! in_array($langs->defaultlang,array('en_US','en_GB','en_NZ','en_AU','fr_FR','fr_BE','es_ES','ca_ES')))
|
||||||
{
|
{
|
||||||
if (empty($leftmenu) || $leftmenu=="setup") $newmenu->add("/admin/translation.php", $langs->trans("Translation"),1);
|
if (empty($leftmenu) || $leftmenu=="setup") $newmenu->add("/admin/translation.php", $langs->trans("Translation"),1);
|
||||||
@ -871,13 +870,15 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
if (! empty($conf->fournisseur->enabled))
|
if (! empty($conf->fournisseur->enabled))
|
||||||
{
|
{
|
||||||
$newmenu->add("/accountancy/supplier/index.php?leftmenu=ventil_supplier",$langs->trans("SuppliersVentilation"),0,$user->rights->accounting->ventilation->read, '', $mainmenu, 'ventil_supplier');
|
$newmenu->add("/accountancy/supplier/index.php?leftmenu=ventil_supplier",$langs->trans("SuppliersVentilation"),0,$user->rights->accounting->ventilation->read, '', $mainmenu, 'ventil_supplier');
|
||||||
if (empty($leftmenu) || $leftmenu=="ventil_supplier") $newmenu->add("/accountancy/supplier/list.php",$langs->trans("ToDispatch"),1,$user->rights->accounting->ventilation->read);
|
if (empty($leftmenu) || $leftmenu=="ventil_customer") $newmenu->add("/accountancy/supplier/list.php",$langs->trans("ToDispatch"),1,$user->rights->accounting->ventilation->read);
|
||||||
if (empty($leftmenu) || $leftmenu=="ventil_supplier") $newmenu->add("/accountancy/supplier/lines.php",$langs->trans("Dispatched"),1,$user->rights->accounting->ventilation->read);
|
if (empty($leftmenu) || $leftmenu=="ventil_customer") $newmenu->add("/accountancy/supplier/lines.php",$langs->trans("Dispatched"),1,$user->rights->accounting->ventilation->read);
|
||||||
}
|
}
|
||||||
|
|
||||||
$newmenu->add("/accountancy/bookkeeping/list.php?leftmenu=bookkeeping",$langs->trans("Bookkeeping"),0,$user->rights->accounting->mouvements->lire, '', $mainmenu, 'bookkeeping');
|
$newmenu->add("/accountancy/bookkeeping/list.php?leftmenu=bookkeeping",$langs->trans("Bookkeeping"),0,$user->rights->accounting->mouvements->lire, '', $mainmenu, 'bookeeping');
|
||||||
if (empty($leftmenu) || $leftmenu=="bookkeeping") $newmenu->add("/accountancy/bookkeeping/listbyyear.php",$langs->trans("ByYear"),1,$user->rights->accounting->mouvements->lire);
|
if (empty($leftmenu) || $leftmenu=="bookeeping") $newmenu->add("/accountancy/bookkeeping/listbyyear.php",$langs->trans("ByYear"),1,$user->rights->accounting->mouvements->lire);
|
||||||
if (empty($leftmenu) || $leftmenu=="bookkeeping") $newmenu->add("/accountancy/bookkeeping/balancebymonth.php",$langs->trans("AccountBalanceByMonth"),1,$user->rights->accounting->mouvements->lire);
|
if (empty($leftmenu) || $leftmenu=="bookeeping") $newmenu->add("/accountancy/bookkeeping/balancebymonth.php.php",$langs->trans("AccountBalanceByMonth"),1,$user->rights->accounting->mouvements->lire);
|
||||||
|
|
||||||
|
$newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy", $langs->trans("Fiscalyear"),0,$user->rights->accounting->close, '', $mainmenu, 'fiscalyear');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rapports
|
// Rapports
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file accountingex/core/modules/modAccountingExpert.class.php
|
* \file accountingex/core/modules/modAccounting.class.php
|
||||||
* \ingroup Accounting Expert
|
* \ingroup Accounting Expert
|
||||||
* \brief Module to activate Accounting Expert module
|
* \brief Module to activate Accounting Expert module
|
||||||
*/
|
*/
|
||||||
@ -46,7 +46,7 @@ class modAccounting extends DolibarrModules
|
|||||||
$this->family = "financial";
|
$this->family = "financial";
|
||||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||||
$this->name = preg_replace('/^mod/i', '', get_class($this));
|
$this->name = preg_replace('/^mod/i', '', get_class($this));
|
||||||
$this->description = "Advanced manage of accounting";
|
$this->description = "Advanced accounting management";
|
||||||
|
|
||||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||||
$this->version = 'development';
|
$this->version = 'development';
|
||||||
@ -59,9 +59,7 @@ class modAccounting extends DolibarrModules
|
|||||||
// $this->triggers = 1;
|
// $this->triggers = 1;
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
$this->dirs = array (
|
$this->dirs = array('/accounting/temp');
|
||||||
'/accountingex/temp'
|
|
||||||
);
|
|
||||||
|
|
||||||
// Config pages
|
// Config pages
|
||||||
$this->config_page_url = array('index.php@accountancy');
|
$this->config_page_url = array('index.php@accountancy');
|
||||||
@ -70,17 +68,9 @@ class modAccounting extends DolibarrModules
|
|||||||
$this->depends = array("modFacture","modBanque","modTax"); // List of modules id that must be enabled if this module is enabled
|
$this->depends = array("modFacture","modBanque","modTax"); // List of modules id that must be enabled if this module is enabled
|
||||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||||
$this->conflictwith = array("modComptabilite"); // List of modules are in conflict with this module
|
$this->conflictwith = array("modComptabilite"); // List of modules are in conflict with this module
|
||||||
$this->phpmin = array (
|
$this->phpmin = array(5, 2); // Minimum version of PHP required by module
|
||||||
5,
|
$this->need_dolibarr_version = array(3, 6); // Minimum version of Dolibarr required by module
|
||||||
2
|
$this->langfiles = array("accountancy");
|
||||||
); // Minimum version of PHP required by module
|
|
||||||
$this->need_dolibarr_version = array (
|
|
||||||
3,
|
|
||||||
6
|
|
||||||
); // Minimum version of Dolibarr required by module
|
|
||||||
$this->langfiles = array (
|
|
||||||
"accountancy"
|
|
||||||
);
|
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
$this->const = array();
|
$this->const = array();
|
||||||
@ -192,7 +182,7 @@ class modAccounting extends DolibarrModules
|
|||||||
$this->rights = array(); // Permission array used by this module
|
$this->rights = array(); // Permission array used by this module
|
||||||
$r = 0;
|
$r = 0;
|
||||||
|
|
||||||
$this->rights[$r][0] = 50401;
|
$this->rights[$r][0] = 50401; // TODO Goal of this permission compared to others ???
|
||||||
$this->rights[$r][1] = 'Access_accountancy';
|
$this->rights[$r][1] = 'Access_accountancy';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
@ -240,6 +230,14 @@ class modAccounting extends DolibarrModules
|
|||||||
$this->rights[$r][5] = 'lire';
|
$this->rights[$r][5] = 'lire';
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
|
$this->rights[$r][0] = 50430;
|
||||||
|
$this->rights[$r][1] = 'Define and close a fiscal year';
|
||||||
|
$this->rights[$r][2] = 'r';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'fiscalyear';
|
||||||
|
$this->rights[$r][5] = '';
|
||||||
|
$r++;
|
||||||
|
|
||||||
// Main menu entries
|
// Main menu entries
|
||||||
$this->menus = array();
|
$this->menus = array();
|
||||||
$r = 0;
|
$r = 0;
|
||||||
|
|||||||
@ -84,6 +84,9 @@ ALTER TABLE llx_product MODIFY COLUMN accountancy_code_buy varchar(32);
|
|||||||
ALTER TABLE llx_user MODIFY COLUMN accountancy_code varchar(32);
|
ALTER TABLE llx_user MODIFY COLUMN accountancy_code varchar(32);
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_user ADD COLUMN weeklyhours double(16,8);
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_projet_task_time ADD COLUMN task_datehour datetime after task_date;
|
ALTER TABLE llx_projet_task_time ADD COLUMN task_datehour datetime after task_date;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -13,14 +13,17 @@
|
|||||||
--
|
--
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
-- ============================================================================
|
||||||
|
-- Table used to link an element actioncomm with a resource or user (llx_resource or llx_user)
|
||||||
|
-- ============================================================================
|
||||||
|
|
||||||
CREATE TABLE llx_element_resources
|
CREATE TABLE llx_element_resources
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
resource_id integer,
|
|
||||||
resource_type varchar(64),
|
|
||||||
element_id integer,
|
element_id integer,
|
||||||
element_type varchar(64),
|
element_type varchar(64),
|
||||||
|
resource_id integer, -- id of resource or id of user
|
||||||
|
resource_type varchar(64), -- resource or user
|
||||||
busy integer,
|
busy integer,
|
||||||
mandatory integer,
|
mandatory integer,
|
||||||
fk_user_create integer,
|
fk_user_create integer,
|
||||||
|
|||||||
@ -71,5 +71,6 @@ create table llx_user
|
|||||||
fk_barcode_type integer DEFAULT 0,
|
fk_barcode_type integer DEFAULT 0,
|
||||||
accountancy_code varchar(32) NULL,
|
accountancy_code varchar(32) NULL,
|
||||||
nb_holiday integer DEFAULT 0,
|
nb_holiday integer DEFAULT 0,
|
||||||
salary double(24,8)
|
salary double(24,8),
|
||||||
|
weeklyhours double(16,8)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -6,7 +6,7 @@ Agenda= Agenda
|
|||||||
Agendas=Agendas
|
Agendas=Agendas
|
||||||
Calendar=Calendar
|
Calendar=Calendar
|
||||||
Calendars=Calendars
|
Calendars=Calendars
|
||||||
LocalAgenda=Local calendar
|
LocalAgenda=Internal calendar
|
||||||
AffectedTo=Assigned to
|
AffectedTo=Assigned to
|
||||||
DoneBy=Done by
|
DoneBy=Done by
|
||||||
Event=Event
|
Event=Event
|
||||||
@ -22,7 +22,7 @@ MenuToDoActions=All incomplete events
|
|||||||
MenuDoneActions=All terminated events
|
MenuDoneActions=All terminated events
|
||||||
MenuToDoMyActions=My incomplete events
|
MenuToDoMyActions=My incomplete events
|
||||||
MenuDoneMyActions=My terminated events
|
MenuDoneMyActions=My terminated events
|
||||||
ListOfEvents=List of Dolibarr events
|
ListOfEvents=List of events (internal calendar)
|
||||||
ActionsAskedBy=Events reported by
|
ActionsAskedBy=Events reported by
|
||||||
ActionsToDoBy=Events assigned to
|
ActionsToDoBy=Events assigned to
|
||||||
ActionsDoneBy=Events done by
|
ActionsDoneBy=Events done by
|
||||||
|
|||||||
@ -22,7 +22,7 @@ MenuToDoActions=Événements incomplets
|
|||||||
MenuDoneActions=Événements terminés
|
MenuDoneActions=Événements terminés
|
||||||
MenuToDoMyActions=Mes événem. incomplets
|
MenuToDoMyActions=Mes événem. incomplets
|
||||||
MenuDoneMyActions=Mes événem. terminés
|
MenuDoneMyActions=Mes événem. terminés
|
||||||
ListOfEvents=Liste des événements Dolibarr
|
ListOfEvents=Liste des événements (calendrier interne)
|
||||||
ActionsAskedBy=Événements enregistrés par
|
ActionsAskedBy=Événements enregistrés par
|
||||||
ActionsToDoBy=Événements affectés à
|
ActionsToDoBy=Événements affectés à
|
||||||
ActionsDoneBy=Événements réalisés par
|
ActionsDoneBy=Événements réalisés par
|
||||||
|
|||||||
@ -326,12 +326,14 @@ else
|
|||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" name="snom" size="12" value="'.$snom.'">';
|
print '<input class="flat" type="text" name="snom" size="12" value="'.$snom.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
// Barcode
|
||||||
if (! empty($conf->barcode->enabled))
|
if (! empty($conf->barcode->enabled))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" type="text" name="sbarcode" size="6" value="'.$sbarcode.'">';
|
print '<input class="flat" type="text" name="sbarcode" size="6" value="'.$sbarcode.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Date modification
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -370,15 +372,6 @@ else
|
|||||||
print ' ';
|
print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<td class="liste_titre">';
|
|
||||||
print ' ';
|
|
||||||
print '</td>';
|
|
||||||
print '<td class="liste_titre">';
|
|
||||||
print ' ';
|
|
||||||
print '</td>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $form->selectarray('tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')),$tosell,1);
|
print $form->selectarray('tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')),$tosell,1);
|
||||||
@ -388,7 +381,7 @@ else
|
|||||||
print $form->selectarray('tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'),'1'=>$langs->trans('ProductStatusOnBuyShort')),$tobuy,1);
|
print $form->selectarray('tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'),'1'=>$langs->trans('ProductStatusOnBuyShort')),$tobuy,1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre nowrap" align="right">';
|
||||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -2336,6 +2336,7 @@ table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px
|
|||||||
moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
|
moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
|
||||||
background: -webkit-gradient(linear, left top, left bottom, from(#006aac), to(#00438d));
|
background: -webkit-gradient(linear, left top, left bottom, from(#006aac), to(#00438d));
|
||||||
|
min-height: 20px;
|
||||||
}
|
}
|
||||||
table.cal_event td { border: none; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 2px; padding-top: 0px; padding-bottom: 0px; }
|
table.cal_event td { border: none; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 2px; padding-top: 0px; padding-bottom: 0px; }
|
||||||
ul.cal_event { padding-right: 2px; padding-top: 1px; border: none; list-style-type: none; margin: 0 auto; padding-left: 0px; padding-start: 0px; -khtml-padding-start: 0px; -o-padding-start: 0px; -moz-padding-start: 0px; -webkit-padding-start: 0px; }
|
ul.cal_event { padding-right: 2px; padding-top: 1px; border: none; list-style-type: none; margin: 0 auto; padding-left: 0px; padding-start: 0px; -khtml-padding-start: 0px; -o-padding-start: 0px; -moz-padding-start: 0px; -webkit-padding-start: 0px; }
|
||||||
|
|||||||
@ -58,7 +58,7 @@ if ($action == 'update' && $user->rights->user->user->creer && ! $_POST["cancel"
|
|||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$res=$fuser->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
$res=$fuser->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
|
||||||
if ($res < 0)
|
if ($res < 0)
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$adh->error.'</div>';
|
$mesg='<div class="error">'.$adh->error.'</div>';
|
||||||
@ -89,7 +89,7 @@ if ($id)
|
|||||||
|
|
||||||
if ($msg) print '<div class="error">'.$msg.'</div>';
|
if ($msg) print '<div class="error">'.$msg.'</div>';
|
||||||
|
|
||||||
print "<form method=\"post\" action=\"note.php\">";
|
print "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">";
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
@ -120,7 +120,7 @@ if ($id)
|
|||||||
print "<input type=\"hidden\" name=\"id\" value=\"".$fuser->id."\">";
|
print "<input type=\"hidden\" name=\"id\" value=\"".$fuser->id."\">";
|
||||||
// Editeur wysiwyg
|
// Editeur wysiwyg
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
$doleditor=new DolEditor('note',$fuser->note,'',280,'dolibarr_notes','In',true,false,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,80);
|
$doleditor=new DolEditor('note_private',$fuser->note,'',280,'dolibarr_notes','In',true,false,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,80);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user