FIX Pb in units of shipments
Conflicts: htdocs/expedition/card.php
This commit is contained in:
parent
fb808d830e
commit
753da4791e
@ -96,7 +96,6 @@ $extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
|||||||
// fetch optionals attributes lines and labels
|
// fetch optionals attributes lines and labels
|
||||||
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||||
|
|
||||||
|
|
||||||
// Load object. Make an object->fetch
|
// Load object. Make an object->fetch
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
@ -1570,10 +1569,10 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Display lines extrafields
|
//Display lines extrafields
|
||||||
if (is_array($extralabelslines) && count($extralabelslines)>0)
|
if (is_array($extralabelslines) && count($extralabelslines)>0)
|
||||||
{
|
{
|
||||||
|
//var_dump($line);
|
||||||
$colspan=5;
|
$colspan=5;
|
||||||
$orderLineExtrafields = new Extrafields($db);
|
$orderLineExtrafields = new Extrafields($db);
|
||||||
$orderLineExtrafieldLabels = $orderLineExtrafields->fetch_name_optionals_label($object->table_element_line);
|
$orderLineExtrafieldLabels = $orderLineExtrafields->fetch_name_optionals_label($object->table_element_line);
|
||||||
@ -1583,7 +1582,7 @@ if ($action == 'create')
|
|||||||
//$line->fetch_optionals($line->id);
|
//$line->fetch_optionals($line->id);
|
||||||
$line->array_options = array_merge($line->array_options, $srcLine->array_options);
|
$line->array_options = array_merge($line->array_options, $srcLine->array_options);
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>$colspan), $indiceAsked);
|
print $line->showOptionals($extrafieldsline, 'edit', array('colspan'=>$colspan), $indiceAsked);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1841,8 +1840,8 @@ elseif ($id || $ref)
|
|||||||
print '<input name="action" value="settrueWeight" type="hidden">';
|
print '<input name="action" value="settrueWeight" type="hidden">';
|
||||||
print '<input name="id" value="'.$object->id.'" type="hidden">';
|
print '<input name="id" value="'.$object->id.'" type="hidden">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input id="trueWeight" name="trueWeight" value="'.$object->trueWeight.'" type="text">';
|
print '<input id="trueWeight" name="trueWeight" value="'.$object->trueWeight.'" type="text" class="width50">';
|
||||||
print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units);
|
print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units, 0, 2);
|
||||||
print ' <input class="button" name="modify" value="'.$langs->trans("Modify").'" type="submit">';
|
print ' <input class="button" name="modify" value="'.$langs->trans("Modify").'" type="submit">';
|
||||||
print ' <input class="button" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';
|
print ' <input class="button" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
@ -1850,7 +1849,7 @@ elseif ($id || $ref)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $object->trueWeight;
|
print $object->trueWeight;
|
||||||
print ($object->trueWeight && $object->weight_units!='')?' '.measuring_units_string($object->weight_units, "weight"):'';
|
print ($object->trueWeight && $object->weight_units!='')?' '.measuring_units_string(0, "weight", $object->weight_units):'';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculated
|
// Calculated
|
||||||
@ -1867,7 +1866,7 @@ elseif ($id || $ref)
|
|||||||
// Width
|
// Width
|
||||||
print '<tr><td>'.$form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->expedition->creer).'</td><td colspan="3">';
|
print '<tr><td>'.$form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->expedition->creer).'</td><td colspan="3">';
|
||||||
print $form->editfieldval("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->expedition->creer);
|
print $form->editfieldval("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->expedition->creer);
|
||||||
print ($object->trueWidth && $object->width_units!='')?' '.measuring_units_string($object->width_units, "size"):'';
|
print ($object->trueWidth && $object->width_units!='')?' '.measuring_units_string(0, "size", $object->width_units):'';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Height
|
// Height
|
||||||
@ -1878,8 +1877,8 @@ elseif ($id || $ref)
|
|||||||
print '<input name="action" value="settrueHeight" type="hidden">';
|
print '<input name="action" value="settrueHeight" type="hidden">';
|
||||||
print '<input name="id" value="'.$object->id.'" type="hidden">';
|
print '<input name="id" value="'.$object->id.'" type="hidden">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input id="trueHeight" name="trueHeight" value="'.$object->trueHeight.'" type="text">';
|
print '<input id="trueHeight" name="trueHeight" value="'.$object->trueHeight.'" type="text" class="width50">';
|
||||||
print $formproduct->selectMeasuringUnits("size_units", "size", $object->size_units);
|
print $formproduct->selectMeasuringUnits("size_units", "size", $object->size_units, 0, 2);
|
||||||
print ' <input class="button" name="modify" value="'.$langs->trans("Modify").'" type="submit">';
|
print ' <input class="button" name="modify" value="'.$langs->trans("Modify").'" type="submit">';
|
||||||
print ' <input class="button" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';
|
print ' <input class="button" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
@ -1887,7 +1886,7 @@ elseif ($id || $ref)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $object->trueHeight;
|
print $object->trueHeight;
|
||||||
print ($object->trueHeight && $object->height_units!='')?' '.measuring_units_string($object->height_units, "size"):'';
|
print ($object->trueHeight && $object->height_units!='')?' '.measuring_units_string(0, "size", $object->height_units):'';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -1895,7 +1894,7 @@ elseif ($id || $ref)
|
|||||||
// Depth
|
// Depth
|
||||||
print '<tr><td>'.$form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->rights->expedition->creer).'</td><td colspan="3">';
|
print '<tr><td>'.$form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->rights->expedition->creer).'</td><td colspan="3">';
|
||||||
print $form->editfieldval("Depth", 'trueDepth', $object->trueDepth, $object, $user->rights->expedition->creer);
|
print $form->editfieldval("Depth", 'trueDepth', $object->trueDepth, $object, $user->rights->expedition->creer);
|
||||||
print ($object->trueDepth && $object->depth_units!='')?' '.measuring_units_string($object->depth_units, "size"):'';
|
print ($object->trueDepth && $object->depth_units!='')?' '.measuring_units_string(0, "size", $object->depth_units):'';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Volume
|
// Volume
|
||||||
@ -2101,8 +2100,6 @@ elseif ($id || $ref)
|
|||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=false;
|
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE))
|
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE))
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
@ -2407,14 +2404,14 @@ elseif ($id || $ref)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Weight
|
// Weight
|
||||||
print '<td class="center">';
|
print '<td class="center linecolweight">';
|
||||||
if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->weight*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->weight_units, "weight");
|
if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->weight*$lines[$i]->qty_shipped.' '.measuring_units_string(0, "weight", $lines[$i]->weight_units);
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Volume
|
// Volume
|
||||||
print '<td class="center">';
|
print '<td class="center linecolvolume">';
|
||||||
if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units, "volume");
|
if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string(0, "volume", $lines[$i]->volume_units);
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user