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
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('actioncard','globalcard'));
|
$hookmanager->initHooks(array('actioncard','globalcard'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$listUserAssignedUpdated = false;
|
$listUserAssignedUpdated = false;
|
||||||
// Remove user to assigned list
|
// Remove user to assigned list
|
||||||
if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')
|
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 ($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 (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"));
|
if (GETPOST("actioncode") == 'AC_RDV') print load_fiche_titre($langs->trans("AddActionRendezVous"), '', 'title_agenda');
|
||||||
else print load_fiche_titre($langs->trans("AddAnAction"));
|
else print load_fiche_titre($langs->trans("AddAnAction"), '', 'title_agenda');
|
||||||
|
|
||||||
dol_fiche_head();
|
dol_fiche_head();
|
||||||
|
|
||||||
@@ -1183,33 +1185,51 @@ if ($id > 0)
|
|||||||
print $formconfirm;
|
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
|
// Affichage fiche action en mode visu
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php">'.$langs->trans("BackToList").'</a>';
|
|
||||||
|
|
||||||
// Ref
|
// 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 $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||||
print '</td></tr>';
|
print '</td></tr>';*/
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
if (! empty($conf->global->AGENDA_USE_EVENT_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
|
// 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
|
// 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;
|
$rowspan=4;
|
||||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION)) $rowspan++;
|
if (empty($conf->global->AGENDA_DISABLE_LOCATION)) $rowspan++;
|
||||||
|
|
||||||
// Date start
|
// 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');
|
if (! $object->fulldayevent) print dol_print_date($object->datep,'dayhour');
|
||||||
else print dol_print_date($object->datep,'day');
|
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"));
|
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>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status
|
// 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 $object->getLibStatut(4);
|
||||||
print '</td></tr>';
|
print '</td></tr>';*/
|
||||||
|
|
||||||
// Location
|
// Location
|
||||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
||||||
@@ -1235,7 +1255,7 @@ if ($id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Assigned to
|
// 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();
|
$listofuserid=array();
|
||||||
if (empty($donotclearsession))
|
if (empty($donotclearsession))
|
||||||
{
|
{
|
||||||
@@ -1291,7 +1311,7 @@ if ($id > 0)
|
|||||||
// Third party - Contact
|
// Third party - Contact
|
||||||
if ($conf->societe->enabled)
|
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 (is_object($object->thirdparty) && $object->thirdparty->id > 0 && $object->type_code == 'AC_TEL')
|
||||||
{
|
{
|
||||||
if ($object->thirdparty->fetch($object->thirdparty->id))
|
if ($object->thirdparty->fetch($object->thirdparty->id))
|
||||||
@@ -1323,7 +1343,7 @@ if ($id > 0)
|
|||||||
// Project
|
// Project
|
||||||
if (! empty($conf->projet->enabled))
|
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)
|
if ($object->fk_project)
|
||||||
{
|
{
|
||||||
$project=new Project($db);
|
$project=new Project($db);
|
||||||
@@ -1334,7 +1354,7 @@ if ($id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Priority
|
// 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 ($object->priority?$object->priority:'');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@@ -1432,46 +1452,6 @@ if ($id > 0)
|
|||||||
|
|
||||||
if ($action != 'edit')
|
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))
|
if (empty($conf->global->AGENDA_DISABLE_BUILDDOC))
|
||||||
{
|
{
|
||||||
print '<div style="clear:both;"> <br><br></div><div class="fichecenter"><div class="fichehalfleft">';
|
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_element = 'actioncomm';
|
||||||
public $table_rowid = 'id';
|
public $table_rowid = 'id';
|
||||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
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
|
* Id of the event
|
||||||
@@ -1024,7 +1025,7 @@ class ActionComm extends CommonObject
|
|||||||
* Return label of action status
|
* Return label of action status
|
||||||
*
|
*
|
||||||
* @param int $percent Percent
|
* @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"
|
* @param int $hidenastatus 1=Show nothing if status is "Not applicable"
|
||||||
* @return string Label
|
* @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 ($percent >= 100) return $langs->trans('StatusActionDone').' '.img_picto($langs->trans('StatusActionDone'),'statut6');
|
||||||
}
|
}
|
||||||
else if ($mode == 6)
|
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');
|
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) 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 > 0 && $percent < 100) return $percent.'% '.img_picto($langs->trans('StatusActionInProcess').' - '.$percent.'%','statut3');
|
||||||
else if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6');
|
else if ($percent >= 100) return img_picto($langs->trans('StatusActionDone'),'statut6');
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,30 +123,49 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'documents', $langs->trans("Action"),0,'action');
|
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
|
// Affichage fiche action en mode visu
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/action/index.php">'.$langs->trans("BackToList").'</a>';
|
|
||||||
|
|
||||||
// Ref
|
// 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 $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '');
|
||||||
print '</td></tr>';
|
print '</td></tr>';*/
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
if (! empty($conf->global->AGENDA_USE_EVENT_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
|
// 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
|
// 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
|
// 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');
|
if (! $object->fulldayevent) print dol_print_date($object->datep,'dayhour');
|
||||||
else print dol_print_date($object->datep,'day');
|
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"));
|
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>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status
|
// 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 $object->getLibStatut(4);
|
||||||
print '</td></tr>';
|
print '</td></tr>';*/
|
||||||
|
|
||||||
// Location
|
// Location
|
||||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
||||||
@@ -172,7 +191,7 @@ if ($object->id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Assigned to
|
// 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();
|
$listofuserid=array();
|
||||||
if (empty($donotclearsession))
|
if (empty($donotclearsession))
|
||||||
{
|
{
|
||||||
@@ -206,11 +225,15 @@ if ($object->id > 0)
|
|||||||
}
|
}
|
||||||
print ' </td></tr>';
|
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
|
// 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 (is_object($object->thirdparty) && $object->thirdparty->id > 0 && $object->type_code == 'AC_TEL')
|
||||||
{
|
{
|
||||||
if ($object->thirdparty->fetch($object->thirdparty->id))
|
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 '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@@ -289,54 +312,6 @@ if ($object->id > 0)
|
|||||||
dol_fiche_end();
|
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';
|
$modulepart = 'actions';
|
||||||
$permission = $user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create;
|
$permission = $user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create;
|
||||||
$param = '&id=' . $object->id;
|
$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';
|
$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
|
||||||
llxHeader('',$langs->trans("Agenda"),$help_url);
|
llxHeader('',$langs->trans("Agenda"),$help_url);
|
||||||
|
|
||||||
$act = new ActionComm($db);
|
$object = new ActionComm($db);
|
||||||
$act->fetch($id);
|
$object->fetch($id);
|
||||||
$act->info($act->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');
|
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>';
|
print '<table width="100%"><tr><td>';
|
||||||
dol_print_object_info($act);
|
dol_print_object_info($object);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</div>';
|
dol_fiche_end();
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@@ -1661,6 +1661,8 @@ if ($action == 'create')
|
|||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
|
|
||||||
|
|
||||||
|
// Proposal card
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$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
|
// Ref customer
|
||||||
$morehtmlref.=$langs->trans('RefCustomer').' ';
|
$morehtmlref.=$langs->trans('RefCustomer').' ';
|
||||||
if ($action != 'refclient' && ! empty($object->brouillon))
|
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') {
|
if ($user->rights->propal->creer && $action == 'refclient') {
|
||||||
$morehtmlref.='<form action="'.$_SERVER["PHP_SELF"].'?id=' . $object->id . '" method="post">';
|
$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="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||||
@@ -1719,8 +1724,12 @@ if ($action == 'create')
|
|||||||
|
|
||||||
$morehtmlref.='</div>';
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
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 '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
@@ -1927,7 +1936,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Payment mode
|
// Payment mode
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="25%">';
|
print '<td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('PaymentMode');
|
print $langs->trans('PaymentMode');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -1947,7 +1956,7 @@ if ($action == 'create')
|
|||||||
{
|
{
|
||||||
// Multicurrency code
|
// Multicurrency code
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="25%">';
|
print '<td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print fieldLabel('Currency','multicurrency_code');
|
print fieldLabel('Currency','multicurrency_code');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -1964,7 +1973,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Multicurrency rate
|
// Multicurrency rate
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="25%">';
|
print '<td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -2073,71 +2082,81 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 5;
|
$cols = 2;
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
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
|
// Amount HT
|
||||||
print '<tr><td height="10">' . $langs->trans('AmountHT') . '</td>';
|
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>';
|
print '<td class="nowrap">' . 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 '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Amount VAT
|
// Amount VAT
|
||||||
print '<tr><td height="10">' . $langs->trans('AmountVAT') . '</td>';
|
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>';
|
print '</tr>';
|
||||||
|
|
||||||
// Amount Local Taxes
|
// Amount Local Taxes
|
||||||
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1
|
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1
|
||||||
{
|
{
|
||||||
print '<tr><td height="10">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
|
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>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2
|
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2
|
||||||
{
|
{
|
||||||
print '<tr><td height="10">' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
|
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>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Amount TTC
|
// Amount TTC
|
||||||
print '<tr><td height="10">' . $langs->trans('AmountTTC') . '</td>';
|
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>';
|
print '</tr>';
|
||||||
|
|
||||||
if (!empty($conf->multicurrency->enabled))
|
if (!empty($conf->multicurrency->enabled))
|
||||||
{
|
{
|
||||||
// Multicurrency Amount HT
|
// Multicurrency Amount HT
|
||||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
|
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>';
|
print '</tr>';
|
||||||
|
|
||||||
// Multicurrency Amount VAT
|
// Multicurrency Amount VAT
|
||||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
|
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>';
|
print '</tr>';
|
||||||
|
|
||||||
// Multicurrency Amount TTC
|
// Multicurrency Amount TTC
|
||||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
|
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>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
//print '<tr><td height="10">' . $langs->trans('Status') . '</td><td align="left" colspan="2">' . $object->getLibStatut(4) . '</td></tr>';
|
//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)) {
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) {
|
||||||
$blocname = 'contacts';
|
$blocname = 'contacts';
|
||||||
|
|||||||
@@ -1434,7 +1434,6 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
$absolute_discount=$soc->getAvailableDiscounts();
|
$absolute_discount=$soc->getAvailableDiscounts();
|
||||||
|
|
||||||
$nbrow = 10;
|
|
||||||
|
|
||||||
print '<form name="crea_commande" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
print '<form name="crea_commande" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||||
@@ -1911,24 +1910,82 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
// Print form confirm
|
// Print form confirm
|
||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
|
|
||||||
/*
|
|
||||||
* Commande
|
|
||||||
*/
|
|
||||||
$nbrow = 9;
|
|
||||||
if (! empty($conf->projet->enabled))
|
|
||||||
$nbrow ++;
|
|
||||||
|
|
||||||
// Local taxes
|
// Order card
|
||||||
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%">';
|
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
$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
|
// Ref
|
||||||
|
/*
|
||||||
print '<tr><td class="titlefield">' . $langs->trans('Ref') . '</td>';
|
print '<tr><td class="titlefield">' . $langs->trans('Ref') . '</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||||
@@ -1971,14 +2028,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
} else {
|
} else {
|
||||||
print $soc->getNomUrl(1, 'compta');
|
print $soc->getNomUrl(1, 'compta');
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';*/
|
||||||
|
|
||||||
if ($soc->outstanding_limit)
|
if ($soc->outstanding_limit)
|
||||||
{
|
{
|
||||||
// Outstanding Bill
|
// Outstanding Bill
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans('OutstandingBill');
|
print $langs->trans('OutstandingBill');
|
||||||
print '</td><td colspan="3">';
|
print '</td><td>';
|
||||||
print price($soc->get_OutstandingBill()) . ' / ';
|
print price($soc->get_OutstandingBill()) . ' / ';
|
||||||
print price($soc->outstanding_limit, 0, '', 1, - 1, - 1, $conf->currency);
|
print price($soc->outstanding_limit, 0, '', 1, - 1, - 1, $conf->currency);
|
||||||
print '</td>';
|
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>';
|
$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>';
|
$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)
|
if ($soc->remise_percent)
|
||||||
print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent);
|
print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent);
|
||||||
else
|
else
|
||||||
@@ -2034,7 +2091,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
if ($action != 'editdate' && $object->brouillon)
|
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 '<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 '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td>';
|
||||||
if ($action == 'editdate') {
|
if ($action == 'editdate') {
|
||||||
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||||
@@ -2052,14 +2109,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Delivery date planed
|
// Delivery date planed
|
||||||
print '<tr><td height="10">';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('DateDeliveryPlanned');
|
print $langs->trans('DateDeliveryPlanned');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editdate_livraison')
|
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 '<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 '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td>';
|
||||||
if ($action == 'editdate_livraison') {
|
if ($action == 'editdate_livraison') {
|
||||||
print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
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)
|
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 '<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 '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td>';
|
||||||
if ($action == 'editshippingmethod') {
|
if ($action == 'editshippingmethod') {
|
||||||
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1);
|
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1);
|
||||||
} else {
|
} else {
|
||||||
@@ -2106,7 +2163,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
if ($action != 'editwarehouse' && $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 '<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 '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td>';
|
||||||
if ($action == 'editwarehouse') {
|
if ($action == 'editwarehouse') {
|
||||||
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1);
|
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1);
|
||||||
} else {
|
} else {
|
||||||
@@ -2117,14 +2174,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Terms of payment
|
// Terms of payment
|
||||||
print '<tr><td height="10">';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('PaymentConditionsShort');
|
print $langs->trans('PaymentConditionsShort');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editconditions')
|
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 '<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 '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td>';
|
||||||
if ($action == 'editconditions') {
|
if ($action == 'editconditions') {
|
||||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id', 1);
|
$form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id', 1);
|
||||||
} else {
|
} else {
|
||||||
@@ -2135,14 +2192,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Mode of payment
|
// Mode of payment
|
||||||
print '<tr><td height="10">';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('PaymentMode');
|
print $langs->trans('PaymentMode');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editmode')
|
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 '<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 '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td>';
|
||||||
if ($action == 'editmode') {
|
if ($action == 'editmode') {
|
||||||
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id');
|
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id');
|
||||||
} else {
|
} else {
|
||||||
@@ -2155,14 +2212,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
{
|
{
|
||||||
// Multicurrency code
|
// Multicurrency code
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="25%">';
|
print '<td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print fieldLabel('Currency','multicurrency_code');
|
print fieldLabel('Currency','multicurrency_code');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editmulticurrencycode' && ! empty($object->brouillon))
|
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 '<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 '</tr></table>';
|
||||||
print '</td><td colspan="5">';
|
print '</td><td>';
|
||||||
if ($action == 'editmulticurrencycode') {
|
if ($action == 'editmulticurrencycode') {
|
||||||
$form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code');
|
$form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code');
|
||||||
} else {
|
} else {
|
||||||
@@ -2172,14 +2229,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
// Multicurrency rate
|
// Multicurrency rate
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="25%">';
|
print '<td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
|
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 '<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 '</tr></table>';
|
||||||
print '</td><td colspan="5">';
|
print '</td><td>';
|
||||||
if ($action == 'editmulticurrencyrate') {
|
if ($action == 'editmulticurrencyrate') {
|
||||||
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
|
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
|
||||||
} else {
|
} else {
|
||||||
@@ -2196,7 +2253,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
if ($action != 'editavailability')
|
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 '<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 '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td>';
|
||||||
if ($action == 'editavailability') {
|
if ($action == 'editavailability') {
|
||||||
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1);
|
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1);
|
||||||
} else {
|
} else {
|
||||||
@@ -2212,7 +2269,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
if ($action != 'editdemandreason')
|
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 '<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 '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td>';
|
||||||
if ($action == 'editdemandreason') {
|
if ($action == 'editdemandreason') {
|
||||||
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1);
|
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1);
|
||||||
} else {
|
} else {
|
||||||
@@ -2230,7 +2287,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
if ($totalWeight || $totalVolume)
|
if ($totalWeight || $totalVolume)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("CalculatedWeight").' / '.$langs->trans("CalculatedVolume").'</td>';
|
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 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 ' / ';
|
||||||
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');
|
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)
|
// TODO How record was recorded OrderMode (llx_c_input_method)
|
||||||
|
|
||||||
// Project
|
// Project
|
||||||
|
/*
|
||||||
if (! empty($conf->projet->enabled))
|
if (! empty($conf->projet->enabled))
|
||||||
{
|
{
|
||||||
$langs->load('projects');
|
$langs->load('projects');
|
||||||
@@ -2259,6 +2317,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
if (!empty($conf->incoterm->enabled))
|
if (!empty($conf->incoterm->enabled))
|
||||||
@@ -2283,16 +2342,6 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
print '</td></tr>';
|
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
|
// Bank Account
|
||||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled))
|
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>';
|
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
|
// Total HT
|
||||||
print '<tr><td>' . $langs->trans('AmountHT') . '</td>';
|
print '<tr><td>' . $langs->trans('AmountHT') . '</td>';
|
||||||
print '<td>' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . '</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
|
// Total VAT
|
||||||
print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
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
|
// Multicurrency Amount HT
|
||||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
|
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>';
|
print '</tr>';
|
||||||
|
|
||||||
// Multicurrency Amount VAT
|
// Multicurrency Amount VAT
|
||||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
|
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>';
|
print '</tr>';
|
||||||
|
|
||||||
// Multicurrency Amount TTC
|
// Multicurrency Amount TTC
|
||||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
|
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>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Statut
|
// 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 '</table>';
|
||||||
print "\n";
|
|
||||||
|
// 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)) {
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) {
|
||||||
$blocname = 'contacts';
|
$blocname = 'contacts';
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ class Commande extends CommonOrder
|
|||||||
public $class_element_line = 'OrderLine';
|
public $class_element_line = 'OrderLine';
|
||||||
public $fk_element = 'fk_commande';
|
public $fk_element = 'fk_commande';
|
||||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
|
public $picto = 'order';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ class FormMargin
|
|||||||
if (!empty($hidemargininfos)) print '<script>$(document).ready(function() {$(".margininfos").hide();});</script>';
|
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 '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre">'.$langs->trans('Margins').'</td>';
|
print '<td class="liste_titre">'.$langs->trans('Margins').'</td>';
|
||||||
print '<td class="liste_titre" align="right">'.$langs->trans('SellingPrice').'</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">';
|
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
|
||||||
if ($modulepart != 'unknown') $morehtmlleft.=$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos);
|
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
|
else
|
||||||
{
|
{
|
||||||
$width=14; $cssclass='photorefcenter';
|
$width=14; $cssclass='photorefcenter';
|
||||||
@@ -982,7 +988,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$tmptxt=$object->getLibStatut(6);
|
$tmptxt=$object->getLibStatut(6);
|
||||||
if (empty($tmptxt)) $tmptxt=$object->getLibStatut(5);
|
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) $tmptxt=$object->getLibStatut(5);
|
||||||
$morehtmlright.=$tmptxt;
|
$morehtmlright.=$tmptxt;
|
||||||
}
|
}
|
||||||
if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty
|
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);
|
$form = new Form($db);
|
||||||
$formresources = new FormResource($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 .= '<form class="tagtr '.($var==true?'pair':'impair').'" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
$out .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
$out .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|||||||
@@ -96,8 +96,13 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
|||||||
|
|
||||||
}
|
}
|
||||||
else {
|
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>';
|
print '</div>';
|
||||||
|
|||||||
@@ -196,24 +196,105 @@ else
|
|||||||
|
|
||||||
dol_fiche_head($head, 'resources', $langs->trans("Action"),0,'action');
|
dol_fiche_head($head, 'resources', $langs->trans("Action"),0,'action');
|
||||||
|
|
||||||
// Affichage fiche action en mode visu
|
$linkback =img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"');
|
||||||
print '<table class="border" width="100%">';
|
$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
|
// 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 $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
|
// Type
|
||||||
if (! empty($conf->global->AGENDA_USE_EVENT_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
|
// Full day event
|
||||||
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3">'.$act->label.'</td></tr>';
|
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>';
|
print '</table>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
@@ -225,19 +306,18 @@ else
|
|||||||
*/
|
*/
|
||||||
if ($element_id && $element == 'societe')
|
if ($element_id && $element == 'societe')
|
||||||
{
|
{
|
||||||
$socstatic = fetchObjectByElement($element_id,$element);
|
$socstatic = fetchObjectByElement($element_id, $element);
|
||||||
if (is_object($socstatic))
|
if (is_object($socstatic)) {
|
||||||
{
|
|
||||||
$savobject = $object;
|
$savobject = $object;
|
||||||
|
|
||||||
$object = $socstatic;
|
$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);
|
$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">';
|
print '<div class="fichecenter">';
|
||||||
|
|
||||||
@@ -245,7 +325,7 @@ else
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Alias name (commercial, trademark or alias name)
|
// 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 $socstatic->name_alias;
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
@@ -304,7 +384,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
//print load_fiche_titre($langs->trans('ResourcesLinkedToElement'),'','');
|
//print load_fiche_titre($langs->trans('ResourcesLinkedToElement'),'','');
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
// Show list of resource links
|
// Show list of resource links
|
||||||
|
|
||||||
@@ -333,7 +413,6 @@ else
|
|||||||
{
|
{
|
||||||
$res=include DOL_DOCUMENT_ROOT . '/core/tpl/resource_add.tpl.php';
|
$res=include DOL_DOCUMENT_ROOT . '/core/tpl/resource_add.tpl.php';
|
||||||
}
|
}
|
||||||
//var_dump($element_id);
|
|
||||||
|
|
||||||
if ($mode != 'add' || $resource_obj != $resource_type)
|
if ($mode != 'add' || $resource_obj != $resource_type)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2452,6 +2452,9 @@ div.refidno {
|
|||||||
font-size: <?php print $fontsize ?>px;
|
font-size: <?php print $fontsize ?>px;
|
||||||
line-height: 21px;
|
line-height: 21px;
|
||||||
}
|
}
|
||||||
|
div.refidno form {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
div.pagination {
|
div.pagination {
|
||||||
float: right;
|
float: right;
|
||||||
|
|||||||
@@ -2342,6 +2342,9 @@ div.refidno {
|
|||||||
font-size: <?php print $fontsize ?>px;
|
font-size: <?php print $fontsize ?>px;
|
||||||
line-height: 21px;
|
line-height: 21px;
|
||||||
}
|
}
|
||||||
|
div.refidno form {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
div.pagination {
|
div.pagination {
|
||||||
float: right;
|
float: right;
|
||||||
|
|||||||
Reference in New Issue
Block a user