Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
f3f39fb1ee
@ -2130,6 +2130,22 @@ if ($action == 'create')
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$tmparray=$object->getTotalWeightVolume();
|
||||||
|
$totalWeight=$tmparray['weight'];
|
||||||
|
$totalVolume=$tmparray['volume'];
|
||||||
|
if ($totalWeight) {
|
||||||
|
print '<tr><td>' . $langs->trans("CalculatedWeight") . '</td>';
|
||||||
|
print '<td>';
|
||||||
|
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND)?$conf->global->MAIN_WEIGHT_DEFAULT_ROUND:-1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?$conf->global->MAIN_WEIGHT_DEFAULT_UNIT:'no');
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
if ($totalVolume) {
|
||||||
|
print '<tr><td>' . $langs->trans("CalculatedVolume") . '</td>';
|
||||||
|
print '<td>';
|
||||||
|
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no');
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
if (!empty($conf->incoterm->enabled))
|
if (!empty($conf->incoterm->enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2300,12 +2300,15 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
$tmparray=$object->getTotalWeightVolume();
|
$tmparray=$object->getTotalWeightVolume();
|
||||||
$totalWeight=$tmparray['weight'];
|
$totalWeight=$tmparray['weight'];
|
||||||
$totalVolume=$tmparray['volume'];
|
$totalVolume=$tmparray['volume'];
|
||||||
if ($totalWeight || $totalVolume)
|
if ($totalWeight)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
|
print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND)?$conf->global->MAIN_WEIGHT_DEFAULT_ROUND:-1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?$conf->global->MAIN_WEIGHT_DEFAULT_UNIT:'no');
|
print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND)?$conf->global->MAIN_WEIGHT_DEFAULT_ROUND:-1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT)?$conf->global->MAIN_WEIGHT_DEFAULT_UNIT:'no');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
if ($totalVolume)
|
||||||
|
{
|
||||||
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
|
print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no');
|
print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND)?$conf->global->MAIN_VOLUME_DEFAULT_ROUND:-1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT)?$conf->global->MAIN_VOLUME_DEFAULT_UNIT:'no');
|
||||||
|
|||||||
@ -143,6 +143,10 @@ else {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$freelines = false;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FREE_LINES))
|
||||||
|
{
|
||||||
|
$freelines = true;
|
||||||
$forceall=1; // We always force all type for free lines (module product or service means we use predefined product or service)
|
$forceall=1; // We always force all type for free lines (module product or service means we use predefined product or service)
|
||||||
if ($object->element == 'contrat')
|
if ($object->element == 'contrat')
|
||||||
{
|
{
|
||||||
@ -180,11 +184,12 @@ else {
|
|||||||
echo $form->select_type_of_lines(isset($_POST["type"])?GETPOST("type",'alpha',2):-1,'type',1,1,$forceall);
|
echo $form->select_type_of_lines(isset($_POST["type"])?GETPOST("type",'alpha',2):-1,'type',1,1,$forceall);
|
||||||
|
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
|
}
|
||||||
|
|
||||||
// Predefined product/service
|
// Predefined product/service
|
||||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||||
{
|
{
|
||||||
if ($forceall >= 0) echo '<br>';
|
if ($forceall >= 0 && $freelines) echo '<br>';
|
||||||
echo '<span class="prod_entry_mode_predef">';
|
echo '<span class="prod_entry_mode_predef">';
|
||||||
echo '<label for="prod_entry_mode_predef">';
|
echo '<label for="prod_entry_mode_predef">';
|
||||||
echo '<input type="radio" class="prod_entry_mode_predef" name="prod_entry_mode" id="prod_entry_mode_predef" value="predef"'.(GETPOST('prod_entry_mode')=='predef'?' checked':'').'> ';
|
echo '<input type="radio" class="prod_entry_mode_predef" name="prod_entry_mode" id="prod_entry_mode_predef" value="predef"'.(GETPOST('prod_entry_mode')=='predef'?' checked':'').'> ';
|
||||||
@ -591,6 +596,13 @@ jQuery(document).ready(function() {
|
|||||||
jQuery('#trlinefordates').show();
|
jQuery('#trlinefordates').show();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if(!$freelines) { ?>
|
||||||
|
$("#prod_entry_mode_predef").click();
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
/* When changing predefined product, we reload list of supplier prices required for margin combo */
|
/* When changing predefined product, we reload list of supplier prices required for margin combo */
|
||||||
$("#idprod, #idprodfournprice").change(function()
|
$("#idprod, #idprodfournprice").change(function()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user