forked from Wavyzz/dolibarr
Clean code
This commit is contained in:
@@ -975,13 +975,11 @@ if ($action == 'create') {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/reception/modules_reception.php';
|
||||
$list = ModelePdfReception::liste_modeles($db);
|
||||
|
||||
if (is_array($list) || $list instanceof Countable) {
|
||||
if (count($list) > 1) {
|
||||
print "<tr><td>".$langs->trans("DefaultModel")."</td>";
|
||||
print '<td colspan="3">';
|
||||
print $form->selectarray('model', $list, $conf->global->RECEPTION_ADDON_PDF);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
if (is_countable($list) && count($list) > 1) {
|
||||
print "<tr><td>".$langs->trans("DefaultModel")."</td>";
|
||||
print '<td colspan="3">';
|
||||
print $form->selectarray('model', $list, getDolGlobalString('RECEPTION_ADDON_PDF'));
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
@@ -1589,7 +1587,7 @@ if ($action == 'create') {
|
||||
if (!empty($object->trueWeight)) {
|
||||
print ' ('.$langs->trans("SumOfProductWeights").': ';
|
||||
}
|
||||
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, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 'no'));
|
||||
if (!empty($object->trueWeight)) {
|
||||
print ')';
|
||||
}
|
||||
@@ -1641,7 +1639,7 @@ if ($action == 'create') {
|
||||
// If reception volume not defined we use sum of products
|
||||
if ($calculatedVolume > 0) {
|
||||
if ($volumeUnit < 50) {
|
||||
print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "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($calculatedVolume, $volumeUnit, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString("MAIN_VOLUME_DEFAULT_UNIT", 'no'));
|
||||
} else {
|
||||
print $calculatedVolume.' '.measuringUnitString(0, "volume", (string) $volumeUnit);
|
||||
}
|
||||
@@ -1650,7 +1648,7 @@ if ($action == 'create') {
|
||||
if ($calculatedVolume) {
|
||||
print ' ('.$langs->trans("SumOfProductVolumes").': ';
|
||||
}
|
||||
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, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'));
|
||||
//if (empty($calculatedVolume)) print ' ('.$langs->trans("Calculated").')';
|
||||
if ($calculatedVolume) {
|
||||
print ')';
|
||||
|
||||
Reference in New Issue
Block a user