Fix look and feel v17

This commit is contained in:
Laurent Destailleur 2023-04-27 18:00:53 +02:00
parent 96e8474fe5
commit 0cf4fca331
2 changed files with 50 additions and 45 deletions

View File

@ -928,20 +928,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $userstatic->getNomUrl(-1); print $userstatic->getNomUrl(-1);
print "</td>\n"; print "</td>\n";
} }
// Inventory code
if (!empty($arrayfields['m.inventorycode']['checked'])) { if (!empty($arrayfields['m.inventorycode']['checked'])) {
// Inventory code print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($objp->inventorycode).'">';
print '<td>';
//print '<a href="' . DOL_URL_ROOT . '/product/stock/movement_card.php' . '?id=' . $objp->entrepot_id . '&amp;search_inventorycode=' . $objp->inventorycode . '&amp;search_type_mouvement=' . $objp->type_mouvement . '">'; //print '<a href="' . DOL_URL_ROOT . '/product/stock/movement_card.php' . '?id=' . $objp->entrepot_id . '&amp;search_inventorycode=' . $objp->inventorycode . '&amp;search_type_mouvement=' . $objp->type_mouvement . '">';
print dol_escape_htmltag($objp->inventorycode); print dol_escape_htmltag($objp->inventorycode);
//print '</a>'; //print '</a>';
print '</td>'; print '</td>';
} }
// Label of movement
if (!empty($arrayfields['m.label']['checked'])) { if (!empty($arrayfields['m.label']['checked'])) {
// Label of movement
print '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($objp->label).'">'.dol_escape_htmltag($objp->label).'</td>'; print '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($objp->label).'">'.dol_escape_htmltag($objp->label).'</td>';
} }
// Type of movement
if (!empty($arrayfields['m.type_mouvement']['checked'])) { if (!empty($arrayfields['m.type_mouvement']['checked'])) {
// Type of movement
switch ($objp->type_mouvement) { switch ($objp->type_mouvement) {
case "0": case "0":
print '<td class="center">'.$langs->trans('StockIncreaseAfterCorrectTransfer').'</td>'; print '<td class="center">'.$langs->trans('StockIncreaseAfterCorrectTransfer').'</td>';
@ -972,17 +972,18 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (!empty($arrayfields['m.value']['checked'])) { if (!empty($arrayfields['m.value']['checked'])) {
// Qty // Qty
print '<td class="right">'; print '<td class="right">';
if ($objp->qt > 0) { if ($objp->qty >0) {
print '+'; print '<span class="stockmovemententry">+'.$objp->qty.'</span>';
} else {
print '<span class="stockmovementexit">'.$objp->qty.'<span>';
} }
print $objp->qty;
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['m.price']['checked'])) { if (!empty($arrayfields['m.price']['checked'])) {
// Price // Price
print '<td class="right">'; print '<td class="right">';
if ($objp->price != 0) { if ($objp->price != 0) {
print price($objp->price); print '<span class="opacitymedium">'.price($objp->price).'</span>';
} }
print '</td>'; print '</td>';
} }

View File

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