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

some refactorings / fixes

parent 48ffff8b
No related branches found
No related tags found
No related merge requests found
......@@ -101,6 +101,9 @@ function _addMonth(pYear, pMonth, pData, pCategory)
function _addProducts(pYear, pMonth, pData, pCategory)
{
var monthDate = new Date(pYear, pMonth-1);
monthDate = datetime.toDate(monthDate.getTime(), "MMM yyyy", "UTC");
var groupcodeSums = {};
for (let i = 0; i < pData.length; i++)
......@@ -131,6 +134,8 @@ function _addProducts(pYear, pMonth, pData, pCategory)
for (let groupcode in groupcodeSums)
{
if (groupcodeSums[groupcode]["sum"])
chartData.add(pCategory + pYear + pMonth + groupcode, pCategory + pYear + pMonth, [pCategory, groupcodeSums[groupcode]["name"], groupcodeSums[groupcode]["sum"]]);
{
chartData.add(pCategory + pYear + pMonth + groupcode, pCategory + pYear + pMonth, [pCategory, groupcodeSums[groupcode]["name"] + " (" + monthDate.toString() + ")", groupcodeSums[groupcode]["sum"]]);
}
}
}
......@@ -28,7 +28,7 @@
</neonViewReference>
<neonViewReference>
<name>a68c9d63-aff4-4e82-af23-72d20c2b6b76</name>
<view>OfferDetail_view</view>
<view>OfferCoverLetter_view</view>
</neonViewReference>
</references>
</neonContext>
<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
<name>OfferDetail_view</name>
<title>Details</title>
<name>OfferCoverLetter_view</name>
<title>Cover letter</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<boxLayout>
......@@ -12,18 +12,10 @@
<genericViewTemplate>
<name>Details</name>
<showDrawer v="true" />
<drawerCaption>Detail</drawerCaption>
<drawerCaption>Cover letter</drawerCaption>
<entityField>#ENTITY</entityField>
<title></title>
<fields>
<entityFieldLink>
<name>f0d0c68a-8437-4d9e-b852-575efaa984e8</name>
<entityField>DELIVERYTERMS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>c66f5e5b-82ad-4f93-9951-d96dfb802dbe</name>
<entityField>PAYMENTTERMS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>ab742325-7d03-4dfd-8afb-779dd8da805b</name>
<entityField>INFO</entityField>
......
......@@ -22,7 +22,7 @@
<neonViewReference>
<name>e6b12eed-d67e-467c-9302-f6340f901235</name>
<entityField>#ENTITY</entityField>
<view>OfferDetail_view</view>
<view>OfferCoverLetter_view</view>
</neonViewReference>
<neonViewReference>
<name>a3702740-418d-40d5-9415-788542c14abb</name>
......
......@@ -82,6 +82,14 @@
<name>3317b73e-68e8-41a8-a678-89c7c7c8513e</name>
<entityField>SALESPROJECT_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>59daee43-0e79-49d8-a36a-5ce4c491def9</name>
<entityField>PAYMENTTERMS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>a3a9ee30-bdd2-4907-b215-d4b4adcc0f1d</name>
<entityField>DELIVERYTERMS</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<neonViewReference>
......
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