diff --git a/.liquibase/Data_alias/basic/2020.2.0/ReportDispatchImpl/add_DocumentTemplatePlaceOfUse.xml b/.liquibase/Data_alias/basic/2020.2.0/ReportDispatchImpl/add_DocumentTemplatePlaceOfUse.xml new file mode 100644 index 0000000000000000000000000000000000000000..d8b506037199897a34e8c6e8660d418fdc986dda --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.0/ReportDispatchImpl/add_DocumentTemplatePlaceOfUse.xml @@ -0,0 +1,55 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="d.tran" id="b16e0a6e-74b7-414a-9cc2-fb7f8f1c3d72"> + <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> + <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="bbd50206-c4d5-42e0-a19a-2d11e957af1f"/> + <column name="DOCUMENTTEMPLATE_ID" value="12da39a8-6fc9-4220-b09d-179cd611a814"/> + <column name="PLACEOFUSE" value="DSGVOReport"/> + </insert> + <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> + <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="63f5b453-24af-47a2-8ef1-ee5c91003428"/> + <column name="DOCUMENTTEMPLATE_ID" value="12da39a8-6fc9-4220-b09d-179cd611a814"/> + <column name="PLACEOFUSE" value="Order"/> + </insert> + <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> + <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="910939c0-fe4f-4142-9656-d06ed1fe6d04"/> + <column name="DOCUMENTTEMPLATE_ID" value="1cabdde7-870e-4094-a0f7-a335ded3536a"/> + <column name="PLACEOFUSE" value="DSGVOReport"/> + </insert> + <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> + <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="a5ccf0e5-2c4d-4782-8970-61af4db2dd31"/> + <column name="DOCUMENTTEMPLATE_ID" value="1cabdde7-870e-4094-a0f7-a335ded3536a"/> + <column name="PLACEOFUSE" value="Order"/> + </insert> + <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> + <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="460e8b4c-5124-4b83-ab81-16ad919abe35"/> + <column name="DOCUMENTTEMPLATE_ID" value="5e494f97-4d29-4cce-abf7-9eaa2577337f"/> + <column name="PLACEOFUSE" value="Organisation"/> + </insert> + <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> + <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="346113a2-e3b6-41e5-b058-13342e45984a"/> + <column name="DOCUMENTTEMPLATE_ID" value="5e494f97-4d29-4cce-abf7-9eaa2577337f"/> + <column name="PLACEOFUSE" value="DSGVOReport"/> + </insert> + <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> + <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="b741dc23-8e46-46a6-9485-56a9033d944a"/> + <column name="DOCUMENTTEMPLATE_ID" value="5e494f97-4d29-4cce-abf7-9eaa2577337f"/> + <column name="PLACEOFUSE" value="Order"/> + </insert> + <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> + <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="50cd8a91-5a48-479d-a329-aa9c1d1a3835"/> + <column name="DOCUMENTTEMPLATE_ID" value="fb237ade-ce63-40bd-aa41-33d7417fca2c"/> + <column name="PLACEOFUSE" value="Organisation"/> + </insert> + <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> + <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="5e2011ef-87aa-4b51-bea4-34cbfa11722f"/> + <column name="DOCUMENTTEMPLATE_ID" value="fb237ade-ce63-40bd-aa41-33d7417fca2c"/> + <column name="PLACEOFUSE" value="DSGVOReport"/> + </insert> + <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> + <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="e1422fa3-dcd2-4863-b972-1a3fb4b4fdc6"/> + <column name="DOCUMENTTEMPLATE_ID" value="fb237ade-ce63-40bd-aa41-33d7417fca2c"/> + <column name="PLACEOFUSE" value="Order"/> + </insert> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.0/changelog.xml b/.liquibase/Data_alias/basic/2020.2.0/changelog.xml index 92370f459ff9fe089f6ff3af7a604a9023582b3b..52e4a7e0cd3f0eebcf81ca34fd66da03d907c30a 100644 --- a/.liquibase/Data_alias/basic/2020.2.0/changelog.xml +++ b/.liquibase/Data_alias/basic/2020.2.0/changelog.xml @@ -8,5 +8,6 @@ <include relativeToChangelogFile="true" file="optimizeIndizes.xml"/> <include relativeToChangelogFile="true" file="addNotificationStateKeywords/addNotificationStateKeyword.xml"/> <include relativeToChangelogFile="true" file="alter_ComunicationMedium_IdDatatype.xml"/> + <include relativeToChangelogFile="true" file="ReportDispatchImpl/add_DocumentTemplatePlaceOfUse.xml"/> <include relativeToChangelogFile="true" file="alter_VisitrecommendationpriorityDatatype.xml"/> </databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/_demoData/generatedData/documenttemplateplaceofuse.xml b/.liquibase/Data_alias/basic/_demoData/generatedData/documenttemplateplaceofuse.xml index dd6292ff8c823888bb0e0c86990b1ff464df95d6..318aef6335157a010473ca66a808fe5354e4a421 100644 --- a/.liquibase/Data_alias/basic/_demoData/generatedData/documenttemplateplaceofuse.xml +++ b/.liquibase/Data_alias/basic/_demoData/generatedData/documenttemplateplaceofuse.xml @@ -16,11 +16,6 @@ <column name="DOCUMENTTEMPLATE_ID" value="12da39a8-6fc9-4220-b09d-179cd611a814"/> <column name="PLACEOFUSE" value="Organisation"/> </insert> - <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> - <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="b4fafa76-73f2-43ee-8a88-12d30946f1bb"/> - <column name="DOCUMENTTEMPLATE_ID" value="12da39a8-6fc9-4220-b09d-179cd611a814"/> - <column name="PLACEOFUSE" value="Organisation"/> - </insert> <insert tableName="DOCUMENTTEMPLATEPLACEOFUSE"> <column name="DOCUMENTTEMPLATEPLACEOFUSEID" value="256dad02-7433-45b3-9584-ec335e0bdcab"/> <column name="DOCUMENTTEMPLATE_ID" value="3acf26f9-4807-4661-8084-c0c21c593c81"/> diff --git a/entity/DSGVOInfo_entity/DSGVOInfo_entity.aod b/entity/DSGVOInfo_entity/DSGVOInfo_entity.aod index 5baf9ac2bf6d4b403b1b0b708c4c9f0fed77923b..dd8ae2f623b003b0541b515c36274467aae5be78 100644 --- a/entity/DSGVOInfo_entity/DSGVOInfo_entity.aod +++ b/entity/DSGVOInfo_entity/DSGVOInfo_entity.aod @@ -52,6 +52,7 @@ </entityParameter> <entityParameter> <name>ReportType_param</name> + <valueProcess>%aditoprj%/entity/DSGVOInfo_entity/entityfields/reporttype_param/valueProcess.js</valueProcess> <expose v="true" /> </entityParameter> <entityProvider> @@ -156,6 +157,11 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityParameter> + <name>Recipient_param</name> + <valueProcess>%aditoprj%/entity/DSGVOInfo_entity/entityfields/recipient_param/valueProcess.js</valueProcess> + <expose v="true" /> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/DSGVOInfo_entity/entityfields/recipient_param/valueProcess.js b/entity/DSGVOInfo_entity/entityfields/recipient_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c9be9208d3f269740c4ed22b8ec8a1d05d6f7b53 --- /dev/null +++ b/entity/DSGVOInfo_entity/entityfields/recipient_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.RECIPIENT")); \ No newline at end of file diff --git a/entity/DSGVOInfo_entity/entityfields/reporttype_param/valueProcess.js b/entity/DSGVOInfo_entity/entityfields/reporttype_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/DSGVOReport_entity/DSGVOReport_entity.aod b/entity/DSGVOReport_entity/DSGVOReport_entity.aod index b6fe8ca524db92a69e8fd9e66ffcc2a67485471c..b96cb3a3dbc480499bb71e154509700ae34bb4f9 100644 --- a/entity/DSGVOReport_entity/DSGVOReport_entity.aod +++ b/entity/DSGVOReport_entity/DSGVOReport_entity.aod @@ -9,7 +9,7 @@ <name>#PROVIDER</name> </entityProvider> <entityParameter> - <name>ContactID_param</name> + <name>ContactId_param</name> <expose v="true" /> <mandatory v="false" /> </entityParameter> @@ -36,6 +36,18 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityActionGroup> + <name>dsgvoReportDispatch</name> + <children> + <entityActionField> + <name>dispatchDSGVOReport</name> + <title>Dispatch as mail</title> + <onActionProcess>%aditoprj%/entity/DSGVOReport_entity/entityfields/dsgvoreportdispatch/children/dispatchdsgvoreport/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <iconId>VAADIN:AT</iconId> + </entityActionField> + </children> + </entityActionGroup> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/DSGVOReport_entity/entityfields/dsgvoreportdispatch/children/dispatchdsgvoreport/onActionProcess.js b/entity/DSGVOReport_entity/entityfields/dsgvoreportdispatch/children/dispatchdsgvoreport/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e7ffc71bedc55beb9053abc8da900f809680228c --- /dev/null +++ b/entity/DSGVOReport_entity/entityfields/dsgvoreportdispatch/children/dispatchdsgvoreport/onActionProcess.js @@ -0,0 +1,28 @@ +import("system.logging"); +import("system.translate"); +import("system.vars"); +import("system.db"); +import("Contact_lib"); +import("MimeType_lib"); +import("Email_lib"); +import("Sql_lib"); +import("Entity_lib"); + +var reportType = vars.get("$param.ReportName_param"); +var contactId = vars.get("$param.ContactId_param"); +var recipient = JSON.parse(vars.get("$param.DSGVOInfo_param"))["recipient"]; + +var dsgvoReport = {}; +var attachmentArray = []; +var reportData = vars.get("$field.REPORT_DATA"); +var emailFilename = translate.text(reportType == "DSGVO_Disclosure_report" ? "Disclosure Report" : "Information Report"); +var fullname = ContactUtils.getTitleByContactId(contactId); +emailFilename = emailFilename + " " + fullname; + +dsgvoReport.content = reportData; +dsgvoReport.mimeType = MimeTypes.PDF(); +dsgvoReport.filename = emailFilename + ".pdf"; + +attachmentArray[0] = dsgvoReport; + +EmailWritingUtils.sendReportAsMail(recipient, attachmentArray, "DSGVOReport", null, emailFilename, null, null); diff --git a/entity/DSGVOReport_entity/entityfields/report_data/valueProcess.js b/entity/DSGVOReport_entity/entityfields/report_data/valueProcess.js index 2e61138143c9e5cf8decd5cda6bad318d7ce49e5..f32c42488423b505bfc4634adc12cef5b7256038 100644 --- a/entity/DSGVOReport_entity/entityfields/report_data/valueProcess.js +++ b/entity/DSGVOReport_entity/entityfields/report_data/valueProcess.js @@ -3,4 +3,4 @@ import("system.vars"); import("system.logging"); import("DataPrivacy_lib") -result.string(DataPrivacyUtils.buildReport(vars.get("$param.ContactID_param"), vars.get("$param.ReportName_param"), JSON.parse(vars.get("$param.DSGVOInfo_param")))); \ No newline at end of file +result.string(DataPrivacyUtils.buildReport(vars.get("$param.ContactId_param"), vars.get("$param.ReportName_param"), JSON.parse(vars.get("$param.DSGVOInfo_param")))); \ No newline at end of file diff --git a/entity/DSGVO_entity/DSGVO_entity.aod b/entity/DSGVO_entity/DSGVO_entity.aod index 19cefc3a19e90adbc2a12a91fe584c93032a6554..6fd134a3a89d73e4185ec169dbd5efa7f0f7f34f 100644 --- a/entity/DSGVO_entity/DSGVO_entity.aod +++ b/entity/DSGVO_entity/DSGVO_entity.aod @@ -13,6 +13,7 @@ </siblings> <grantCreate v="false" /> <grantDelete v="false" /> + <afterSave>%aditoprj%/entity/DSGVO_entity/afterSave.js</afterSave> <titlePlural></titlePlural> <recordContainer>jdito</recordContainer> <entityFields> diff --git a/entity/Email_entity/Email_entity.aod b/entity/Email_entity/Email_entity.aod index 3ca3d9550cb54a9e2c7980ef006076bb04ce7d1e..f0721f5e933e81bc163cb04b1d224ef9a65a24ee 100644 --- a/entity/Email_entity/Email_entity.aod +++ b/entity/Email_entity/Email_entity.aod @@ -129,10 +129,8 @@ <expose v="true" /> </entityParameter> <entityParameter> - <name>OfferId_param</name> + <name>UpdateStatements_param</name> <expose v="true" /> - <mandatory v="true" /> - <documentation>%aditoprj%/entity/Email_entity/entityfields/offerid_param/documentation.adoc</documentation> </entityParameter> <entityProvider> <name>#PROVIDER_AGGREGATES</name> diff --git a/entity/Email_entity/entityfields/offerid_param/documentation.adoc b/entity/Email_entity/entityfields/offerid_param/documentation.adoc deleted file mode 100644 index cc60a8f815575f3ed65faa6cc6634e6878b173c6..0000000000000000000000000000000000000000 --- a/entity/Email_entity/entityfields/offerid_param/documentation.adoc +++ /dev/null @@ -1,3 +0,0 @@ -=OfferId_pram - -optional param needed for the offerEmails, to change the status of the offer \ No newline at end of file diff --git a/entity/Email_entity/entityfields/recipient/valueProcess.js b/entity/Email_entity/entityfields/recipient/valueProcess.js index 28712f38d11117f0241a65aa12bac0cd0f7e89f9..e26a2de2a8118ee57c0e9c292eaae60f50885589 100644 --- a/entity/Email_entity/entityfields/recipient/valueProcess.js +++ b/entity/Email_entity/entityfields/recipient/valueProcess.js @@ -10,7 +10,7 @@ if (vars.get("$this.value") == null) else if (vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param")) result.string(CommUtil.getStandardMail(vars.get("$param.ContactId_param"))); } -else if (!vars.get("$field.RECIPIENT").includes("@")) +else if (!vars.get("$field.RECIPIENT").includes("@") && vars.get("$field.RECIPIENT") != "") result.string(newSelect("ADDR") .from("COMMUNICATION") .where("COMMUNICATION.COMMUNICATIONID", vars.get("$this.value")).cell()); \ No newline at end of file diff --git a/entity/Email_entity/entityfields/sendmail/onActionProcess.js b/entity/Email_entity/entityfields/sendmail/onActionProcess.js index 74810743f42a7d88c0dfd8989917e0603864ba98..8d7f805dd0fb6e7dce5691bada2172ae0b11cd4f 100644 --- a/entity/Email_entity/entityfields/sendmail/onActionProcess.js +++ b/entity/Email_entity/entityfields/sendmail/onActionProcess.js @@ -1,14 +1,15 @@ -import("KeywordRegistry_basic"); -import("Sql_lib"); -import("system.translate"); -import("ActivityTask_lib"); +import("system.db"); import("system.neon"); -import("Employee_lib"); import("system.vars"); +import("system.question"); +import("system.translate"); +import("Sql_lib"); import("Email_lib"); import("Contact_lib"); import("Document_lib"); -import("system.question"); +import("Employee_lib"); +import("ActivityTask_lib"); +import("KeywordRegistry_basic"); var attachments = JSON.parse(vars.get("$param.Attachments_param")); var senderContactId = vars.get("$param.ContactId_param"); @@ -17,9 +18,10 @@ var emailFilename = vars.get("$param.EmailFilename"); var notificationMsg = vars.get("$param.NotificationMsg_param"); var notificationTitle = translate.text("Offer status changed"); var subject = vars.get("$field.subject"); - +var updateStatements = JSON.parse(vars.get("$param.UpdateStatements_param")); var additionalPlaceholders = null; -if (vars.exists("$param.AdditionalPlaceholders_param") && vars.get("$param.AdditionalPlaceholders_param")) + +if (vars.exists("$param.AdditionalPlaceholders_param") && vars.get("$param.AdditionalPlaceholders_param") != "null") { additionalPlaceholders = JSON.parse(vars.get("$param.AdditionalPlaceholders_param")).map(function (placeholder) { @@ -40,11 +42,10 @@ var eml = EmailWritingUtils.openMailTemplate( additionalPlaceholders ); -if(vars.get("$param.ComingFrom_param") == "Offer") +if(updateStatements) { - newWhere("OFFER.OFFERID", vars.get("$param.OfferId_param")) - .updateData(true, "OFFER", ["STATUS"], null, [$KeywordRegistry.offerStatus$sent()]); + db.updates(updateStatements); } if (notificationMsg) - question.showMessage(notificationMsg, question.INFORMATION, notificationTitle); \ No newline at end of file + question.showMessage(notificationMsg, question.INFORMATION, notificationTitle); diff --git a/entity/Offer_entity/entityfields/offerreportdispatch/children/dispatchofferreport/onActionProcess.js b/entity/Offer_entity/entityfields/offerreportdispatch/children/dispatchofferreport/onActionProcess.js index 108e16a1568111f622d71415968423884be95d78..0f003f4454eb7dc65386ea75080398e1070aef56 100644 --- a/entity/Offer_entity/entityfields/offerreportdispatch/children/dispatchofferreport/onActionProcess.js +++ b/entity/Offer_entity/entityfields/offerreportdispatch/children/dispatchofferreport/onActionProcess.js @@ -1,31 +1,32 @@ +import("system.db"); +import("system.vars"); import("system.question"); import("system.translate"); -import("system.vars"); import("KeywordRegistry_basic"); -import("system.translate"); +import("Placeholder_lib"); import("Offer_lib"); import("Email_lib"); import("Sql_lib"); import("MimeType_lib"); -import("Placeholder_lib"); -var offerReport = {}; +var offerReport = {} var attachmentArray = []; -var notificationMsg = translate.text("The status of the offer was changed to \"Sent\"."); +var updateStatements = [["OFFER", ["STATUS"], db.getColumnTypes("OFFER", ["STATUS"]), [$KeywordRegistry.offerStatus$sent()], newWhere("OFFER.OFFERID", vars.get("$field.OFFERID")).build()]]; +var notificationMsg = translate.text("The status of the offer was changed to \"sent\"."); var contactId = vars.get("$field.CONTACT_ID"); var arrayReport = OfferUtils.buildOfferReport(vars.get("$field.OFFERID")); var emailFilename = translate.text("Offerrequest"); +var offerId = vars.get("$field.OFFERID") +var additionalPlaceholders = [ + new Placeholder("offerCode", Placeholder.types.FIXEDVALUE, vars.get("$field.FullOfferCode")) +]; if (vars.get("$field.CONTACT_ID") == null || "") contactId = vars.get("$field.CONTACT_ORG_ID"); offerReport.content = arrayReport[1]; -offerReport.contentType = MimeTypes.PDF(); +offerReport.mimeType = MimeTypes.PDF(); offerReport.filename = translate.text("Offer No.") + vars.get("$field.#CONTENTTITLE") + ".pdf"; attachmentArray[0] = offerReport; -var additionalPlaceholders = [ - new Placeholder("offerCode", Placeholder.types.FIXEDVALUE, vars.get("$field.FullOfferCode")) -]; -var offerId = vars.get("$field.OFFERID") -EmailWritingUtils.sendReportAsMail(contactId, attachmentArray, "Offer", notificationMsg, emailFilename, additionalPlaceholders, offerId); \ No newline at end of file +EmailWritingUtils.sendReportAsMail(contactId, attachmentArray, "Offer", notificationMsg, emailFilename, additionalPlaceholders, updateStatements); diff --git a/entity/Order_entity/Order_entity.aod b/entity/Order_entity/Order_entity.aod index d38b802de3c56bc5b0d3abd5109edcdee7afc025..cb7b3dcde53402ce412d44c3c4564956d79bbd2a 100644 --- a/entity/Order_entity/Order_entity.aod +++ b/entity/Order_entity/Order_entity.aod @@ -752,6 +752,49 @@ <element>PROCESS_SETVALUE</element> </onValueChangeTypes> </entityField> + <entityField> + <name>REMINDER_REPORT_DATA</name> + <valueProcess>%aditoprj%/entity/Order_entity/entityfields/reminder_report_data/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>ORDER_REPORT_DATA</name> + <valueProcess>%aditoprj%/entity/Order_entity/entityfields/order_report_data/valueProcess.js</valueProcess> + </entityField> + <entityConsumer> + <name>Organisations</name> + <dependency> + <name>dependency</name> + <entityName>Organisation_entity</entityName> + <fieldName>Organisations</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>Persons</name> + <dependency> + <name>dependency</name> + <entityName>Person_entity</entityName> + <fieldName>Contacts</fieldName> + </dependency> + </entityConsumer> + <entityParameter> + <name>Copy_param</name> + <expose v="true" /> + <documentation>%aditoprj%/entity/Order_entity/entityfields/copy_param/documentation.adoc</documentation> + </entityParameter> + <entityField> + <name>ORDER_OBJECTTYPE</name> + <valueProcess>%aditoprj%/entity/Order_entity/entityfields/order_objecttype/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>COUNT</name> + <title>Count</title> + <contentType>NUMBER</contentType> + </entityField> + <entityAggregateField> + <name>COUNT_aggregate</name> + <parentField>COUNT</parentField> + <title>Count</title> + </entityAggregateField> <entityActionField> <name>newOrder</name> <documentation>%aditoprj%/entity/Order_entity/entityfields/neworder/documentation.adoc</documentation> @@ -846,53 +889,36 @@ <iconId>VAADIN:CURLY_BRACKETS</iconId> <stateProcess>%aditoprj%/entity/Order_entity/entityfields/openadminview/stateProcess.js</stateProcess> </entityActionField> - <entityField> - <name>REMINDER_REPORT_DATA</name> - <valueProcess>%aditoprj%/entity/Order_entity/entityfields/reminder_report_data/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>ORDER_REPORT_DATA</name> - <valueProcess>%aditoprj%/entity/Order_entity/entityfields/order_report_data/valueProcess.js</valueProcess> - </entityField> - <entityConsumer> - <name>Organisations</name> - <dependency> - <name>dependency</name> - <entityName>Organisation_entity</entityName> - <fieldName>Organisations</fieldName> - </dependency> - </entityConsumer> - <entityConsumer> - <name>Persons</name> - <dependency> - <name>dependency</name> - <entityName>Person_entity</entityName> - <fieldName>Contacts</fieldName> - </dependency> - </entityConsumer> - <entityParameter> - <name>Copy_param</name> - <expose v="true" /> - <documentation>%aditoprj%/entity/Order_entity/entityfields/copy_param/documentation.adoc</documentation> - </entityParameter> - <entityField> - <name>ORDER_OBJECTTYPE</name> - <valueProcess>%aditoprj%/entity/Order_entity/entityfields/order_objecttype/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>COUNT</name> - <title>Count</title> - <contentType>NUMBER</contentType> - </entityField> - <entityAggregateField> - <name>COUNT_aggregate</name> - <parentField>COUNT</parentField> - <title>Count</title> - </entityAggregateField> - <entityProvider> + <entityActionGroup> + <name>orderReportDispatch</name> + <children> + <entityActionField> + <name>dispatchOrderReport</name> + <title>Dispatch as mail</title> + <onActionProcess>%aditoprj%/entity/Order_entity/entityfields/orderreportdispatch/children/dispatchorderreport/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <iconId>VAADIN:AT</iconId> + <stateProcess>%aditoprj%/entity/Order_entity/entityfields/orderreportdispatch/children/dispatchorderreport/stateProcess.js</stateProcess> + </entityActionField> + </children> + </entityActionGroup> + <entityActionGroup> + <name>reminderReportDispatch</name> + <children> + <entityActionField> + <name>dispatchReminderReport</name> + <title>Dispatch as mail</title> + <onActionProcess>%aditoprj%/entity/Order_entity/entityfields/reminderreportdispatch/children/dispatchreminderreport/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <iconId>VAADIN:AT</iconId> + <stateProcess>%aditoprj%/entity/Order_entity/entityfields/reminderreportdispatch/children/dispatchreminderreport/stateProcess.js</stateProcess> + </entityActionField> + </children> + <entityProvider> <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> +</entityActionGroup> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Order_entity/entityfields/orderreportdispatch/children/dispatchorderreport/onActionProcess.js b/entity/Order_entity/entityfields/orderreportdispatch/children/dispatchorderreport/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..44cf00055adb79b0f8a573e12ded26e954c36f73 --- /dev/null +++ b/entity/Order_entity/entityfields/orderreportdispatch/children/dispatchorderreport/onActionProcess.js @@ -0,0 +1,30 @@ +import("system.question"); +import("system.translate"); +import("system.vars"); +import("system.db"); +import("MimeType_lib"); +import("Email_lib"); +import("Sql_lib"); + +var orderReport = {}; +var attachmentArray = []; +var updateStatements = [["SALESORDER", ["ORDERSTATUS"], db.getColumnTypes("SALESORDER", ["ORDERSTATUS"]), ["1"], newWhere("SALESORDER.SALESORDERID", vars.get("$field.SALESORDERID")).build()]]; +var notificationMsg = translate.text("The status of the order was changed to \"sent\"."); +var contactId = vars.get("$field.CONTACT_ID"); +var orgContactId = vars.get("$field.CONTACT_ORG_ID"); +var reportData = vars.get("$field.ORDER_REPORT_DATA"); +var emailFilename = vars.get("$field.#CONTENTTITLE"); +var orderNo = emailFilename.substring(emailFilename.indexOf(" ", 0)+1, emailFilename.length); +emailFilename = emailFilename.substring(0, emailFilename.indexOf(" ", 0)); +emailFilename = emailFilename + " " + orderNo; + +if (contactId == null || "") + contactId = orgContactId; + +orderReport.content = reportData; +orderReport.mimeType = MimeTypes.PDF(); +orderReport.filename = emailFilename + ".pdf"; + +attachmentArray[0] = orderReport; + +EmailWritingUtils.sendReportAsMail(contactId, attachmentArray, "Order", notificationMsg, emailFilename, null, updateStatements); diff --git a/entity/Order_entity/entityfields/orderreportdispatch/children/dispatchorderreport/stateProcess.js b/entity/Order_entity/entityfields/orderreportdispatch/children/dispatchorderreport/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3411dae9c83f152623887db6ecc7ef26d12ae281 --- /dev/null +++ b/entity/Order_entity/entityfields/orderreportdispatch/children/dispatchorderreport/stateProcess.js @@ -0,0 +1,10 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); +import("KeywordRegistry_basic"); + +var orderStatus = vars.get("$field.ORDERSTATUS"); +var isOfferCancelled = vars.get("$field.CANCELLATION"); + +if (orderStatus == 1 || isOfferCancelled == 1) + result.string(neon.COMPONENTSTATE_DISABLED); diff --git a/entity/Order_entity/entityfields/reminderreportdispatch/children/dispatchreminderreport/onActionProcess.js b/entity/Order_entity/entityfields/reminderreportdispatch/children/dispatchreminderreport/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7538162cacd9d49220e1ded198b3293f6dc46564 --- /dev/null +++ b/entity/Order_entity/entityfields/reminderreportdispatch/children/dispatchreminderreport/onActionProcess.js @@ -0,0 +1,28 @@ +import("system.question"); +import("system.translate"); +import("system.vars"); +import("system.db"); +import("MimeType_lib"); +import("Email_lib"); +import("Order_lib"); +import("Sql_lib"); + +var orderReport = {}; +var attachmentArray = []; +var contactId = vars.get("$field.CONTACT_ID"); +var orgContactId = vars.get("$field.CONTACT_ORG_ID"); +var reportData = OrderUtils.buildReminderReport(vars.get("$field.SALESORDERID")); +var emailFilename = vars.get("$field.#CONTENTTITLE"); +var orderNo = emailFilename.substring(emailFilename.indexOf(" ", 0)+1, emailFilename.length); +emailFilename = translate.text("Reminder") + " " + orderNo; + +if (contactId == null || "") + contactId = orgContactId; + +orderReport.content = reportData; +orderReport.mimeType = MimeTypes.PDF(); +orderReport.filename = emailFilename + ".pdf"; + +attachmentArray[0] = orderReport; + +EmailWritingUtils.sendReportAsMail(contactId, attachmentArray, "Order", null, emailFilename, null, null); diff --git a/entity/Order_entity/entityfields/reminderreportdispatch/children/dispatchreminderreport/stateProcess.js b/entity/Order_entity/entityfields/reminderreportdispatch/children/dispatchreminderreport/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..211643d5aad46d3202a811668c8b5ad6bd7a0771 --- /dev/null +++ b/entity/Order_entity/entityfields/reminderreportdispatch/children/dispatchreminderreport/stateProcess.js @@ -0,0 +1,9 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); +import("KeywordRegistry_basic"); + +var isOfferCancelled = vars.get("$field.CANCELLATION"); + +if (isOfferCancelled == 1) + result.string(neon.COMPONENTSTATE_DISABLED); diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index 43d7463ef62b008ed660fb57378d5677f4d5f14e..d877dda51ec1f42a4f92a62a6fbd7d47d61c5d39 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -1384,6 +1384,19 @@ </entityParameter> </children> </entityProvider> + <entityActionGroup> + <name>orgReportDispatch</name> + <children> + <entityActionField> + <name>dispatchOrgReport</name> + <title>Dispatch as mail</title> + <onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/orgreportdispatch/children/dispatchorgreport/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <iconId>VAADIN:AT</iconId> + <iconIdProcess>%aditoprj%/entity/Organisation_entity/entityfields/orgreportdispatch/children/dispatchorgreport/iconIdProcess.js</iconIdProcess> + </entityActionField> + </children> + </entityActionGroup> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Organisation_entity/entityfields/orgreportdispatch/children/dispatchorgreport/iconIdProcess.js b/entity/Organisation_entity/entityfields/orgreportdispatch/children/dispatchorgreport/iconIdProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e0d420de9957b538e4cf051771601c318fac5702 --- /dev/null +++ b/entity/Organisation_entity/entityfields/orgreportdispatch/children/dispatchorgreport/iconIdProcess.js @@ -0,0 +1,9 @@ +import("system.vars"); +import("system.neon"); +import("system.result"); +import("KeywordRegistry_basic"); + +var orgStatus = vars.get("$field.STATUS"); + +if (orgStatus == $KeywordRegistry.contactStatus$inactive()) + result.string(COMPONENTSTATE_DISABLED); diff --git a/entity/Organisation_entity/entityfields/orgreportdispatch/children/dispatchorgreport/onActionProcess.js b/entity/Organisation_entity/entityfields/orgreportdispatch/children/dispatchorgreport/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ca54b8d0ce3503663165304eea9856fae5ff423c --- /dev/null +++ b/entity/Organisation_entity/entityfields/orgreportdispatch/children/dispatchorgreport/onActionProcess.js @@ -0,0 +1,24 @@ +import("system.logging"); +import("Organisation_lib"); +import("system.translate"); +import("system.vars"); +import("system.db"); +import("MimeType_lib"); +import("Email_lib"); +import("Order_lib"); +import("Sql_lib"); + +var orgReport = {}; +var attachmentArray = []; +var reportData = vars.get("$field.ORGANISATION_REPORT_DATA"); +var orgContactId = vars.get("$field.CONTACTID"); +var emailFilename = vars.get("$field.#CONTENTTITLE"); +emailFilename = translate.text("Customer Base Sheet") + " " + emailFilename; + +orgReport.content = reportData; +orgReport.mimeType = MimeTypes.PDF(); +orgReport.filename = emailFilename + ".pdf"; + +attachmentArray[0] = orgReport; + +EmailWritingUtils.sendReportAsMail(orgContactId, attachmentArray, "Organisation", null, emailFilename, null, null); diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index d327524d1691e5eb2fce0b977c364fdb7b425a3e..323d581e7192ec4d6932f5abd3a62498990ebac4 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -2082,12 +2082,6 @@ <entry> <key>Entrydate (Day)</key> </entry> - <entry> - <key>Date (Month)</key> - </entry> - <entry> - <key>Date (Day)</key> - </entry> <entry> <key>My Dashboard</key> </entry> @@ -3201,9 +3195,6 @@ <entry> <key>Entrydate must not be in the future</key> </entry> - <entry> - <key>Date must not be in the future</key> - </entry> <entry> <key>Delivery specification</key> </entry> @@ -4734,9 +4725,6 @@ <entry> <key>Entrydate (Year)</key> </entry> - <entry> - <key>Date (Year)</key> - </entry> <entry> <key>Attributes must be unique!</key> </entry> @@ -6275,9 +6263,6 @@ <entry> <key>Entrydate has to be in the selected calendar week!</key> </entry> - <entry> - <key>Date has to be in the selected calendar week!</key> - </entry> <entry> <key>Invalid year!</key> </entry> @@ -6798,303 +6783,293 @@ <key>Offerrequest</key> </entry> <entry> - <key>Full Permissions</key> - </entry> - <entry> - <key>Full permissions already assigned</key> - </entry> - <entry> - <key>Import Daten</key> + <key>Number of employees</key> </entry> <entry> - <key>Import Logs</key> + <key>2. Customer value</key> </entry> <entry> - <key>Transferdaten</key> + <key>Product preference</key> </entry> <entry> - <key>Valid from (as </key> + <key>Business development</key> </entry> <entry> - <key>${SQL_LIB_FIELD_WRONG_FORMAT}</key> + <key>Headquarters</key> </entry> <entry> - <key>Settings</key> + <key>Current supply share</key> </entry> <entry> - <key>No new recipients found that can be added to the bulk mail.</key> + <key>Purchasing potential p. a.</key> </entry> <entry> - <key>Add Recipients</key> + <key>ScoreTargetGgroup</key> </entry> <entry> - <key>Add Participants</key> + <key>Stagnated</key> </entry> <entry> - <key>Download letter and create Activity</key> + <key>Negative</key> </entry> <entry> - <key>and open Report</key> + <key>1. Target group</key> </entry> <entry> - <key>export</key> + <key>Positive</key> </entry> <entry> - <key>export using the selected template</key> + <key>0-50</key> </entry> <entry> - <key>No new recipients found that can be added to the serial letter.</key> + <key>Till Score</key> </entry> <entry> - <key>send mail</key> + <key>251-1000</key> </entry> <entry> - <key>and open modeler</key> + <key>ab 1000</key> </entry> <entry> - <key>Create model</key> + <key>Full Permissions</key> </entry> <entry> - <key>Edit workflow</key> + <key>200-349 T€</key> </entry> <entry> - <key>Receive new Department Permission</key> + <key>100-199 T€</key> </entry> <entry> - <key>Receive new User Permission</key> + <key>Full permissions already assigned</key> </entry> <entry> - <key>workflow notification</key> + <key>51-100</key> </entry> <entry> - <key>Workflow Model</key> + <key>Import Daten</key> </entry> <entry> - <key>Current Recipients</key> + <key>ab 350 T€</key> </entry> <entry> - <key>The workflow could not be deployed</key> + <key>0-49 T€</key> </entry> <entry> - <key>Workflow deploy failed</key> + <key>Grading</key> </entry> <entry> - <key>%0 new recipients will be added to the bulk mail. \n\
 - %1 of the chosen records are already recipients or don't have an e-mail set</key> + <key>Import Logs</key> </entry> <entry> - <key>Recipients after adding</key> + <key>Transferdaten</key> </entry> <entry> - <key>%0 of the chosen records are already recipients or don't have an e-mail set</key> + <key>50-99 T€</key> </entry> <entry> - <key>Organisations will be exported</key> + <key>101-250</key> </entry> <entry> - <key>Contacts will be exported</key> + <key>Gradings</key> </entry> <entry> - <key>%0 new participants will be added to the campaign.</key> + <key>Valid from (as </key> </entry> <entry> - <key>%0 of the chosen records are already in the campaign</key> + <key>${SQL_LIB_FIELD_WRONG_FORMAT}</key> </entry> <entry> - <key>Permission received</key> + <key>yellow</key> </entry> <entry> - <key>leadimport notification</key> + <key>Borrow</key> </entry> <entry> - <key>granted permission</key> + <key>Is unlinked activity</key> </entry> <entry> - <key>Bulk mail sent</key> + <key>Fantasy</key> </entry> <entry> - <key>download ready</key> + <key>Extend</key> </entry> <entry> - <key>Total in euros</key> + <key>Krimi</key> </entry> <entry> - <key>{SENT_MAIL}</key> + <key>red</key> </entry> <entry> - <key>The Sales Project can only be filled when a company has been specified</key> + <key>Return</key> </entry> <entry> - <key>Ø Probability</key> + <key>green</key> </entry> <entry> - <key>Probability AI</key> + <key>Actionthriller</key> </entry> <entry> - <key>{SEND_MAIL}</key> + <key>No new recipients found that can be added to the bulk mail.</key> </entry> <entry> - <key>New</key> + <key>Add Recipients</key> </entry> <entry> - <key>Release</key> + <key>Add Participants</key> </entry> <entry> - <key>Archived</key> + <key>Download letter and create Activity</key> </entry> <entry> - <key>asdf</key> + <key>and open Report</key> </entry> <entry> - <key>Latitude</key> + <key>export</key> </entry> <entry> - <key>Longitude</key> + <key>export using the selected template</key> </entry> <entry> - <key>Favorites</key> + <key>No new recipients found that can be added to the serial letter.</key> </entry> <entry> - <key>Favorite</key> + <key>send mail</key> </entry> <entry> - <key>Show all Favorites</key> + <key>and open modeler</key> </entry> <entry> - <key>Default</key> + <key>Create model</key> </entry> <entry> - <key>Grant new Department Permission</key> + <key>Edit workflow</key> </entry> <entry> - <key>Permission Procurer Department</key> + <key>Receive new Department Permission</key> </entry> <entry> - <key>Permission Procurer User</key> + <key>Receive new User Permission</key> </entry> <entry> - <key>Grant new User Permission</key> + <key>workflow notification</key> </entry> <entry> - <key>yellow</key> + <key>Permission received</key> </entry> <entry> - <key>Number of employees</key> + <key>leadimport notification</key> </entry> <entry> - <key>Borrow</key> + <key>granted permission</key> </entry> <entry> - <key>Selection placeholder</key> + <key>Bulk mail sent</key> </entry> <entry> - <key>0-50</key> + <key>download ready</key> </entry> <entry> - <key>2. Customer value</key> + <key>Total in euros</key> </entry> <entry> - <key>Product preference</key> + <key>Workflow Model</key> </entry> <entry> - <key>Business development</key> + <key>{SENT_MAIL}</key> </entry> <entry> - <key>Till Score</key> + <key>The Sales Project can only be filled when a company has been specified</key> </entry> <entry> - <key>Current password</key> + <key>The workflow could not be deployed</key> </entry> <entry> - <key>Headquarters</key> + <key>Workflow deploy failed</key> </entry> <entry> - <key>Calendar maintime start</key> + <key>Ø Probability</key> </entry> <entry> - <key>251-1000</key> + <key>Probability AI</key> </entry> <entry> - <key>ab 1000</key> + <key>{SEND_MAIL}</key> </entry> <entry> - <key>favorties</key> + <key>New</key> </entry> <entry> - <key>Gradings</key> + <key>Release</key> </entry> <entry> - <key>200-349 T€</key> + <key>Archived</key> </entry> <entry> - <key>Fantasy</key> + <key>asdf</key> </entry> <entry> - <key>100-199 T€</key> + <key>Settings</key> </entry> <entry> - <key>Password must contain special characters</key> + <key>Latitude</key> </entry> <entry> - <key>Current supply share</key> + <key>Longitude</key> </entry> <entry> - <key>51-100</key> + <key>Favorites</key> </entry> <entry> - <key>Password must be at least %0 characters</key> + <key>Favorite</key> </entry> <entry> - <key>Purchasing potential p. a.</key> + <key>Show all Favorites</key> </entry> <entry> - <key>favorite</key> + <key>Default</key> </entry> <entry> - <key>Repeat password</key> + <key>Titel</key> </entry> <entry> - <key>Extend</key> + <key>Set missing address locations</key> </entry> <entry> - <key>%0: %1/%2points = %3</key> + <key>FavoriteFilter_view</key> </entry> <entry> - <key>ab 350 T€</key> + <key>Typ</key> </entry> <entry> - <key>Krimi</key> + <key>Set all address locations</key> </entry> <entry> - <key>red</key> + <key>favorties</key> </entry> <entry> - <key>0-49 T€</key> + <key>Gruppenname</key> </entry> <entry> - <key>Return</key> + <key>Password must contain special characters</key> </entry> <entry> - <key>Grading</key> + <key>Password must be at least %0 characters</key> </entry> <entry> - <key>SELECTION_NULL</key> + <key>favorite</key> </entry> <entry> - <key>ScoreTargetGgroup</key> + <key>Repeat password</key> </entry> <entry> - <key>Stagnated</key> + <key>%0: %1/%2points = %3</key> </entry> <entry> - <key>Is unlinked activity</key> + <key>SELECTION_NULL</key> </entry> <entry> <key>Selection ignore case</key> </entry> - <entry> - <key>Negative</key> - </entry> <entry> <key>Calendar maintime end</key> </entry> @@ -7113,9 +7088,6 @@ <entry> <key>Indicator</key> </entry> - <entry> - <key>green</key> - </entry> <entry> <key>favorites</key> </entry> @@ -7125,9 +7097,6 @@ <entry> <key>Run ServerProcess</key> </entry> - <entry> - <key>1. Target group</key> - </entry> <entry> <key>SELECTION_NEITHER</key> </entry> @@ -7137,27 +7106,15 @@ <entry> <key>New password</key> </entry> - <entry> - <key>Actionthriller</key> - </entry> <entry> <key>Calendar hour divider</key> </entry> - <entry> - <key>Positive</key> - </entry> <entry> <key>SELECTION_BOTH</key> </entry> - <entry> - <key>50-99 T€</key> - </entry> <entry> <key>SELECTION_POSTFIX</key> </entry> - <entry> - <key>101-250</key> - </entry> <entry> <key>Password must contain letters</key> </entry> @@ -7203,33 +7160,15 @@ <entry> <key>Mapping</key> </entry> - <entry> - <key>Typ</key> - </entry> <entry> <key>Mappings</key> </entry> <entry> <key>Radius in km</key> </entry> - <entry> - <key>Titel</key> - </entry> - <entry> - <key>Set missing address locations</key> - </entry> - <entry> - <key>FavoriteFilter_view</key> - </entry> - <entry> - <key>Set all address locations</key> - </entry> <entry> <key>Members</key> </entry> - <entry> - <key>Gruppenname</key> - </entry> <entry> <key>The radius has to be %0 or lesser.</key> </entry> @@ -7380,6 +7319,52 @@ <entry> <key>Worklow started</key> </entry> + <entry> + <key>Selection placeholder</key> + </entry> + <entry> + <key>%0 new recipients will be added to the bulk mail. \n\
 + %1 of the chosen records are already recipients or don't have an e-mail set</key> + </entry> + <entry> + <key>Grant new Department Permission</key> + </entry> + <entry> + <key>Current password</key> + </entry> + <entry> + <key>Calendar maintime start</key> + </entry> + <entry> + <key>The status of the offer was changed to \"sent\".</key> + </entry> + <entry> + <key>Permission Procurer Department</key> + </entry> + <entry> + <key>%0 of the chosen records are already recipients or don't have an e-mail set</key> + </entry> + <entry> + <key>Organisations will be exported</key> + </entry> + <entry> + <key>Recipients after adding</key> + </entry> + <entry> + <key>Contacts will be exported</key> + </entry> + <entry> + <key>%0 new participants will be added to the campaign.</key> + </entry> + <entry> + <key>%0 of the chosen records are already in the campaign</key> + </entry> + <entry> + <key>Permission Procurer User</key> + </entry> + <entry> + <key>The status of the order was changed to \"sent\".</key> + </entry> <entry> <key>Mark all cached record containers as invalid</key> </entry> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 83ecdab25c87611c927465f2ec00cd21f03e12e0..de19fa8cb0acaf7d10f4cc85c45694310ac58949 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -387,10 +387,6 @@ <key>Entrydate (Day)</key> <value>Eingangsdatum (Tag)</value> </entry> - <entry> - <key>Date (Day)</key> - <value>Datum (Tag)</value> - </entry> <entry> <key>still incorrect</key> <value>weiterhin fehlerhaft</value> @@ -543,10 +539,6 @@ <key>Entrydate (Month)</key> <value>Eingangsdatum (Monat)</value> </entry> - <entry> - <key>Date (Month)</key> - <value>Datum (Monat)</value> - </entry> <entry> <key>Usage</key> <value>Verwendung</value> @@ -2009,10 +2001,6 @@ <key>Entrydate must not be in the future</key> <value>Eingangsdatum darf nicht in der Zukunft liegen</value> </entry> - <entry> - <key>Date must not be in the future</key> - <value>Datum darf nicht in der Zukunft liegen</value> - </entry> <entry> <key>Copy receipt</key> <value>Beleg kopieren</value> @@ -6472,7 +6460,7 @@ </entry> <entry> <key>Print order</key> - <value>Beleg drucken</value> + <value>Beleg anzeigen</value> </entry> <entry> <key>Order number</key> @@ -6547,10 +6535,6 @@ <key>Entrydate (Year)</key> <value>Eingangsdatum (Jahr)</value> </entry> - <entry> - <key>Date (Year)</key> - <value>Datum (Jahr)</value> - </entry> <entry> <key>Attributes must be unique!</key> <value>Attribute müssen eindeutig sein</value> @@ -8221,6 +8205,10 @@ Bitte Datumseingabe prüfen</value> <key>Monthly</key> <value>monatlich</value> </entry> + <entry> + <key>The status of the order was changed to \"sent\".</key> + <value>Der Status des Belegs wurde auf \"versendet\" gesetzt.</value> + </entry> <entry> <key>Yearly</key> <value>jährlich</value> @@ -8233,10 +8221,6 @@ Bitte Datumseingabe prüfen</value> <key>Entrydate has to be in the selected calendar week!</key> <value>Eingangsdatum muss in der ausgewählten Kalenderwoche liegen!</value> </entry> - <entry> - <key>Date has to be in the selected calendar week!</key> - <value>Datum muss in der ausgewählten Kalenderwoche liegen!</value> - </entry> <entry> <key>Invalid year!</key> <value>Ungültiges jahr!</value> @@ -8484,8 +8468,8 @@ Bitte Datumseingabe prüfen</value> <value>Angebot anzeigen</value> </entry> <entry> - <key>The status of the offer was changed to \"Sent\".</key> - <value>Der Status des Angebots wurde auf \"Versendet\" gesetzt.</value> + <key>The status of the offer was changed to \"sent\".</key> + <value>Der Status des Angebots wurde auf \"versendet\" gesetzt.</value> </entry> <entry> <key>pCallbackFn is not a function</key> @@ -8925,11 +8909,10 @@ Bitte Datumseingabe prüfen</value> <key>export</key> </entry> <entry> - <key>export using the selected template</key> + <key>Receive new Department Permission</key> </entry> <entry> <key>No new recipients found that can be added to the serial letter.</key> - <value>Keine neuen Teilnehmer gefunden die zum Serienbrief hinzugefügt werden können.</value> </entry> <entry> <key>New</key> @@ -8958,8 +8941,14 @@ Bitte Datumseingabe prüfen</value> <value>Workflow deploy fehlgeschlagen</value> </entry> <entry> - <key>Current Recipients</key> - <value>Aktuelle Empfänger</value> + <key>Total in euros</key> + </entry> + <entry> + <key>export using the selected template</key> + </entry> + <entry> + <key>send mail</key> + <value>E-Mail versenden</value> </entry> <entry> <key>%0: %1/%2points = %3</key> @@ -8985,12 +8974,14 @@ Bitte Datumseingabe prüfen</value> </entry> <entry> <key>and open Report</key> + <value>und Report öffnen</value> </entry> <entry> <key>Add Recipients</key> </entry> <entry> <key>{SEND_MAIL}</key> + <value>Email versenden</value> <value>Sende E-Mail</value> </entry> <entry> @@ -9038,13 +9029,6 @@ Bitte Datumseingabe prüfen</value> <key>export using the selected template</key> <value>Mit der ausgewählten Vorlage Exportieren</value> </entry> - <entry> - <key>send mail</key> - <value>E-Mail versenden</value> - </entry> - <entry> - <key>Receive new Department Permission</key> - </entry> <entry> <key>Selection placeholder</key> <value>Suche Platzhalter</value> @@ -9160,8 +9144,7 @@ Bitte Datumseingabe prüfen</value> <key>No new recipients found that can be added to the bulk mail.</key> </entry> <entry> - <key>Grant new User Permission</key> - <value>Neue Benutzer-Berechtigung vergeben</value> + <key>Titel</key> </entry> <entry> <key>Password must contain spaces</key> @@ -9174,7 +9157,7 @@ Bitte Datumseingabe prüfen</value> <key>Startdatum</key> </entry> <entry> - <key>favorites</key> + <key>Set all address locations</key> </entry> <entry> <key>Input value</key> @@ -9221,12 +9204,6 @@ Bitte Datumseingabe prüfen</value> <entry> <key>Set missing address locations</key> </entry> - <entry> - <key>Set all address locations</key> - </entry> - <entry> - <key>Titel</key> - </entry> <entry> <key>Gruppenname</key> </entry> @@ -9407,6 +9384,12 @@ Bitte Datumseingabe prüfen</value> <key>Worklow started</key> <value>Worklow gestartet</value> </entry> + <entry> + <key>The status of the offer was changed to \"Sent\".</key> + </entry> + <entry> + <key>favorites</key> + </entry> <entry> <key>Mark all cached record containers as invalid</key> </entry> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index 5a202e38fab7831796b4b2efcdc873f633ad94b5..0d03c169c64af97a6dbf492f2afc80a9be705abf 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -2115,12 +2115,6 @@ <entry> <key>Entrydate (Day)</key> </entry> - <entry> - <key>Date (Month)</key> - </entry> - <entry> - <key>Date (Day)</key> - </entry> <entry> <key>My Dashboard</key> </entry> @@ -3279,9 +3273,6 @@ <entry> <key>Entrydate must not be in the future</key> </entry> - <entry> - <key>Date must not be in the future</key> - </entry> <entry> <key>Delivery specification</key> </entry> @@ -4811,9 +4802,6 @@ <entry> <key>Entrydate (Year)</key> </entry> - <entry> - <key>Date (Year)</key> - </entry> <entry> <key>Attributes must be unique!</key> </entry> @@ -6334,9 +6322,6 @@ <entry> <key>Entrydate has to be in the selected calendar week!</key> </entry> - <entry> - <key>Date has to be in the selected calendar week!</key> - </entry> <entry> <key>Invalid year!</key> </entry> @@ -6513,7 +6498,7 @@ <key>Show offer</key> </entry> <entry> - <key>The status of the offer was changed to \"Sent\".</key> + <key>The status of the offer was changed to \"sent\".</key> </entry> <entry> <key>pCallbackFn is not a function</key> @@ -7022,19 +7007,13 @@ <key>send mail</key> </entry> <entry> - <key>and open modeler</key> - </entry> - <entry> - <key>Workflow Model</key> - </entry> - <entry> - <key>Current Recipients</key> + <key>Receive new Department Permission</key> </entry> <entry> - <key>The workflow could not be deployed</key> + <key>Receive new User Permission</key> </entry> <entry> - <key>Workflow deploy failed</key> + <key>and open modeler</key> </entry> <entry> <key>Create model</key> @@ -7042,34 +7021,6 @@ <entry> <key>Edit workflow</key> </entry> - <entry> - <key>%0 new recipients will be added to the bulk mail. \n\
 - %1 of the chosen records are already recipients or don't have an e-mail set</key> - </entry> - <entry> - <key>Recipients after adding</key> - </entry> - <entry> - <key>%0 of the chosen records are already recipients or don't have an e-mail set</key> - </entry> - <entry> - <key>Organisations will be exported</key> - </entry> - <entry> - <key>Contacts will be exported</key> - </entry> - <entry> - <key>%0 new participants will be added to the campaign.</key> - </entry> - <entry> - <key>%0 of the chosen records are already in the campaign</key> - </entry> - <entry> - <key>Receive new Department Permission</key> - </entry> - <entry> - <key>Receive new User Permission</key> - </entry> <entry> <key>workflow notification</key> </entry> @@ -7091,6 +7042,9 @@ <entry> <key>Total in euros</key> </entry> + <entry> + <key>Workflow Model</key> + </entry> <entry> <key>The Sales Project can only be filled when a company has been specified</key> </entry> @@ -7175,28 +7129,22 @@ <key>Default</key> </entry> <entry> - <key>Grant new Department Permission</key> - </entry> - <entry> - <key>Permission Procurer Department</key> - </entry> - <entry> - <key>Permission Procurer User</key> + <key>Titel</key> </entry> <entry> - <key>Grant new User Permission</key> + <key>Set missing address locations</key> </entry> <entry> - <key>Selection placeholder</key> + <key>FavoriteFilter_view</key> </entry> <entry> - <key>Current password</key> + <key>Typ</key> </entry> <entry> - <key>Calendar maintime start</key> + <key>Set all address locations</key> </entry> <entry> - <key>Password must contain special characters</key> + <key>Gruppenname</key> </entry> <entry> <key>Password must be at least %0 characters</key> @@ -7264,33 +7212,15 @@ <entry> <key>Mapping</key> </entry> - <entry> - <key>Typ</key> - </entry> <entry> <key>Mappings</key> </entry> <entry> <key>Radius in km</key> </entry> - <entry> - <key>Titel</key> - </entry> - <entry> - <key>Set missing address locations</key> - </entry> - <entry> - <key>FavoriteFilter_view</key> - </entry> - <entry> - <key>Set all address locations</key> - </entry> <entry> <key>Members</key> </entry> - <entry> - <key>Gruppenname</key> - </entry> <entry> <key>The radius has to be %0 or lesser.</key> </entry> @@ -7461,6 +7391,61 @@ <entry> <key>Worklow started</key> </entry> + <entry> + <key>Selection placeholder</key> + </entry> + <entry> + <key>%0 new recipients will be added to the bulk mail. \n\
 + %1 of the chosen records are already recipients or don't have an e-mail set</key> + </entry> + <entry> + <key>Grant new Department Permission</key> + </entry> + <entry> + <key>Current password</key> + </entry> + <entry> + <key>Calendar maintime start</key> + </entry> + <entry> + <key>Password must contain special characters</key> + </entry> + <entry> + <key>Permission Procurer Department</key> + </entry> + <entry> + <key>%0 of the chosen records are already recipients or don't have an e-mail set</key> + </entry> + <entry> + <key>Organisations will be exported</key> + </entry> + <entry> + <key>Recipients after adding</key> + </entry> + <entry> + <key>Contacts will be exported</key> + </entry> + <entry> + <key>The status of the offer was changed to \"Sent\".</key> + </entry> + <entry> + <key>The workflow could not be deployed</key> + </entry> + <entry> + <key>Workflow deploy failed</key> + </entry> + <entry> + <key>%0 new participants will be added to the campaign.</key> + </entry> + <entry> + <key>%0 of the chosen records are already in the campaign</key> + </entry> + <entry> + <key>Permission Procurer User</key> + </entry> + <entry> + <key>The status of the order was changed to \"sent\".</key> + </entry> <entry> <key>Mark all cached record containers as invalid</key> </entry> diff --git a/neonView/DSGVOReport_view/DSGVOReport_view.aod b/neonView/DSGVOReport_view/DSGVOReport_view.aod index bd894e65e4f84f17dc877903fc87ef21260e7c92..3835fcb15b87bf51c774399be84dcfd926d76757 100644 --- a/neonView/DSGVOReport_view/DSGVOReport_view.aod +++ b/neonView/DSGVOReport_view/DSGVOReport_view.aod @@ -11,6 +11,7 @@ <reportViewTemplate> <name>Report</name> <reportData>REPORT_DATA</reportData> + <favoriteActionGroup1>dsgvoReportDispatch</favoriteActionGroup1> <entityField>#ENTITY</entityField> </reportViewTemplate> </children> diff --git a/neonView/OrderFilter_view/OrderFilter_view.aod b/neonView/OrderFilter_view/OrderFilter_view.aod index b98d0e4d4a3e2e69d0b1d1fcd9827131ec3ba8c6..31110f64b91a482ce3b2a3122f0c45fd722a81d9 100644 --- a/neonView/OrderFilter_view/OrderFilter_view.aod +++ b/neonView/OrderFilter_view/OrderFilter_view.aod @@ -60,6 +60,7 @@ <linkedColumns> <element>SALESORDERCODE</element> </linkedColumns> + <fixedFilterFields /> <columns> <neonTableColumn> <name>71f23753-601d-49fa-810d-daa02a1323d8</name> @@ -101,10 +102,12 @@ </tableViewTemplate> <treeTableViewTemplate> <name>tree</name> + <defaultGroupFields /> <entityField>#ENTITY</entityField> <linkedColumns> <element>SALESORDERCODE</element> </linkedColumns> + <fixedFilterFields /> <columns> <neonTreeTableColumn> <name>b55edb3a-ecbc-4d4c-958e-6e491777895b</name> diff --git a/neonView/OrderReminderReport_view/OrderReminderReport_view.aod b/neonView/OrderReminderReport_view/OrderReminderReport_view.aod index ca78ae38cf7495c86338ff4f3ceb317fbd5df3ae..8c0ed255d69772395ea09018326fa4259b6eb61c 100644 --- a/neonView/OrderReminderReport_view/OrderReminderReport_view.aod +++ b/neonView/OrderReminderReport_view/OrderReminderReport_view.aod @@ -11,6 +11,7 @@ <reportViewTemplate> <name>Report</name> <reportData>REMINDER_REPORT_DATA</reportData> + <favoriteActionGroup1>reminderReportDispatch</favoriteActionGroup1> <entityField>#ENTITY</entityField> </reportViewTemplate> </children> diff --git a/neonView/OrderReport_view/OrderReport_view.aod b/neonView/OrderReport_view/OrderReport_view.aod index 8a4fdcad3c61e86ddfebf2fd51d8d6b55fbc4224..0f3487512ac3b724cd6ca4aaba79f0e7c92b5def 100644 --- a/neonView/OrderReport_view/OrderReport_view.aod +++ b/neonView/OrderReport_view/OrderReport_view.aod @@ -11,6 +11,8 @@ <reportViewTemplate> <name>Report</name> <reportData>ORDER_REPORT_DATA</reportData> + <favoriteActionGroup1>orderReportDispatch</favoriteActionGroup1> + <favoriteActionGroup2></favoriteActionGroup2> <entityField>#ENTITY</entityField> </reportViewTemplate> </children> diff --git a/neonView/OrganisationReport_view/OrganisationReport_view.aod b/neonView/OrganisationReport_view/OrganisationReport_view.aod index f8d29baac53e2de71d63e21d5eaa3f82976b710b..0c10fa2a0be68aabbdb477fce16f1adda9c1b55f 100644 --- a/neonView/OrganisationReport_view/OrganisationReport_view.aod +++ b/neonView/OrganisationReport_view/OrganisationReport_view.aod @@ -11,6 +11,7 @@ <reportViewTemplate> <name>Report</name> <reportData>ORGANISATION_REPORT_DATA</reportData> + <favoriteActionGroup1>orgReportDispatch</favoriteActionGroup1> <entityField>#ENTITY</entityField> </reportViewTemplate> </children> diff --git a/process/DataPrivacy_lib/process.js b/process/DataPrivacy_lib/process.js index 3ed75b17066a1758095953c9c200d6a584e2ae58..da986784dd28531ee4e18bfb071b17937fc31e4f 100644 --- a/process/DataPrivacy_lib/process.js +++ b/process/DataPrivacy_lib/process.js @@ -564,7 +564,7 @@ DataPrivacyUtils.openReport = function(pContactId, pReportName, pDSGVOInfo, pLoc { neon.openContext("DSGVOReport", "DSGVOReport_view", [], neon.OPERATINGSTATE_VIEW, { "param.ReportName_param": pReportName, - "param.ContactID_param": pContactId, + "param.ContactId_param": pContactId, "param.DSGVOInfo_param": JSON.stringify(pDSGVOInfo) }); } diff --git a/process/Email_lib/process.js b/process/Email_lib/process.js index 34ae40ebfa34a87d89f1a84131521b9220e36b06..0a29f110ada7eebcdb36af5aaf40e2bd35a55994 100644 --- a/process/Email_lib/process.js +++ b/process/Email_lib/process.js @@ -68,6 +68,8 @@ EmailWritingUtils.openMailTemplate = function (pToRecipients, pSenderContactId, return email.downloadEML(pEmailFilename); } + + /** * opens a view where a new mail can be sent. In the view the use CAN select a DocumentTemplate if needed * @@ -78,9 +80,9 @@ EmailWritingUtils.openMailTemplate = function (pToRecipients, pSenderContactId, * @param {String} pComingFrom source from where you started (e.g. "Person", "Organisation" ) * @param {String} pEmailFilename optional file name of the email. * @param {String} [pAdditionalPlaceholders] additional placeholders for the email - * @param {String} [pOfferId] optional needed for the offerEmails, to change the status of the offer + * @param {Array[]} [pUpdateStatements] an array with update statements which will be executed after email is downloaded/sent. */ -EmailWritingUtils.openNewMail = function (pToContactId, pToEmailAddress, pComingFrom, pAttachmentArray, pNotificationMsg, pEmailFilename, pAdditionalPlaceholders, pOfferId) +EmailWritingUtils.openNewMail = function (pToContactId, pToEmailAddress, pComingFrom, pAttachmentArray, pNotificationMsg, pEmailFilename, pAdditionalPlaceholders, pUpdateStatements) { var params = { "ContactId_param" : pToContactId, @@ -89,7 +91,7 @@ EmailWritingUtils.openNewMail = function (pToContactId, pToEmailAddress, pComing "NotificationMsg_param" : pNotificationMsg, "EmailFilename" : pEmailFilename, "AdditionalPlaceholders_param" : JSON.stringify(pAdditionalPlaceholders), - "OfferId_param" : pOfferId + "UpdateStatements_param" : JSON.stringify(pUpdateStatements) }; if (pToEmailAddress) @@ -98,6 +100,7 @@ EmailWritingUtils.openNewMail = function (pToContactId, pToEmailAddress, pComing neon.openContext("Email", "EmailEdit_view", null, neon.OPERATINGSTATE_VIEW, params); } + EmailWritingUtils.getMailbridgeAddress = function () { return "mailbridge@domain.local"; //TODO: not hardcoded @@ -118,9 +121,16 @@ EmailWritingUtils.getMailbridgeAddress = function () */ EmailWritingUtils.sendReportAsMail = function (pRecipient, pReportArray, pComingFrom, pNotificationMsg, pEmailFilename, pAdditionalPlaceholders, pOfferId) { - var pRecpientEmail = newSelect("COMMUNICATION.ADDR").from("COMMUNICATION") - .where("COMMUNICATION.CONTACT_ID", pRecipient).and("COMMUNICATION.MEDIUM_ID", "COMMEMAIL").cell(); - + var pRecpientEmail; + + if (pRecipient) + { + pRecpientEmail = newSelect("COMMUNICATION.ADDR").from("COMMUNICATION") + .where("COMMUNICATION.CONTACT_ID", pRecipient).and("COMMUNICATION.MEDIUM_ID", "COMMEMAIL").cell(); + } else{ + pRecpientEmail = null; + } + EmailWritingUtils.openNewMail(pRecipient, pRecpientEmail, pComingFrom, pReportArray, pNotificationMsg, pEmailFilename, pAdditionalPlaceholders, pOfferId); }