Skip to content
Snippets Groups Projects
Commit 00ef7d0c authored by Andre Loreth's avatar Andre Loreth
Browse files

#1051579: Order: Implement OrderReminderReport_view

parent 51f0facd
No related branches found
No related tags found
No related merge requests found
......@@ -952,6 +952,10 @@
<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>
<entityConsumer>
<name>Organisations</name>
<dependency>
......
import("system.result");
import("system.vars");
import("Order_lib");
var reportData = OrderUtils.buildReminderReport(vars.get("$field.SALESORDERID"));
if(reportData != null) {
result.string(reportData[1]);
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.4" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.4">
<name>OrderReminderReport_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<reportViewTemplate>
<name>Report</name>
<reportData>REMINDER_REPORT_DATA</reportData>
<entityField>#ENTITY</entityField>
</reportViewTemplate>
</children>
</neonView>
......@@ -371,9 +371,14 @@ OrderUtils.openOrderReport = function (pOrderID)
orderReport.openReport();
}
OrderUtils.openReminderReport = function (pOrderID)
{
/**
* Will build the reminder report for the given order.
*
* @param {String} pOrderID The ID of the order, for which the report shall be built.
* @return {Array} [filename, data]
*/
OrderUtils.buildReminderReport = function (pOrderID)
{
var reminderReport = new Report("Reminder_report");
var sqlUtil = new SqlMaskingUtils();
......@@ -443,7 +448,7 @@ OrderUtils.openReminderReport = function (pOrderID)
if (itemData.length == 0)
return;
return null;
var fullPrice = 0;
var itemSum = 0;
......@@ -543,7 +548,17 @@ OrderUtils.openReminderReport = function (pOrderID)
])
.add(itemData));
reminderReport.openReport();
return reminderReport.exportReport();
}
/**
* Opens the reminder report for the given order.
*
* @param {String} pOrderID The ID of the order, for which the report shall be built.
*/
OrderUtils.openReminderReport = function (pOrderID)
{
neon.openContext("Order", "OrderReminderReport_view", [pOrderID], neon.OPERATINGSTATE_VIEW, null);
}
......
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