Skip to content
Snippets Groups Projects
Commit da1350aa authored by Mohamed Mansour's avatar Mohamed Mansour
Browse files

OrderType spalte hinzugefügt. Versendet und Storniert in preview.

Kopf und Fußtext bugs fixed. Demo data fixed.
parent c11700bf
No related branches found
No related tags found
No related merge requests found
Showing
with 209 additions and 106 deletions
......@@ -172,6 +172,8 @@
<column name="ORDERTYPE" value="ORDTYPECONF"/>
<column name="ORDERSTATUS" valueNumeric="1"/>
<column name="CANCELLATION" valueNumeric="0"/>
<column name="PAYMENTTERMS" value="PAYTERM30"/>
<column name="DELIVERYTERMS" value="DELIVEREX"/>
<column name="VAT" valueNumeric="79.80"/>
<column name="VERSNR" valueNumeric="1"/>
</insert>
......
......@@ -817,6 +817,7 @@
<title>Footer text</title>
<contentType>LONG_TEXT</contentType>
<valueProcess>%aditoprj%/entity/Offer_entity/entityfields/footer/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/footer/displayValueProcess.js</displayValueProcess>
</entityField>
<entityParameter>
<name>OfferFooter_param</name>
......
import("system.logging");
import("system.result");
import("system.vars");
import("system.neon");
......@@ -16,5 +17,6 @@ else if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
if (vars.get("$field.ChoosenTEXHeader") != "")
{
var binaryId = db.cell("select ID from ASYS_BINARIES where ROW_ID = '" + vars.get("$field.ChoosenTEXHeader") + "'", "_____SYSTEMALIAS");
logging.log(binaryId);
result.string(util.decodeBase64String(db.getBinaryContent(binaryId, "_____SYSTEMALIAS")));
}
\ No newline at end of file
......@@ -89,11 +89,13 @@
<entityField>
<name>HEADER</name>
<title>Header text</title>
<contentType>LONG_TEXT</contentType>
<valueProcess>%aditoprj%/entity/Order_entity/entityfields/header/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>FOOTER</name>
<title>Footer text</title>
<contentType>LONG_TEXT</contentType>
<valueProcess>%aditoprj%/entity/Order_entity/entityfields/footer/valueProcess.js</valueProcess>
</entityField>
<entityConsumer>
......@@ -873,6 +875,10 @@
<element>PROCESS_SETVALUE</element>
</onValueChangeTypes>
</entityField>
<entityParameter>
<name>Countitems_param</name>
<valueProcess>%aditoprj%/entity/Order_entity/entityfields/countitems_param/valueProcess.js</valueProcess>
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.logging");
import("system.entities");
import("system.vars");
import("system.result");
import("system.db");
......@@ -5,12 +7,36 @@ import("Sql_lib");
import("system.neon");
import("Keyword_lib");
import("KeywordRegistry_basic");
if(vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$confirmation()||vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$invoice())
//var conf = entities.createConfigForLoadingRows()
// .entity("Orderitem_entity")
// .provider("Orderitems")
// .addParameter("ContactId_param", vars.get("$field.CONTACT_ID"));
//
//var count=entities.getRowCount(conf);
//
////var count = vars.get("$param.Countitems_param");
////count = Number(count);
//logging.log(count);
//if (count>"0"){
var itemcount = db.cell(SqlCondition.begin()
.andPrepareVars("SALESORDERITEM.SALESORDER_ID", "$field.SALESORDERID")
.buildSql("select count(*) from SALESORDERITEM", "1=2"));
if(itemcount == "0")
result.string(neon.COMPONENTSTATE_DISABLED);
else if(vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$confirmation()||vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$invoice())
if (vars.get("$field.CANCELLATION")=="0"){
result.string(neon.COMPONENTSTATE_EDITABLE);
}
else
result.string(neon.COMPONENTSTATE_DISABLED);
//}
else
result.string(neon.COMPONENTSTATE_DISABLED);
\ No newline at end of file
//import("system.result");
//import("system.vars");
//import("system.neon");
//import("system.entities");
//
////var loadingConfig = entities.createConfigForLoadingConsumerRows().consumer("Orderitems");
////var count = entities.getRowCount(loadingConfig);
//
//var conf = entities.createConfigForLoadingRows()
// .entity("Orderitem_entity")
// .provider("Orderitems")
// .addParameter("ContactId_param", vars.get("$field.CONTACT_ID"));
//
//var count=entities.getRowCount(conf);
//result.string(count);
import("system.result");
result.string("5")
\ No newline at end of file
result.string(5)
\ No newline at end of file
import("system.logging");
import("system.result");
import("system.vars");
import("system.neon");
import("system.db");
import("system.util");
if (vars.exists("$param.OrderHeader_param"))
{
if(vars.exists("$param.OrderHeader_param") && vars.get("$param.OrderHeader_param"))
result.string(vars.get("$param.OrderHeader_param"));
}
else if(vars.get("$this.value"))
result.string(vars.get("$this.value"));
......@@ -19,5 +17,6 @@ else if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
if (vars.get("$field.ChosenTexHeader") != "")
{
var binaryId = db.cell("select ID from ASYS_BINARIES where ROW_ID = '" + vars.get("$field.ChosenTexHeader") + "'", "_____SYSTEMALIAS");
logging.log(binaryId);
result.string(util.decodeBase64String(db.getBinaryContent(binaryId, "_____SYSTEMALIAS")));
}
\ No newline at end of file
......@@ -5,8 +5,16 @@ import("Sql_lib");
import("system.neon");
import("Keyword_lib");
import("KeywordRegistry_basic");
var itemcount = db.cell(SqlCondition.begin()
.andPrepareVars("SALESORDERITEM.SALESORDER_ID", "$field.SALESORDERID")
.buildSql("select count(*) from SALESORDERITEM", "1=2"));
if(itemcount == "0")
result.string(neon.COMPONENTSTATE_DISABLED);
if (vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$invoice())
else if (vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$invoice())
{
if (vars.get("$field.ORDERSTATUS")=="1" && vars.get("$field.CANCELLATION")=="0")
......
......@@ -5,8 +5,16 @@ import("Sql_lib");
import("system.neon");
import("Keyword_lib");
import("KeywordRegistry_basic");
var itemcount = db.cell(SqlCondition.begin()
.andPrepareVars("SALESORDERITEM.SALESORDER_ID", "$field.SALESORDERID")
.buildSql("select count(*) from SALESORDERITEM", "1=2"));
if(itemcount == "0")
result.string(neon.COMPONENTSTATE_DISABLED);
if (vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$invoice()|| vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$credit())
else if (vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$invoice()|| vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$credit())
{
if (vars.get("$field.ORDERSTATUS")=="1")
......
......@@ -3,8 +3,16 @@ import("system.result");
import("system.db");
import("Sql_lib");
import("system.neon");
var itemcount = db.cell(SqlCondition.begin()
.andPrepareVars("SALESORDERITEM.SALESORDER_ID", "$field.SALESORDERID")
.buildSql("select count(*) from SALESORDERITEM", "1=2"));
if(itemcount == "0")
result.string(neon.COMPONENTSTATE_DISABLED);
if(vars.get("$field.ORDERSTATUS")=="0")
else if(vars.get("$field.ORDERSTATUS")=="0")
result.string(neon.COMPONENTSTATE_EDITABLE);
else
result.string(neon.COMPONENTSTATE_DISABLED);
\ No newline at end of file
......@@ -5,8 +5,16 @@ import("Sql_lib");
import("system.neon");
import("Keyword_lib");
import("KeywordRegistry_basic");
var itemcount = db.cell(SqlCondition.begin()
.andPrepareVars("SALESORDERITEM.SALESORDER_ID", "$field.SALESORDERID")
.buildSql("select count(*) from SALESORDERITEM", "1=2"));
if(itemcount == "0")
result.string(neon.COMPONENTSTATE_DISABLED);
if(vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$confirmation())
else if(vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$confirmation())
result.string(neon.COMPONENTSTATE_EDITABLE);
else if (vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$invoice())
{
......
......@@ -5,8 +5,16 @@ import("Sql_lib");
import("system.neon");
import("Keyword_lib");
import("KeywordRegistry_basic");
var itemcount = db.cell(SqlCondition.begin()
.andPrepareVars("SALESORDERITEM.SALESORDER_ID", "$field.SALESORDERID")
.buildSql("select count(*) from SALESORDERITEM", "1=2"));
if(itemcount == "0")
result.string(neon.COMPONENTSTATE_DISABLED);
if(vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$confirmation())
else if(vars.get("$field.ORDERTYPE")==$KeywordRegistry.orderType$confirmation())
result.string(neon.COMPONENTSTATE_EDITABLE);
else
result.string(neon.COMPONENTSTATE_DISABLED);
\ 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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
<name>OrderFilter_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<filterable v="true" />
<dashletConfigurations>
<neonDashletConfiguration>
<name>AllOrdersDashlet</name>
<title>Receipts</title>
<description>Show all receipts</description>
<fragment>Order/filter</fragment>
<singleton v="true" />
<requiresConfiguration v="false" />
<icon>VAADIN:FILE_TEXT_O</icon>
<categories>
<neonDashletCategory>
<name>sales</name>
<title>Sales</title>
</neonDashletCategory>
<neonDashletCategory>
<name>order</name>
<title>Receipt</title>
</neonDashletCategory>
</categories>
</neonDashletConfiguration>
<neonDashletConfiguration>
<name>SendOrdersDashlet</name>
<title>Sent receipts</title>
<description>Show all sent receipts</description>
<fragment>Order/filter?search=W3sibmFtZSI6IlNUQVRVUyIsIm9wZXJhdG9yIjoiRVFVQUwiLCJ2YWx1ZUtleSI6IjIiLCJ2YWx1ZSI6IlZlcnNlbmRldCIsImNvbnRlbnRUeXBlIjoiVEVYVCJ9XQ%253D%253D</fragment>
<singleton v="true" />
<requiresConfiguration v="false" />
<icon>VAADIN:FILE_TEXT_O</icon>
<categories>
<neonDashletCategory>
<name>sales</name>
<title>Sales</title>
</neonDashletCategory>
<neonDashletCategory>
<name>order</name>
<title>Receipt</title>
</neonDashletCategory>
</categories>
</neonDashletConfiguration>
</dashletConfigurations>
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<tableViewTemplate>
<name>Orders</name>
<inlineEdit v="true" />
<iconField>IMAGE</iconField>
<titleField>SALESORDERCODE</titleField>
<subtitleField>STATUS</subtitleField>
<descriptionField>NET</descriptionField>
<entityField>#ENTITY</entityField>
<columns>
<neonTableColumn>
<name>8d4948c3-40cb-45dd-ae04-32ae06458b26</name>
<entityField>IMAGE</entityField>
</neonTableColumn>
<neonTableColumn>
<name>60b83daa-9349-4bef-94d8-5f1fc350da59</name>
<entityField>SALESORDERCODE</entityField>
</neonTableColumn>
<neonTableColumn>
<name>5688908f-7c50-46a3-8899-2767ea5b4a90</name>
<entityField>CONTACT_ORG_ID</entityField>
<width v="75" />
<expandRatio v="100" />
</neonTableColumn>
<neonTableColumn>
<name>6fdca295-2e0a-4f89-a386-1ddda8a3090c</name>
<entityField>CONTACT_PERSON_ID</entityField>
</neonTableColumn>
<neonTableColumn>
<name>443c8480-5676-43a3-9617-f86dae39c960</name>
<entityField>SALESORDERDATE</entityField>
</neonTableColumn>
<neonTableColumn>
<name>c5780864-ac2c-4650-8630-2690a9a074ea</name>
<entityField>STATUS</entityField>
</neonTableColumn>
<neonTableColumn>
<name>6f55da1e-281c-44ba-ab97-729b75516c32</name>
<entityField>NET</entityField>
</neonTableColumn>
</columns>
</tableViewTemplate>
</children>
</neonView>
<?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>OrderFilter_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<filterable v="true" />
<dashletConfigurations>
<neonDashletConfiguration>
<name>AllOrdersDashlet</name>
<title>Receipts</title>
<description>Show all receipts</description>
<fragment>Order/filter</fragment>
<singleton v="true" />
<requiresConfiguration v="false" />
<icon>VAADIN:FILE_TEXT_O</icon>
<categories>
<neonDashletCategory>
<name>sales</name>
<title>Sales</title>
</neonDashletCategory>
<neonDashletCategory>
<name>order</name>
<title>Receipt</title>
</neonDashletCategory>
</categories>
</neonDashletConfiguration>
<neonDashletConfiguration>
<name>SendOrdersDashlet</name>
<title>Sent receipts</title>
<description>Show all sent receipts</description>
<fragment>Order/filter?search=W3sibmFtZSI6IlNUQVRVUyIsIm9wZXJhdG9yIjoiRVFVQUwiLCJ2YWx1ZUtleSI6IjIiLCJ2YWx1ZSI6IlZlcnNlbmRldCIsImNvbnRlbnRUeXBlIjoiVEVYVCJ9XQ%253D%253D</fragment>
<singleton v="true" />
<requiresConfiguration v="false" />
<icon>VAADIN:FILE_TEXT_O</icon>
<categories>
<neonDashletCategory>
<name>sales</name>
<title>Sales</title>
</neonDashletCategory>
<neonDashletCategory>
<name>order</name>
<title>Receipt</title>
</neonDashletCategory>
</categories>
</neonDashletConfiguration>
</dashletConfigurations>
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<tableViewTemplate>
<name>Orders</name>
<inlineEdit v="true" />
<iconField>IMAGE</iconField>
<titleField>SALESORDERCODE</titleField>
<subtitleField>STATUS</subtitleField>
<descriptionField>NET</descriptionField>
<entityField>#ENTITY</entityField>
<columns>
<neonTableColumn>
<name>8d4948c3-40cb-45dd-ae04-32ae06458b26</name>
<entityField>IMAGE</entityField>
</neonTableColumn>
<neonTableColumn>
<name>dba5604f-cc1b-4083-8115-7bbe1ba07bf4</name>
<entityField>ORDERTYPE</entityField>
</neonTableColumn>
<neonTableColumn>
<name>60b83daa-9349-4bef-94d8-5f1fc350da59</name>
<entityField>SALESORDERCODE</entityField>
</neonTableColumn>
<neonTableColumn>
<name>5688908f-7c50-46a3-8899-2767ea5b4a90</name>
<entityField>CONTACT_ORG_ID</entityField>
<width v="75" />
<expandRatio v="100" />
</neonTableColumn>
<neonTableColumn>
<name>6fdca295-2e0a-4f89-a386-1ddda8a3090c</name>
<entityField>CONTACT_PERSON_ID</entityField>
</neonTableColumn>
<neonTableColumn>
<name>443c8480-5676-43a3-9617-f86dae39c960</name>
<entityField>SALESORDERDATE</entityField>
</neonTableColumn>
<neonTableColumn>
<name>c5780864-ac2c-4650-8630-2690a9a074ea</name>
<entityField>STATUS</entityField>
</neonTableColumn>
<neonTableColumn>
<name>6f55da1e-281c-44ba-ab97-729b75516c32</name>
<entityField>NET</entityField>
</neonTableColumn>
</columns>
</tableViewTemplate>
</children>
</neonView>
......@@ -56,6 +56,14 @@
<name>8f976c0e-f31d-4482-a8f7-7c93864f1815</name>
<entityField>DELIVERYTERMS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>39a40fbb-b3af-49a2-8ce2-0ece7bbf6fda</name>
<entityField>ORDERSTATUS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>8604c69f-5f3d-472a-9b8f-b8f1bcaf25fe</name>
<entityField>CANCELLATION</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<genericViewTemplate>
......
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