diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php
index c0357aa5e4b..c6dceefb386 100644
--- a/htdocs/mrp/mo_movements.php
+++ b/htdocs/mrp/mo_movements.php
@@ -928,20 +928,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $userstatic->getNomUrl(-1);
print "\n";
}
+ // Inventory code
if (!empty($arrayfields['m.inventorycode']['checked'])) {
- // Inventory code
- print '
';
+ print ' | ';
//print '';
print dol_escape_htmltag($objp->inventorycode);
//print '';
print ' | ';
}
+ // Label of movement
if (!empty($arrayfields['m.label']['checked'])) {
- // Label of movement
print ''.dol_escape_htmltag($objp->label).' | ';
}
+ // Type of movement
if (!empty($arrayfields['m.type_mouvement']['checked'])) {
- // Type of movement
switch ($objp->type_mouvement) {
case "0":
print ''.$langs->trans('StockIncreaseAfterCorrectTransfer').' | ';
@@ -972,17 +972,18 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (!empty($arrayfields['m.value']['checked'])) {
// Qty
print '';
- if ($objp->qt > 0) {
- print '+';
+ if ($objp->qty >0) {
+ print '+'.$objp->qty.'';
+ } else {
+ print ''.$objp->qty.'';
}
- print $objp->qty;
print ' | ';
}
if (!empty($arrayfields['m.price']['checked'])) {
// Price
print '';
if ($objp->price != 0) {
- print price($objp->price);
+ print ''.price($objp->price).'';
}
print ' | ';
}
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 09f952cb631..de8cae3bffd 100644
--- a/htdocs/projet/element.php
+++ b/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 '| '.$langs->trans("Number").': '.$i.' | ';
- if (in_array($tablename, array('projet_task'))) {
- print '';
- print convertSecondToTime($total_time, 'allhourmin');
- print ' | ';
- print '';
- print ' | ';
- }
- //if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print ''.$langs->trans("TotalHT").' : '.price($total_ht).' | ';
- //elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print ''.$langs->trans("Total").' : '.price($total_ht).' | ';
- // If fichinter add the total_duration
- if ($tablename == 'fichinter') {
- print ''.convertSecondToTime($total_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).' | ';
- }
- print '';
- 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 ' |
| '.$langs->trans("Number").': '.$i.' | ';
+ if (in_array($tablename, array('projet_task'))) {
+ print '';
+ print convertSecondToTime($total_time, 'allhourmin');
+ print ' | ';
+ print '';
+ print ' | ';
}
- }
- print '';
- //if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print ''.$langs->trans("TotalTTC").' : '.price($total_ttc).' | ';
- //elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print ' | ';
- print '';
- 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 ' | '.$langs->trans("TotalHT").' : '.price($total_ht).' | ';
+ //elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print ''.$langs->trans("Total").' : '.price($total_ht).' | ';
+ // If fichinter add the total_duration
+ if ($tablename == 'fichinter') {
+ print ''.convertSecondToTime($total_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).' | ';
}
+ print '';
+ 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 ' | ';
+ //if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print ''.$langs->trans("TotalTTC").' : '.price($total_ttc).' | ';
+ //elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print ' | ';
+ print '';
+ 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 ' | ';
+ print ' | ';
+ print '
';
}
- print '';
- print ' | ';
- print '';
} else {
if (!is_array($elementarray)) { // error
print '| '.$elementarray.' |
';