浏览代码

NEW - Add label to price level when changing price (#26240)

Co-authored-by: Anthony Berton <anthony.berton@bb2a.fr>
Anthony Berton 1 年之前
父节点
当前提交
46eb35d362
共有 2 个文件被更改,包括 6 次插入3 次删除
  1. 2 1
      htdocs/product/price.php
  2. 4 2
      htdocs/variants/combinations.php

+ 2 - 1
htdocs/product/price.php

@@ -1582,7 +1582,8 @@ if ($action == 'edit_price' && $object->getRights()->creer) {
 		for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) {
 			print '<tr class="oddeven">';
 			print '<td>';
-			$text = $langs->trans('SellingPrice').' '.$i;
+			$keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i;
+			$text = $langs->trans('SellingPrice').' '.$i.' - '.getDolGlobalString($keyforlabel);
 			print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
 			print '</td>';
 

+ 4 - 2
htdocs/variants/combinations.php

@@ -732,10 +732,12 @@ if (!empty($id) || !empty($ref)) {
 				$prodcomb->fetchCombinationPriceLevels();
 
 				for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) {
+					$keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i;
+					$text = $langs->trans('ImpactOnPriceLevel', $i).' - '.getDolGlobalString($keyforlabel);
 					print '<tr>';
-					print '<td><label for="level_price_impact_'.$i.'">'.$langs->trans('ImpactOnPriceLevel', $i).'</label>';
+					print '<td><label for="level_price_impact_'.$i.'">'.$text.'</label>';
 					if ($i === 1) {
-						print ' <a id="apply-price-impact-to-all-level" class="classfortooltip" href="#" title="'.$langs->trans('ApplyToAllPriceImpactLevelHelp').'">('.$langs->trans('ApplyToAllPriceImpactLevel').')</a>';
+						print '<br/><a id="apply-price-impact-to-all-level" class="classfortooltip" href="#" title="'.$langs->trans('ApplyToAllPriceImpactLevelHelp').'">('.$langs->trans('ApplyToAllPriceImpactLevel').')</a>';
 					}
 					print '</td>';
 					print '<td><input type="text" class="level_price_impact" id="level_price_impact_'.$i.'" name="level_price_impact['.$i.']" value="'.price($prodcomb->combination_price_levels[$i]->variation_price).'">';