Browse Source

Fix look and feel v17

Laurent Destailleur 2 years ago
parent
commit
0cf4fca331
2 changed files with 50 additions and 45 deletions
  1. 9 8
      htdocs/mrp/mo_movements.php
  2. 41 37
      htdocs/projet/element.php

+ 9 - 8
htdocs/mrp/mo_movements.php

@@ -928,20 +928,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
 			print $userstatic->getNomUrl(-1);
 			print "</td>\n";
 		}
+		// Inventory code
 		if (!empty($arrayfields['m.inventorycode']['checked'])) {
-			// Inventory code
-			print '<td>';
+			print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($objp->inventorycode).'">';
 			//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 '</a>';
 			print '</td>';
 		}
+		// Label of movement
 		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>';
 		}
+		// Type of movement
 		if (!empty($arrayfields['m.type_mouvement']['checked'])) {
-			// Type of movement
 			switch ($objp->type_mouvement) {
 				case "0":
 					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'])) {
 			// Qty
 			print '<td class="right">';
-			if ($objp->qt > 0) {
-				print '+';
+			if ($objp->qty >0) {
+				print '<span class="stockmovemententry">+'.$objp->qty.'</span>';
+			} else {
+				print '<span class="stockmovementexit">'.$objp->qty.'<span>';
 			}
-			print $objp->qty;
 			print '</td>';
 		}
 		if (!empty($arrayfields['m.price']['checked'])) {
 			// Price
 			print '<td class="right">';
 			if ($objp->price != 0) {
-				print price($objp->price);
+				print '<span class="opacitymedium">'.price($objp->price).'</span>';
 			}
 			print '</td>';
 		}

+ 41 - 37
htdocs/projet/element.php

@@ -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>&nbsp;</td>';
+				print '</tr>';
 			}
-			print '</td>';
-			print '<td>&nbsp;</td>';
-			print '</tr>';
 		} else {
 			if (!is_array($elementarray)) {	// error
 				print '<tr><td>'.$elementarray.'</td></tr>';