Try to solve pb with too many columns. Merge 2 columns of amounts in 1
This commit is contained in:
parent
a4059882a9
commit
eef07afc90
@ -1200,7 +1200,7 @@ if ($action == 'create')
|
||||
{
|
||||
print '<td>';
|
||||
print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300');
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddThirdParty").'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
@ -1242,7 +1242,7 @@ if ($action == 'create')
|
||||
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, "projectid", 0, 0, 1, 1);
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>';
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@ -2191,7 +2191,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
||||
{
|
||||
if (!in_array('prospectionstatus', $hiddenfields)) print_liste_field_titre("OpportunityStatus", "", "", "", "", '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("OpportunityAmount", "", "", "", "", 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('OpportunityWeightedAmount', '', '', '', '', 'align="right"', $sortfield, $sortorder);
|
||||
//print_liste_field_titre('OpportunityWeightedAmount', '', '', '', '', 'align="right"', $sortfield, $sortorder);
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
@ -2225,10 +2225,11 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td>';
|
||||
print '<td class="tdoverflowmax150">';
|
||||
print $projectstatic->getNomUrl(1, '', 0, '', '-', 0, -1, 'nowraponall');
|
||||
if (!in_array('projectlabel', $hiddenfields)) print '<br><span class="opacitymedium">'.dol_trunc($objp->title, 24).'</span>';
|
||||
print '</td>';
|
||||
|
||||
print '<td class="nowraponall tdoverflowmax100">';
|
||||
if ($objp->fk_soc > 0)
|
||||
{
|
||||
@ -2242,7 +2243,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
if (!in_array('prospectionstatus', $hiddenfields)) {
|
||||
print '<td class="center">';
|
||||
print '<td class="center tdoverflowmax75">';
|
||||
// Because color of prospection status has no meaning yet, it is used if hidden constant is set
|
||||
if (empty($conf->global->USE_COLOR_FOR_PROSPECTION_STATUS)) {
|
||||
$oppStatusCode = dol_getIdFromCode($db, $objp->opp_status, 'c_lead_status', 'rowid', 'code');
|
||||
@ -2269,14 +2270,12 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
||||
}
|
||||
|
||||
print '<td class="right">';
|
||||
if ($objp->opp_amount) print price($objp->opp_amount, 0, '', 1, -1, -1, $conf->currency);
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
if ($objp->opp_percent && $objp->opp_amount) {
|
||||
$opp_weighted_amount = $objp->opp_percent * $objp->opp_amount / 100;
|
||||
print price($opp_weighted_amount, 0, '', 1, -1, -1, $conf->currency);
|
||||
$ponderated_opp_amount += price2num($opp_weighted_amount);
|
||||
}
|
||||
if ($objp->opp_percent && $objp->opp_amount) {
|
||||
$opp_weighted_amount = $objp->opp_percent * $objp->opp_amount / 100;
|
||||
$alttext = $langs->trans("OpportunityWeightedAmount").' '.price($opp_weighted_amount, 0, '', 1, -1, 0, $conf->currency);
|
||||
$ponderated_opp_amount += price2num($opp_weighted_amount);
|
||||
}
|
||||
if ($objp->opp_amount) print '<span title="'.$alttext.'">'.price($objp->opp_amount, 0, '', 1, -1, 0, $conf->currency).'</span>';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
@ -2317,14 +2316,16 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
||||
}
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="2">'.$langs->trans("Total")."</td>";
|
||||
print '<td>'.$langs->trans("Total")."</td><td></td>";
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
if (!in_array('prospectionstatus', $hiddenfields)) {
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
print '<td class="liste_total right">'.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).'</td>';
|
||||
print '<td class="liste_total right">'.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1).'</td>';
|
||||
print '<td class="liste_total right">';
|
||||
//$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1);
|
||||
print $form->textwithpicto(price($total_opp_amount, 0, '', 1, -1, 0, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc").' : '.price($ponderated_opp_amount, 0, '', 1, -1, 0, $conf->currency));
|
||||
print '</td>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
|
||||
@ -65,6 +65,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('doncard', 'globalcard'));
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
@ -409,11 +410,11 @@ if ($action == 'create')
|
||||
|
||||
// Country
|
||||
print '<tr><td><label for="selectcountry_id">'.$langs->trans('Country').'</label></td><td class="maxwidthonsmartphone">';
|
||||
print $form->select_country(GETPOST('country_id') != '' ?GETPOST('country_id') : $object->country_id);
|
||||
print img_picto('', 'globe-americas', 'class="paddingrightonly"').$form->select_country(GETPOST('country_id') != '' ?GETPOST('country_id') : $object->country_id);
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" value="'.dol_escape_htmltag(GETPOST("email")).'" class="maxwidth200"></td></tr>';
|
||||
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td>'.img_picto('', 'object_email', 'class="paddingrightonly"').'<input type="text" name="email" value="'.dol_escape_htmltag(GETPOST("email")).'" class="maxwidth200"></td></tr>';
|
||||
}
|
||||
|
||||
// Payment mode
|
||||
|
||||
Loading…
Reference in New Issue
Block a user