|
@@ -503,6 +503,7 @@ $listofreferent = array(
|
|
|
'buttonnew'=>'CreateMO',
|
|
|
'testnew'=>$user->hasRight('mrp', 'write'),
|
|
|
'project_field'=>'fk_project',
|
|
|
+ 'nototal'=>1,
|
|
|
'test'=>!empty($conf->mrp->enabled) && $user->hasRight('mrp', 'read')),
|
|
|
'trip'=>array(
|
|
|
'name'=>"TripsAndExpenses",
|
|
@@ -991,6 +992,7 @@ foreach ($listofreferent as $key => $value) {
|
|
|
$buttonnew = empty($value['buttonnew']) ? '' : $value['buttonnew'];
|
|
|
$testnew = empty($value['testnew']) ? '' : $value['testnew'];
|
|
|
$project_field = empty($value['project_field']) ? '' : $value['project_field'];
|
|
|
+ $nototal = empty($value['nototal']) ? 0 : 1;
|
|
|
|
|
|
$exclude_select_element = array('payment_various');
|
|
|
if (!empty($value['exclude_select_element'])) {
|
|
@@ -1517,47 +1519,49 @@ foreach ($listofreferent as $key => $value) {
|
|
|
}
|
|
|
|
|
|
// Total
|
|
|
- $colspan = 4;
|
|
|
- if (in_array($tablename, array('projet_task'))) {
|
|
|
- $colspan = 2;
|
|
|
- }
|
|
|
+ if (empty($nototal)) {
|
|
|
+ $colspan = 4;
|
|
|
+ if (in_array($tablename, array('projet_task'))) {
|
|
|
+ $colspan = 2;
|
|
|
+ }
|
|
|
|
|
|
- print '<tr class="liste_total"><td colspan="'.$colspan.'">'.$langs->trans("Number").': '.$i.'</td>';
|
|
|
- if (in_array($tablename, array('projet_task'))) {
|
|
|
- print '<td class="center">';
|
|
|
- print convertSecondToTime($total_time, 'allhourmin');
|
|
|
- print '</td>';
|
|
|
- print '<td>';
|
|
|
- print '</td>';
|
|
|
- }
|
|
|
- //if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("TotalHT").' : '.price($total_ht).'</td>';
|
|
|
- //elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("Total").' : '.price($total_ht).'</td>';
|
|
|
- // If fichinter add the total_duration
|
|
|
- if ($tablename == 'fichinter') {
|
|
|
- print '<td class="left">'.convertSecondToTime($total_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>';
|
|
|
- }
|
|
|
- print '<td class="right">';
|
|
|
- if (empty($value['disableamount'])) {
|
|
|
- if ($key == 'loan') {
|
|
|
- print $langs->trans("Total").' '.$langs->trans("LoanCapital").' : '.price($total_ttc);
|
|
|
- } elseif ($tablename != 'projet_task' || !empty($conf->salaries->enabled)) {
|
|
|
- print ''.$langs->trans("TotalHT").' : '.price($total_ht);
|
|
|
+ print '<tr class="liste_total"><td colspan="'.$colspan.'">'.$langs->trans("Number").': '.$i.'</td>';
|
|
|
+ if (in_array($tablename, array('projet_task'))) {
|
|
|
+ print '<td class="center">';
|
|
|
+ print convertSecondToTime($total_time, 'allhourmin');
|
|
|
+ print '</td>';
|
|
|
+ print '<td>';
|
|
|
+ print '</td>';
|
|
|
}
|
|
|
- }
|
|
|
- print '</td>';
|
|
|
- //if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("TotalTTC").' : '.price($total_ttc).'</td>';
|
|
|
- //elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="100"></td>';
|
|
|
- print '<td class="right">';
|
|
|
- if (empty($value['disableamount'])) {
|
|
|
- if ($key == 'loan') {
|
|
|
- print $langs->trans("Total").' '.$langs->trans("RemainderToPay").' : '.price($total_ttc);
|
|
|
- } elseif ($tablename != 'projet_task' || !empty($conf->salaries->enabled)) {
|
|
|
- print $langs->trans("TotalTTC").' : '.price($total_ttc);
|
|
|
+ //if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("TotalHT").' : '.price($total_ht).'</td>';
|
|
|
+ //elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("Total").' : '.price($total_ht).'</td>';
|
|
|
+ // If fichinter add the total_duration
|
|
|
+ if ($tablename == 'fichinter') {
|
|
|
+ print '<td class="left">'.convertSecondToTime($total_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>';
|
|
|
+ }
|
|
|
+ print '<td class="right">';
|
|
|
+ if (empty($value['disableamount'])) {
|
|
|
+ if ($key == 'loan') {
|
|
|
+ print $langs->trans("Total").' '.$langs->trans("LoanCapital").' : '.price($total_ttc);
|
|
|
+ } elseif ($tablename != 'projet_task' || !empty($conf->salaries->enabled)) {
|
|
|
+ print ''.$langs->trans("TotalHT").' : '.price($total_ht);
|
|
|
+ }
|
|
|
}
|
|
|
+ print '</td>';
|
|
|
+ //if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("TotalTTC").' : '.price($total_ttc).'</td>';
|
|
|
+ //elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="100"></td>';
|
|
|
+ print '<td class="right">';
|
|
|
+ if (empty($value['disableamount'])) {
|
|
|
+ if ($key == 'loan') {
|
|
|
+ print $langs->trans("Total").' '.$langs->trans("RemainderToPay").' : '.price($total_ttc);
|
|
|
+ } elseif ($tablename != 'projet_task' || !empty($conf->salaries->enabled)) {
|
|
|
+ print $langs->trans("TotalTTC").' : '.price($total_ttc);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ print '</td>';
|
|
|
+ print '<td> </td>';
|
|
|
+ print '</tr>';
|
|
|
}
|
|
|
- print '</td>';
|
|
|
- print '<td> </td>';
|
|
|
- print '</tr>';
|
|
|
} else {
|
|
|
if (!is_array($elementarray)) { // error
|
|
|
print '<tr><td>'.$elementarray.'</td></tr>';
|