Skip to content
Snippets Groups Projects
Commit c0311886 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

code Cleanup, translation

parent f98f30a8
No related branches found
No related tags found
No related merge requests found
import("system.logging");
import("Sql_lib"); import("Sql_lib");
import("DocumentTemplate_lib"); import("DocumentTemplate_lib");
import("system.result"); import("system.result");
...@@ -32,13 +31,6 @@ var contactIds = []; ...@@ -32,13 +31,6 @@ var contactIds = [];
if (vars.get("$param.CopyBulkMailId_param")) if (vars.get("$param.CopyBulkMailId_param"))
{ {
logging.log(JSON.stringify(["COPY: ",
"BulkMailRecipient_entity",
"BulkMailRecipients",
["BulkMailId_param", vars.get("$param.CopyBulkMailId_param")],
["#UID"]
], null, "\t"))
var config = entities.createConfigForLoadingRows() var config = entities.createConfigForLoadingRows()
.entity("BulkMailRecipient_entity") .entity("BulkMailRecipient_entity")
.provider("BulkMailRecipients") .provider("BulkMailRecipients")
...@@ -46,7 +38,6 @@ if (vars.get("$param.CopyBulkMailId_param")) ...@@ -46,7 +38,6 @@ if (vars.get("$param.CopyBulkMailId_param"))
.fields(["CONTACT_ID"]); .fields(["CONTACT_ID"]);
var copiedRecipients = entities.getRows(config); var copiedRecipients = entities.getRows(config);
logging.log(JSON.stringify([copiedRecipients], null, "\t"))
contactIds = copiedRecipients.map(function(pRecipient) contactIds = copiedRecipients.map(function(pRecipient)
{ {
...@@ -57,7 +48,5 @@ if (vars.get("$param.CopyBulkMailId_param")) ...@@ -57,7 +48,5 @@ if (vars.get("$param.CopyBulkMailId_param"))
if (vars.getString("$param.PresetRecipients_param")) if (vars.getString("$param.PresetRecipients_param"))
contactIds = contactIds.concat(JSON.parse(vars.getString("$param.PresetRecipients_param"))); contactIds = contactIds.concat(JSON.parse(vars.getString("$param.PresetRecipients_param")));
logging.log(JSON.stringify([contactIds], null, "\t"))
if (contactIds && contactIds.length > 0) if (contactIds && contactIds.length > 0)
BulkMailUtils.addRecipients(bulkMailId, BulkMailUtils.filterNewRecipients(bulkMailId, contactIds)); BulkMailUtils.addRecipients(bulkMailId, BulkMailUtils.filterNewRecipients(bulkMailId, contactIds));
\ No newline at end of file
...@@ -5094,6 +5094,12 @@ ...@@ -5094,6 +5094,12 @@
<entry> <entry>
<key>My Forecast</key> <key>My Forecast</key>
</entry> </entry>
<entry>
<key>Copy bulkmail</key>
</entry>
<entry>
<key>Count template attachments</key>
</entry>
</keyValueMap> </keyValueMap>
<font name="Dialog" style="0" size="11" /> <font name="Dialog" style="0" size="11" />
<sqlModels> <sqlModels>
......
...@@ -6438,6 +6438,13 @@ ...@@ -6438,6 +6438,13 @@
<key>Use template attachments</key> <key>Use template attachments</key>
<value>Verwende Vorlagenanhänge</value> <value>Verwende Vorlagenanhänge</value>
</entry> </entry>
<entry>
<key>Copy bulkmail</key>
<value>Kopiere Serienmail</value>
</entry>
<entry>
<key>Count template attachments</key>
</entry>
</keyValueMap> </keyValueMap>
<font name="Dialog" style="0" size="11" /> <font name="Dialog" style="0" size="11" />
</language> </language>
...@@ -5138,6 +5138,18 @@ ...@@ -5138,6 +5138,18 @@
<entry> <entry>
<key>Use template attachments</key> <key>Use template attachments</key>
</entry> </entry>
<entry>
<key>My Turnover</key>
</entry>
<entry>
<key>My Forecast</key>
</entry>
<entry>
<key>Copy bulkmail</key>
</entry>
<entry>
<key>Count template attachments</key>
</entry>
</keyValueMap> </keyValueMap>
<font name="Dialog" style="0" size="11" /> <font name="Dialog" style="0" size="11" />
</language> </language>
import("system.logging");
import("system.translate"); import("system.translate");
import("ActivityTask_lib"); import("ActivityTask_lib");
import("system.util"); import("system.util");
...@@ -219,7 +218,6 @@ BulkMailUtils.addRecipients = function (pBulkMailId, pContactIds) ...@@ -219,7 +218,6 @@ BulkMailUtils.addRecipients = function (pBulkMailId, pContactIds)
*/ */
BulkMailUtils.getBulkMailTemplate = function (pBulkMailId, pDocumentTemplateId, pResolveSubtemplates, pUseTemplateAttachments) BulkMailUtils.getBulkMailTemplate = function (pBulkMailId, pDocumentTemplateId, pResolveSubtemplates, pUseTemplateAttachments)
{ {
logging.log(JSON.stringify([pBulkMailId, pDocumentTemplateId, pResolveSubtemplates, pUseTemplateAttachments], null, "\t"))
var bulkTemplate = DocumentTemplate.loadTemplate(pBulkMailId, "BULKMAIL", pResolveSubtemplates); var bulkTemplate = DocumentTemplate.loadTemplate(pBulkMailId, "BULKMAIL", pResolveSubtemplates);
var documentTemplate = DocumentTemplate.loadTemplate(pDocumentTemplateId, undefined, pResolveSubtemplates); var documentTemplate = DocumentTemplate.loadTemplate(pDocumentTemplateId, undefined, pResolveSubtemplates);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment