From c4c4e30d043be857ca7104e24f1b13f6000184a2 Mon Sep 17 00:00:00 2001
From: "p.neub" <p.neub@adito.de>
Date: Tue, 16 Nov 2021 11:33:59 +0100
Subject: [PATCH] =?UTF-8?q?[Projekt:=20xRM-Marketing][TicketNr.:=202001726?=
 =?UTF-8?q?][Aktion=20'Open=20new=20mosaico=20Template'=20verf=C3=BCgbar,?=
 =?UTF-8?q?=20wenn=20in=20der=20Serienmail=20eine=20Dokumentvorlage=20hint?=
 =?UTF-8?q?erlegt=20wurde]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../entityfields/fromquantity/titleProcess.js       | 13 +++++++------
 language/_____LANGUAGE_de/_____LANGUAGE_de.aod      |  4 ++++
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/entity/Productprice_entity/entityfields/fromquantity/titleProcess.js b/entity/Productprice_entity/entityfields/fromquantity/titleProcess.js
index c1ace705cd..786b5a2579 100644
--- a/entity/Productprice_entity/entityfields/fromquantity/titleProcess.js
+++ b/entity/Productprice_entity/entityfields/fromquantity/titleProcess.js
@@ -6,16 +6,17 @@ import("system.result");
 import("system.vars");
 import("system.neon")
 
+var title = translate.text("Valid from");
 if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && 
     vars.get("$field.PRODUCT_ID") != null && vars.get("$field.PRODUCT_ID") != undefined && vars.get("$field.PRODUCT_ID") != "")
 {
     var productid = vars.get("$field.PRODUCT_ID")
     var unit = newSelect("UNIT")
-                    .from("PRODUCT")
-                    .where("PRODUCT.PRODUCTID", productid)
-                    .cell();
+        .from("PRODUCT")
+        .where("PRODUCT.PRODUCTID", productid)
+        .cell();
                     
-    result.string(translate.text("Valid from (as ") + KeywordUtils.getViewValue($KeywordRegistry.quantityUnit(), unit) + ")");
+    var unitStr = translate.text(KeywordUtils.getViewValue($KeywordRegistry.quantityUnit(), unit));
+    title = translate.withArguments("Valid from (as %0)", [unitStr]);
 }
-else
-    result.string(translate.text("Valid from"));
\ No newline at end of file
+result.string(title);
diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
index cf9e023ea2..1efadae499 100644
--- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
+++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
@@ -14659,6 +14659,10 @@ Bitte Datumseingabe prüfen</value>
       <key>Calculate sum</key>
       <value>Summe berechnen</value>
     </entry>
+    <entry>
+      <key>Valid from (as %0)</key>
+      <value>Gültig von (in %0)</value>
+    </entry>
   </keyValueMap>
   <font name="Dialog" style="0" size="11" />
 </language>
-- 
GitLab