forked from Wavyzz/dolibarr
Uniformize look using dol_banner
This commit is contained in:
@@ -98,9 +98,11 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('actioncard','globalcard'));
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$listUserAssignedUpdated = false;
|
||||
// Remove user to assigned list
|
||||
if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')
|
||||
@@ -644,8 +646,8 @@ if ($action == 'create')
|
||||
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
|
||||
if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) print '<input type="hidden" name="actioncode" value="'.dol_getIdFromCode($db, 'AC_OTH', 'c_actioncomm').'">';
|
||||
|
||||
if (GETPOST("actioncode") == 'AC_RDV') print load_fiche_titre($langs->trans("AddActionRendezVous"));
|
||||
else print load_fiche_titre($langs->trans("AddAnAction"));
|
||||
if (GETPOST("actioncode") == 'AC_RDV') print load_fiche_titre($langs->trans("AddActionRendezVous"), '', 'title_agenda');
|
||||
else print load_fiche_titre($langs->trans("AddAnAction"), '', 'title_agenda');
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
@@ -1183,33 +1185,51 @@ if ($id > 0)
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
$linkback =img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"');
|
||||
$linkback.= '<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Link to other agenda views
|
||||
$out='';
|
||||
$out.=img_picto($langs->trans("ViewPerUser"),'object_calendarperuser','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewPerUser").'</a>';
|
||||
$out.='<br>';
|
||||
$out.=img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewCal").'</a>';
|
||||
$out.=img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewWeek").'</a>';
|
||||
$out.=img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewDay").'</a>';
|
||||
$linkback.=$out;
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
// Affichage fiche action en mode visu
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
/*print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
print '</td></tr>';
|
||||
print '</td></tr>';*/
|
||||
|
||||
// Type
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="3">'.$object->type.'</td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td colspan="3">'.$object->type.'</td></tr>';
|
||||
}
|
||||
|
||||
// Title
|
||||
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3">'.dol_htmlentities($object->label).'</td></tr>';
|
||||
//print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3">'.dol_htmlentities($object->label).'</td></tr>';
|
||||
|
||||
// Full day event
|
||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3">'.yn($object->fulldayevent, 3).'</td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("EventOnFullDay").'</td><td colspan="3">'.yn($object->fulldayevent, 3).'</td></tr>';
|
||||
|
||||
$rowspan=4;
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION)) $rowspan++;
|
||||
|
||||
// Date start
|
||||
print '<tr><td width="30%">'.$langs->trans("DateActionStart").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("DateActionStart").'</td><td colspan="3">';
|
||||
if (! $object->fulldayevent) print dol_print_date($object->datep,'dayhour');
|
||||
else print dol_print_date($object->datep,'day');
|
||||
if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
@@ -1224,9 +1244,9 @@ if ($id > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">';
|
||||
/*print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">';
|
||||
print $object->getLibStatut(4);
|
||||
print '</td></tr>';
|
||||
print '</td></tr>';*/
|
||||
|
||||
// Location
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
||||
@@ -1235,7 +1255,7 @@ if ($id > 0)
|
||||
}
|
||||
|
||||
// Assigned to
|
||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("ActionAssignedTo").'</td><td colspan="3">';
|
||||
print '<tr><td class="nowrap">'.$langs->trans("ActionAssignedTo").'</td><td colspan="3">';
|
||||
$listofuserid=array();
|
||||
if (empty($donotclearsession))
|
||||
{
|
||||
@@ -1291,7 +1311,7 @@ if ($id > 0)
|
||||
// Third party - Contact
|
||||
if ($conf->societe->enabled)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ActionOnCompany").'</td><td>'.($object->thirdparty->id?$object->thirdparty->getNomUrl(1):$langs->trans("None"));
|
||||
print '<tr><td class="titlefield">'.$langs->trans("ActionOnCompany").'</td><td>'.($object->thirdparty->id?$object->thirdparty->getNomUrl(1):$langs->trans("None"));
|
||||
if (is_object($object->thirdparty) && $object->thirdparty->id > 0 && $object->type_code == 'AC_TEL')
|
||||
{
|
||||
if ($object->thirdparty->fetch($object->thirdparty->id))
|
||||
@@ -1323,7 +1343,7 @@ if ($id > 0)
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print '<tr><td width="30%">'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
if ($object->fk_project)
|
||||
{
|
||||
$project=new Project($db);
|
||||
@@ -1334,7 +1354,7 @@ if ($id > 0)
|
||||
}
|
||||
|
||||
// Priority
|
||||
print '<tr><td class="nowrap" width="30%">'.$langs->trans("Priority").'</td><td colspan="3">';
|
||||
print '<tr><td class="nowrap" class="titlefield">'.$langs->trans("Priority").'</td><td colspan="3">';
|
||||
print ($object->priority?$object->priority:'');
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -1432,46 +1452,6 @@ if ($id > 0)
|
||||
|
||||
if ($action != 'edit')
|
||||
{
|
||||
// Link to agenda views
|
||||
print '<div id="agendaviewbutton">';
|
||||
print '<form name="listactionsfiltermonth" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST" style="float: left; padding-right: 10px;">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_month">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"').' <input type="submit" style="min-width: 120px" class="button buttonactionview" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST" style="float: left; padding-right: 10px;">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_week">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone pictoactionview"').' <input type="submit" style="min-width: 120px" class="button buttonactionview" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST" style="float: left; padding-right: 10px;">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_day">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone pictoactionview"').' <input type="submit" style="min-width: 120px" class="button buttonactionview" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterperuser" action="'.DOL_URL_ROOT.'/comm/action/peruser.php" method="POST" style="float: left; padding-right: 10px;">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_peruser">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewPerUser"),'object_calendarperuser','class="hideonsmartphone pictoactionview"').' <input type="submit" style="min-width: 120px" class="button buttonactionview" name="viewperuser" value="'.$langs->trans("ViewPerUser").'">';
|
||||
print '</form>'."\n";
|
||||
print '</div>';
|
||||
|
||||
if (empty($conf->global->AGENDA_DISABLE_BUILDDOC))
|
||||
{
|
||||
print '<div style="clear:both;"> <br><br></div><div class="fichecenter"><div class="fichehalfleft">';
|
||||
|
||||
@@ -37,6 +37,7 @@ class ActionComm extends CommonObject
|
||||
public $table_element = 'actioncomm';
|
||||
public $table_rowid = 'id';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto='action';
|
||||
|
||||
/**
|
||||
* Id of the event
|
||||
@@ -1024,7 +1025,7 @@ class ActionComm extends CommonObject
|
||||
* Return label of action status
|
||||
*
|
||||
* @param int $percent Percent
|
||||
* @param int $mode 0=Long label, 1=Short label, 2=Picto+Short label, 3=Picto, 4=Picto+Short label, 5=Short label+Picto, 6=Very short label+Picto
|
||||
* @param int $mode 0=Long label, 1=Short label, 2=Picto+Short label, 3=Picto, 4=Picto+Short label, 5=Short label+Picto, 6=Picto+Long label, 7=Very short label+Picto
|
||||
* @param int $hidenastatus 1=Show nothing if status is "Not applicable"
|
||||
* @return string Label
|
||||
*/
|
||||
@@ -1075,12 +1076,20 @@ class ActionComm extends CommonObject
|
||||
else if ($percent >= 100) return $langs->trans('StatusActionDone').' '.img_picto($langs->trans('StatusActionDone'),'statut6');
|
||||
}
|
||||
else if ($mode == 6)
|
||||
{
|
||||
if ($percent==-1 && ! $hidenastatus) return $langs->trans('StatusNotApplicable').' '.img_picto($langs->trans('StatusNotApplicable'),'statut9');
|
||||
else if ($percent==0) return $langs->trans('StatusActionToDo').'0% '.img_picto($langs->trans('StatusActionToDo'),'statut1');
|
||||
else if ($percent > 0 && $percent < 100) return $langs->trans('StatusActionInProcess').' ('.$percent.'%) '.img_picto($langs->trans('StatusActionInProcess').' - '.$percent.'%','statut3');
|
||||
else if ($percent >= 100) return $langs->trans('StatusActionDone').' (100%) '.img_picto($langs->trans('StatusActionDone'),'statut6');
|
||||
}
|
||||
else if ($mode == 7)
|
||||
{
|
||||
if ($percent==-1 && ! $hidenastatus) return img_picto($langs->trans('StatusNotApplicable'),'statut9');
|
||||
else if ($percent==0) return '0% '.img_picto($langs->trans('StatusActionToDo'),'statut1');
|
||||
else if ($percent > 0 && $percent < 100) return $percent.'% '.img_picto($langs->trans('StatusActionInProcess').' - '.$percent.'%','statut3');
|
||||
else if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6');
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
@@ -123,30 +123,49 @@ if ($object->id > 0)
|
||||
|
||||
dol_fiche_head($head, 'documents', $langs->trans("Action"),0,'action');
|
||||
|
||||
$linkback = img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"');
|
||||
$linkback.= '<a href="'.DOL_URL_ROOT.'/comm/action/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Link to other agenda views
|
||||
$out='';
|
||||
$out.=img_picto($langs->trans("ViewPerUser"),'object_calendarperuser','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewPerUser").'</a>';
|
||||
$out.='<br>';
|
||||
$out.=img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewCal").'</a>';
|
||||
$out.=img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewWeek").'</a>';
|
||||
$out.=img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewDay").'</a>';
|
||||
|
||||
$linkback.=$out;
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
// Affichage fiche action en mode visu
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/action/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
/*print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
print '</td></tr>';
|
||||
print '</td></tr>';*/
|
||||
|
||||
// Type
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="3">'.$object->type.'</td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td colspan="3">'.$object->type.'</td></tr>';
|
||||
}
|
||||
|
||||
// Title
|
||||
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3">'.$object->label.'</td></tr>';
|
||||
//print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3">'.$object->label.'</td></tr>';
|
||||
|
||||
// Full day event
|
||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3">'.yn($object->fulldayevent, 3).'</td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("EventOnFullDay").'</td><td colspan="3">'.yn($object->fulldayevent, 3).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td width="30%">'.$langs->trans("DateActionStart").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("DateActionStart").'</td><td colspan="3">';
|
||||
if (! $object->fulldayevent) print dol_print_date($object->datep,'dayhour');
|
||||
else print dol_print_date($object->datep,'day');
|
||||
if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
@@ -161,9 +180,9 @@ if ($object->id > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="2">';
|
||||
/*print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="2">';
|
||||
print $object->getLibStatut(4);
|
||||
print '</td></tr>';
|
||||
print '</td></tr>';*/
|
||||
|
||||
// Location
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
||||
@@ -172,7 +191,7 @@ if ($object->id > 0)
|
||||
}
|
||||
|
||||
// Assigned to
|
||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
||||
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
||||
$listofuserid=array();
|
||||
if (empty($donotclearsession))
|
||||
{
|
||||
@@ -206,11 +225,15 @@ if ($object->id > 0)
|
||||
}
|
||||
print ' </td></tr>';
|
||||
|
||||
print '</table><br><br><table class="border" width="100%">';
|
||||
print '</table>';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
// Third party - Contact
|
||||
print '<tr><td width="30%">'.$langs->trans("ActionOnCompany").'</td><td>'.($object->thirdparty->id?$object->thirdparty->getNomUrl(1):$langs->trans("None"));
|
||||
print '<tr><td class="titlefield">'.$langs->trans("ActionOnCompany").'</td><td>'.($object->thirdparty->id?$object->thirdparty->getNomUrl(1):$langs->trans("None"));
|
||||
if (is_object($object->thirdparty) && $object->thirdparty->id > 0 && $object->type_code == 'AC_TEL')
|
||||
{
|
||||
if ($object->thirdparty->fetch($object->thirdparty->id))
|
||||
@@ -281,7 +304,7 @@ if ($object->id > 0)
|
||||
}
|
||||
|
||||
|
||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td class="titlefield" class="nowrap">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@@ -289,54 +312,6 @@ if ($object->id > 0)
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
|
||||
if ($action != 'edit')
|
||||
{
|
||||
// Link to agenda views
|
||||
print '<div id="agendaviewbutton">';
|
||||
print '<form name="listactionsfiltermonth" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST" style="float: left; padding-right: 10px;">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_month">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"').' <input type="submit" style="min-width: 120px" class="button buttonactionview" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST" style="float: left; padding-right: 10px;">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_week">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarweek','class="hideonsmartphone pictoactionview"').' <input type="submit" style="min-width: 120px" class="button buttonactionview" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST" style="float: left; padding-right: 10px;">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_day">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone pictoactionview"').' <input type="submit" style="min-width: 120px" class="button buttonactionview" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterperuser" action="'.DOL_URL_ROOT.'/comm/action/peruser.php" method="POST" style="float: left; padding-right: 10px;">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="show_peruser">';
|
||||
print '<input type="hidden" name="year" value="'.dol_print_date($object->datep,'%Y').'">';
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($object->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($object->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarperuser','class="hideonsmartphone pictoactionview"').' <input type="submit" style="min-width: 120px" class="button buttonactionview" name="viewperuser" value="'.$langs->trans("ViewPerUser").'">';
|
||||
print '</form>'."\n";
|
||||
print '</div>';
|
||||
|
||||
print '<div style="clear: both"></div>';
|
||||
print "<br><br>";
|
||||
}
|
||||
|
||||
|
||||
$modulepart = 'actions';
|
||||
$permission = $user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create;
|
||||
$param = '&id=' . $object->id;
|
||||
|
||||
@@ -50,19 +50,41 @@ $result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions|
|
||||
$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
|
||||
llxHeader('',$langs->trans("Agenda"),$help_url);
|
||||
|
||||
$act = new ActionComm($db);
|
||||
$act->fetch($id);
|
||||
$act->info($act->id);
|
||||
$object = new ActionComm($db);
|
||||
$object->fetch($id);
|
||||
$object->info($object->id);
|
||||
|
||||
$head=actions_prepare_head($act);
|
||||
$head=actions_prepare_head($object);
|
||||
dol_fiche_head($head, 'info', $langs->trans("Action"),0,'action');
|
||||
|
||||
$linkback = img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"');
|
||||
$linkback.= '<a href="'.DOL_URL_ROOT.'/comm/action/index.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Link to other agenda views
|
||||
$out='';
|
||||
$out.=img_picto($langs->trans("ViewPerUser"),'object_calendarperuser','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewPerUser").'</a>';
|
||||
$out.='<br>';
|
||||
$out.=img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewCal").'</a>';
|
||||
$out.=img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewWeek").'</a>';
|
||||
$out.=img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewDay").'</a>';
|
||||
|
||||
$linkback.=$out;
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dol_print_object_info($act);
|
||||
dol_print_object_info($object);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
dol_fiche_end();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@@ -1661,6 +1661,8 @@ if ($action == 'create')
|
||||
print $formconfirm;
|
||||
|
||||
|
||||
// Proposal card
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
|
||||
@@ -1669,7 +1671,10 @@ if ($action == 'create')
|
||||
// Ref customer
|
||||
$morehtmlref.=$langs->trans('RefCustomer').' ';
|
||||
if ($action != 'refclient' && ! empty($object->brouillon))
|
||||
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=refclient&id=' . $object->id . '">' . img_edit($langs->trans('Modify')) . '</a> : ';
|
||||
{
|
||||
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=refclient&id=' . $object->id . '">' . img_edit($langs->trans('Modify')) . '</a> ';
|
||||
}
|
||||
$morehtmlref.=' : ';
|
||||
if ($user->rights->propal->creer && $action == 'refclient') {
|
||||
$morehtmlref.='<form action="'.$_SERVER["PHP_SELF"].'?id=' . $object->id . '" method="post">';
|
||||
$morehtmlref.='<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
@@ -1719,8 +1724,12 @@ if ($action == 'create')
|
||||
|
||||
$morehtmlref.='</div>';
|
||||
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
@@ -1927,7 +1936,7 @@ if ($action == 'create')
|
||||
|
||||
// Payment mode
|
||||
print '<tr>';
|
||||
print '<td width="25%">';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
@@ -1947,7 +1956,7 @@ if ($action == 'create')
|
||||
{
|
||||
// Multicurrency code
|
||||
print '<tr>';
|
||||
print '<td width="25%">';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print fieldLabel('Currency','multicurrency_code');
|
||||
print '</td>';
|
||||
@@ -1964,7 +1973,7 @@ if ($action == 'create')
|
||||
|
||||
// Multicurrency rate
|
||||
print '<tr>';
|
||||
print '<td width="25%">';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||
print '</td>';
|
||||
@@ -2073,71 +2082,81 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$cols = 5;
|
||||
$cols = 2;
|
||||
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '<div class="fichehalfright">';
|
||||
print '<div class="ficheaddleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Amount HT
|
||||
print '<tr><td height="10">' . $langs->trans('AmountHT') . '</td>';
|
||||
print '<td class="nowrap" colspan="2">' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
|
||||
// Margin Infos
|
||||
if (! empty($conf->margin->enabled))
|
||||
{
|
||||
$rowspan=4;
|
||||
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) $rowspan++;
|
||||
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) $rowspan++;
|
||||
print '<td valign="top" width="50%" colspan="3" rowspan="'.$rowspan.'">';
|
||||
$formmargin->displayMarginInfos($object);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="nowrap">' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Amount VAT
|
||||
print '<tr><td height="10">' . $langs->trans('AmountVAT') . '</td>';
|
||||
print '<td class="nowrap" colspan="2">' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Amount Local Taxes
|
||||
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1
|
||||
{
|
||||
print '<tr><td height="10">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
|
||||
print '<td class="nowrap" colspan="2">' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2
|
||||
{
|
||||
print '<tr><td height="10">' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
|
||||
print '<td class="nowrap" colspan="2">' . price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Amount TTC
|
||||
print '<tr><td height="10">' . $langs->trans('AmountTTC') . '</td>';
|
||||
print '<td class="nowrap" colspan="2">' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
if (!empty($conf->multicurrency->enabled))
|
||||
{
|
||||
// Multicurrency Amount HT
|
||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
|
||||
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multicurrency Amount VAT
|
||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
|
||||
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multicurrency Amount TTC
|
||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
|
||||
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Statut
|
||||
//print '<tr><td height="10">' . $langs->trans('Status') . '</td><td align="left" colspan="2">' . $object->getLibStatut(4) . '</td></tr>';
|
||||
|
||||
print '</table><br>';
|
||||
print '</table>';
|
||||
|
||||
// Margin Infos
|
||||
if (! empty($conf->margin->enabled))
|
||||
{
|
||||
$formmargin->displayMarginInfos($object);
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth"></div><br>';
|
||||
|
||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) {
|
||||
$blocname = 'contacts';
|
||||
|
||||
@@ -1434,7 +1434,6 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
}
|
||||
$absolute_discount=$soc->getAvailableDiscounts();
|
||||
|
||||
$nbrow = 10;
|
||||
|
||||
print '<form name="crea_commande" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
@@ -1911,24 +1910,82 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
// Print form confirm
|
||||
print $formconfirm;
|
||||
|
||||
/*
|
||||
* Commande
|
||||
*/
|
||||
$nbrow = 9;
|
||||
if (! empty($conf->projet->enabled))
|
||||
$nbrow ++;
|
||||
|
||||
// Local taxes
|
||||
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0)
|
||||
$nbrow++;
|
||||
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0 )
|
||||
$nbrow++;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
// Order card
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
|
||||
// Ref customer
|
||||
$morehtmlref.=$langs->trans('RefCustomer').' ';
|
||||
if ($action != 'refclient' && ! empty($object->brouillon))
|
||||
{
|
||||
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=refclient&id=' . $object->id . '">' . img_edit($langs->trans('Modify')) . '</a> ';
|
||||
}
|
||||
$morehtmlref.=' : ';
|
||||
if ($user->rights->commande->creer && $action == 'refclient') {
|
||||
$morehtmlref.='<form action="'.$_SERVER["PHP_SELF"].'?id=' . $object->id . '" method="post">';
|
||||
$morehtmlref.='<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
$morehtmlref.='<input type="hidden" name="action" value="set_ref_client">';
|
||||
$morehtmlref.='<input type="text" class="flat" size="20" name="ref_client" value="' . $object->ref_client . '">';
|
||||
$morehtmlref.=' <input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
$morehtmlref.='</form>';
|
||||
} else {
|
||||
$morehtmlref.=$object->ref_client;
|
||||
}
|
||||
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$langs->trans('Company') . ' : ' . $soc->getNomUrl(1);
|
||||
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load("projects");
|
||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
if ($user->rights->commande->creer)
|
||||
{
|
||||
if ($action != 'classify')
|
||||
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||
if ($action == 'classify') {
|
||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||
$morehtmlref.='<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
$morehtmlref.='</form>';
|
||||
} else {
|
||||
$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
|
||||
}
|
||||
} else {
|
||||
if (! empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
$proj->fetch($object->fk_project);
|
||||
$morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">';
|
||||
$morehtmlref.=$proj->ref;
|
||||
$morehtmlref.='</a>';
|
||||
} else {
|
||||
$morehtmlref.='';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$morehtmlref.='</div>';
|
||||
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
/*
|
||||
print '<tr><td class="titlefield">' . $langs->trans('Ref') . '</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
@@ -1971,14 +2028,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
} else {
|
||||
print $soc->getNomUrl(1, 'compta');
|
||||
}
|
||||
print '</tr>';
|
||||
print '</tr>';*/
|
||||
|
||||
if ($soc->outstanding_limit)
|
||||
{
|
||||
// Outstanding Bill
|
||||
print '<tr><td>';
|
||||
print $langs->trans('OutstandingBill');
|
||||
print '</td><td colspan="3">';
|
||||
print '</td><td>';
|
||||
print price($soc->get_OutstandingBill()) . ' / ';
|
||||
print price($soc->outstanding_limit, 0, '', 1, - 1, - 1, $conf->currency);
|
||||
print '</td>';
|
||||
@@ -1999,7 +2056,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
$addabsolutediscount = '<a href="' . DOL_URL_ROOT . '/comm/remx.php?id=' . $soc->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"]) . '?facid=' . $object->id . '">' . $langs->trans("EditGlobalDiscounts") . '</a>';
|
||||
$addcreditnote = '<a href="' . DOL_URL_ROOT . '/compta/facture.php?action=create&socid=' . $soc->id . '&type=2&backtopage=' . urlencode($_SERVER["PHP_SELF"]) . '?facid=' . $object->id . '">' . $langs->trans("AddCreditNote") . '</a>';
|
||||
|
||||
print '<tr><td>' . $langs->trans('Discounts') . '</td><td colspan="3">';
|
||||
print '<tr><td>' . $langs->trans('Discounts') . '</td><td>';
|
||||
if ($soc->remise_percent)
|
||||
print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent);
|
||||
else
|
||||
@@ -2034,7 +2091,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
if ($action != 'editdate' && $object->brouillon)
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdate&id=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
print '</td><td>';
|
||||
if ($action == 'editdate') {
|
||||
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
@@ -2052,14 +2109,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '</tr>';
|
||||
|
||||
// Delivery date planed
|
||||
print '<tr><td height="10">';
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('DateDeliveryPlanned');
|
||||
print '</td>';
|
||||
if ($action != 'editdate_livraison')
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdate_livraison&id=' . $object->id . '">' . img_edit($langs->trans('SetDeliveryDate'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
print '</td><td>';
|
||||
if ($action == 'editdate_livraison') {
|
||||
print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
@@ -2085,7 +2142,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
if ($action != 'editshippingmethod' && $user->rights->commande->creer)
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editshippingmethod&id='.$object->id.'">'.img_edit($langs->trans('SetShippingMode'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
print '</td><td>';
|
||||
if ($action == 'editshippingmethod') {
|
||||
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1);
|
||||
} else {
|
||||
@@ -2106,7 +2163,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
if ($action != 'editwarehouse' && $user->rights->commande->creer)
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editwarehouse&id='.$object->id.'">'.img_edit($langs->trans('SetWarehouse'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
print '</td><td>';
|
||||
if ($action == 'editwarehouse') {
|
||||
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1);
|
||||
} else {
|
||||
@@ -2117,14 +2174,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
}
|
||||
|
||||
// Terms of payment
|
||||
print '<tr><td height="10">';
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentConditionsShort');
|
||||
print '</td>';
|
||||
if ($action != 'editconditions')
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&id=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
print '</td><td>';
|
||||
if ($action == 'editconditions') {
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id', 1);
|
||||
} else {
|
||||
@@ -2135,14 +2192,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '</tr>';
|
||||
|
||||
// Mode of payment
|
||||
print '<tr><td height="10">';
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($action != 'editmode')
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&id=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
print '</td><td>';
|
||||
if ($action == 'editmode') {
|
||||
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id');
|
||||
} else {
|
||||
@@ -2155,14 +2212,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
{
|
||||
// Multicurrency code
|
||||
print '<tr>';
|
||||
print '<td width="25%">';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print fieldLabel('Currency','multicurrency_code');
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencycode' && ! empty($object->brouillon))
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencycode&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="5">';
|
||||
print '</td><td>';
|
||||
if ($action == 'editmulticurrencycode') {
|
||||
$form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code');
|
||||
} else {
|
||||
@@ -2172,14 +2229,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
|
||||
// Multicurrency rate
|
||||
print '<tr>';
|
||||
print '<td width="25%">';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="5">';
|
||||
print '</td><td>';
|
||||
if ($action == 'editmulticurrencyrate') {
|
||||
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
|
||||
} else {
|
||||
@@ -2196,7 +2253,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
if ($action != 'editavailability')
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&id=' . $object->id . '">' . img_edit($langs->trans('SetAvailability'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
print '</td><td>';
|
||||
if ($action == 'editavailability') {
|
||||
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1);
|
||||
} else {
|
||||
@@ -2212,7 +2269,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
if ($action != 'editdemandreason')
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&id=' . $object->id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
print '</td><td>';
|
||||
if ($action == 'editdemandreason') {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1);
|
||||
} else {
|
||||
@@ -2230,7 +2287,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
if ($totalWeight || $totalVolume)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("CalculatedWeight").' / '.$langs->trans("CalculatedVolume").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND)?$conf->global->MAIN_WEIGHT_DEFAULT_ROUND:-1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?$conf->global->MAIN_WEIGHT_DEFAULT_UNIT:'no');
|
||||
print ' / ';
|
||||
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no');
|
||||
@@ -2240,6 +2297,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
// TODO How record was recorded OrderMode (llx_c_input_method)
|
||||
|
||||
// Project
|
||||
/*
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load('projects');
|
||||
@@ -2259,6 +2317,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
*/
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
@@ -2283,16 +2342,6 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$cols = 3;
|
||||
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||
|
||||
$rowspan = 4;
|
||||
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0)
|
||||
$rowspan ++;
|
||||
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0)
|
||||
$rowspan ++;
|
||||
|
||||
// Bank Account
|
||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled))
|
||||
{
|
||||
@@ -2313,20 +2362,23 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$cols = 2;
|
||||
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '<div class="fichehalfright">';
|
||||
print '<div class="ficheaddleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Total HT
|
||||
print '<tr><td>' . $langs->trans('AmountHT') . '</td>';
|
||||
print '<td>' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . '</td>';
|
||||
|
||||
// Margin Infos
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
print '<td valign="top" width="50%" colspan="2" rowspan="' . $rowspan . '">';
|
||||
$formmargin->displayMarginInfos($object);
|
||||
print '</td>';
|
||||
} else
|
||||
print '<td width="50%" colspan="2" rowspan="' . $rowspan . '"></td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
// Total VAT
|
||||
print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
||||
|
||||
@@ -2349,25 +2401,36 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
{
|
||||
// Multicurrency Amount HT
|
||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
|
||||
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multicurrency Amount VAT
|
||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
|
||||
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multicurrency Amount TTC
|
||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
|
||||
print '<td class="nowrap" colspan="2">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Statut
|
||||
print '<tr><td>' . $langs->trans('Status') . '</td><td>' . $object->getLibStatut(4) . '</td></tr>';
|
||||
//print '<tr><td>' . $langs->trans('Status') . '</td><td>' . $object->getLibStatut(4) . '</td></tr>';
|
||||
|
||||
print '</table><br>';
|
||||
print "\n";
|
||||
print '</table>';
|
||||
|
||||
// Margin Infos
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
$formmargin->displayMarginInfos($object);
|
||||
}
|
||||
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth"></div><br>';
|
||||
|
||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) {
|
||||
$blocname = 'contacts';
|
||||
|
||||
@@ -47,6 +47,7 @@ class Commande extends CommonOrder
|
||||
public $class_element_line = 'OrderLine';
|
||||
public $fk_element = 'fk_commande';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto = 'order';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
||||
@@ -209,7 +209,7 @@ class FormMargin
|
||||
if (!empty($hidemargininfos)) print '<script>$(document).ready(function() {$(".margininfos").hide();});</script>';
|
||||
}
|
||||
|
||||
print '<table class="nobordernopadding margintable" width="100%">';
|
||||
print '<table class="border margintable" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans('Margins').'</td>';
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans('SellingPrice').'</td>';
|
||||
|
||||
@@ -951,6 +951,12 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
{
|
||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
|
||||
if ($modulepart != 'unknown') $morehtmlleft.=$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos);
|
||||
else if ($object->element == 'action')
|
||||
{
|
||||
$cssclass='photorefcenter';
|
||||
$nophoto=img_picto('', 'title_agenda', '', false, 1);
|
||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.$nophoto.'"></div></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$width=14; $cssclass='photorefcenter';
|
||||
@@ -982,7 +988,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
}
|
||||
else {
|
||||
$tmptxt=$object->getLibStatut(6);
|
||||
if (empty($tmptxt)) $tmptxt=$object->getLibStatut(5);
|
||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) $tmptxt=$object->getLibStatut(5);
|
||||
$morehtmlright.=$tmptxt;
|
||||
}
|
||||
if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty
|
||||
|
||||
@@ -6,7 +6,7 @@ require_once(DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php');
|
||||
$form = new Form($db);
|
||||
$formresources = new FormResource($db);
|
||||
|
||||
$out .= '<div class="tagtable centpercent border allwidth nohover">';
|
||||
$out = '<div class="tagtable centpercent border allwidth nohover">';
|
||||
|
||||
$out .= '<form class="tagtr '.($var==true?'pair':'impair').'" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
$out .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@@ -96,8 +96,13 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
||||
|
||||
}
|
||||
else {
|
||||
print '<div class="tagtr '.($var==true?"pair":"impair").'"><div class="tagtd opacitymedium">'.$langs->trans('NoResourceLinked').'</div></div>';
|
||||
|
||||
print '<div class="tagtr '.($var==true?"pair":"impair").'">';
|
||||
print '<div class="tagtd opacitymedium">'.$langs->trans('NoResourceLinked').'</div>';
|
||||
print '<div class="tagtd opacitymedium"></div>';
|
||||
print '<div class="tagtd opacitymedium"></div>';
|
||||
print '<div class="tagtd opacitymedium"></div>';
|
||||
print '<div class="tagtd opacitymedium"></div>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
@@ -196,24 +196,105 @@ else
|
||||
|
||||
dol_fiche_head($head, 'resources', $langs->trans("Action"),0,'action');
|
||||
|
||||
// Affichage fiche action en mode visu
|
||||
print '<table class="border" width="100%">';
|
||||
$linkback =img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"');
|
||||
$linkback.= '<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php">'.$langs->trans("BackToList").'</a>';
|
||||
// Link to other agenda views
|
||||
$out='';
|
||||
$out.=img_picto($langs->trans("ViewPerUser"),'object_calendarperuser','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($act->datep,'%Y').'&month='.dol_print_date($act->datep,'%m').'&day='.dol_print_date($act->datep,'%d').'">'.$langs->trans("ViewPerUser").'</a>';
|
||||
$out.='<br>';
|
||||
$out.=img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_month&year='.dol_print_date($act->datep,'%Y').'&month='.dol_print_date($act->datep,'%m').'&day='.dol_print_date($act->datep,'%d').'">'.$langs->trans("ViewCal").'</a>';
|
||||
$out.=img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($act->datep,'%Y').'&month='.dol_print_date($act->datep,'%m').'&day='.dol_print_date($act->datep,'%d').'">'.$langs->trans("ViewWeek").'</a>';
|
||||
$out.=img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone pictoactionview"');
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($act->datep,'%Y').'&month='.dol_print_date($act->datep,'%m').'&day='.dol_print_date($act->datep,'%d').'">'.$langs->trans("ViewDay").'</a>';
|
||||
|
||||
$linkback.=$out;
|
||||
|
||||
dol_banner_tab($act, 'element_id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '', "&element=".$element);
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
/*print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $form->showrefnav($act, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||
print '</td></tr>';
|
||||
print '</td></tr>';*/
|
||||
|
||||
// Affichage fiche action en mode visu
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Type
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="3">'.$act->type.'</td></tr>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td colspan="3">'.$act->type.'</td></tr>';
|
||||
}
|
||||
|
||||
// Title
|
||||
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3">'.$act->label.'</td></tr>';
|
||||
// Full day event
|
||||
print '<tr><td class="titlefield">'.$langs->trans("EventOnFullDay").'</td><td colspan="3">'.yn($act->fulldayevent, 3).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateActionStart").'</td><td colspan="3">';
|
||||
if (! $act->fulldayevent) print dol_print_date($act->datep,'dayhour');
|
||||
else print dol_print_date($act->datep,'day');
|
||||
if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="3">';
|
||||
if (! $act->fulldayevent) print dol_print_date($act->datef,'dayhour');
|
||||
else print dol_print_date($act->datef,'day');
|
||||
if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late"));
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
/*print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="2">';
|
||||
print $act->getLibStatut(4);
|
||||
print '</td></tr>';*/
|
||||
|
||||
// Location
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3">'.$act->location.'</td></tr>';
|
||||
}
|
||||
|
||||
// Assigned to
|
||||
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
||||
$listofuserid=array();
|
||||
if (empty($donotclearsession))
|
||||
{
|
||||
if ($act->userownerid > 0) $listofuserid[$act->userownerid]=array('id'=>$act->userownerid,'transparency'=>$act->transparency); // Owner first
|
||||
if (! empty($act->userassigned)) // Now concat assigned users
|
||||
{
|
||||
// Restore array with key with same value than param 'id'
|
||||
$tmplist1=$act->userassigned; $tmplist2=array();
|
||||
foreach($tmplist1 as $key => $val)
|
||||
{
|
||||
if ($val['id'] && $val['id'] != $act->userownerid) $listofuserid[$val['id']]=$val;
|
||||
}
|
||||
}
|
||||
$_SESSION['assignedtouser']=json_encode($listofuserid);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!empty($_SESSION['assignedtouser']))
|
||||
{
|
||||
$listofuserid=json_decode($_SESSION['assignedtouser'], true);
|
||||
}
|
||||
}
|
||||
print '<div class="assignedtouser">';
|
||||
print $form->select_dolusers_forevent('view', 'assignedtouser', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print '</div>';
|
||||
if (in_array($user->id,array_keys($listofuserid)))
|
||||
{
|
||||
print '<div class="myavailability">';
|
||||
print $langs->trans("MyAvailability").': '.(($act->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody
|
||||
print '</div>';
|
||||
}
|
||||
print ' </td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
@@ -225,19 +306,18 @@ else
|
||||
*/
|
||||
if ($element_id && $element == 'societe')
|
||||
{
|
||||
$socstatic = fetchObjectByElement($element_id,$element);
|
||||
if (is_object($socstatic))
|
||||
{
|
||||
$socstatic = fetchObjectByElement($element_id, $element);
|
||||
if (is_object($socstatic)) {
|
||||
$savobject = $object;
|
||||
|
||||
$object = $socstatic;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
$head = societe_prepare_head($socstatic);
|
||||
|
||||
dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"),0,'company');
|
||||
dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), 0, 'company');
|
||||
|
||||
dol_banner_tab($socstatic, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
dol_banner_tab($socstatic, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
@@ -245,7 +325,7 @@ else
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Alias name (commercial, trademark or alias name)
|
||||
print '<tr><td class="titelfield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
||||
print '<tr><td class="titlefield">' . $langs->trans('AliasNames') . '</td><td colspan="3">';
|
||||
print $socstatic->name_alias;
|
||||
print "</td></tr>";
|
||||
|
||||
@@ -304,7 +384,7 @@ else
|
||||
|
||||
|
||||
//print load_fiche_titre($langs->trans('ResourcesLinkedToElement'),'','');
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Show list of resource links
|
||||
|
||||
@@ -333,7 +413,6 @@ else
|
||||
{
|
||||
$res=include DOL_DOCUMENT_ROOT . '/core/tpl/resource_add.tpl.php';
|
||||
}
|
||||
//var_dump($element_id);
|
||||
|
||||
if ($mode != 'add' || $resource_obj != $resource_type)
|
||||
{
|
||||
|
||||
@@ -2452,6 +2452,9 @@ div.refidno {
|
||||
font-size: <?php print $fontsize ?>px;
|
||||
line-height: 21px;
|
||||
}
|
||||
div.refidno form {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
div.pagination {
|
||||
float: right;
|
||||
|
||||
@@ -2342,6 +2342,9 @@ div.refidno {
|
||||
font-size: <?php print $fontsize ?>px;
|
||||
line-height: 21px;
|
||||
}
|
||||
div.refidno form {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
div.pagination {
|
||||
float: right;
|
||||
|
||||
Reference in New Issue
Block a user