Skip to content
Snippets Groups Projects
Commit 97ce69c5 authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

Merge branch 'sales_1081505_FeatureMultiCurrencyCapability' into '2021.1'

Sales 1081505 feature multi currency capability

See merge request xrm/basic!1052
parents e235e27d 1130c236
No related branches found
No related tags found
No related merge requests found
......@@ -66,10 +66,22 @@
<name>bee2acfb-20ac-485e-be6c-c9c6a25e6013</name>
<entityField>PROBABILITY_AI</entityField>
</entityFieldLink>
<entityFieldLink>
<name>c6df8c5f-1603-4b16-b4a4-0f8bed18aa53</name>
<entityField>CURRENCY</entityField>
</entityFieldLink>
<entityFieldLink>
<name>f33df05b-4a78-4626-b0d2-723599749a54</name>
<entityField>CURRENCYRATE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>950d21a3-c0f9-4df5-9810-fa027a6fdb4a</name>
<entityField>VOLUME</entityField>
</entityFieldLink>
<entityFieldLink>
<name>6483f0de-ac7b-4892-9b61-3f53022a643a</name>
<entityField>VOLUMEFOREIGNCURRENCY</entityField>
</entityFieldLink>
<entityFieldLink>
<name>bf7ecf7a-3d7f-4ec8-867a-c10ced346343</name>
<entityField>TIMETRACKINGSUM</entityField>
......
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.2">
<name>Currency_lib</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<process>%aditoprj%/process/Currency_lib/process.js</process>
<alias>Data_alias</alias>
<variants>
<element>LIBRARY</element>
</variants>
</process>
import("KeywordRegistry_basic");
import("system.vars");
import("Sql_lib");
/**
* a static Utility class for Currency
*
* Do not create an instance of this!
* @class
*/
function CurrencyUtils() {}
/*
* Retrieves valid Rate (most recent One) for pCurrency
*
* @param {String} pSourceCurrency the source currency as ISO;
*
* @param {String} pTargetCurrency the target currency as ISO;
*
* @return {Number} the rate
*/
CurrencyUtils.getCurrencyRate = function(pSourceCurrency, pTargetCurrency)
{
var rate = newSelect("CURRENCYRATE.CURRENCYRATE")
.from("CURRENCYRATE")
.where("CURRENCYRATE.VALID_FROM", vars.get("$sys.date"), SqlBuilder.LESS_OR_EQUAL())
.and("CURRENCYRATE.SOURCECURRENCYISO", pSourceCurrency)
.and("CURRENCYRATE.TARGETCURRENCYISO", pTargetCurrency)
.orderBy("CURRENCYRATE.VALID_FROM desc")
.cell();
rate = rate == "" ? 1 : rate;
return rate;
};
\ No newline at end of file
......@@ -46,6 +46,9 @@ $KeywordRegistry.contactStatus$markToDelete = function(){return "CONTACTSTATDELE
$KeywordRegistry.currency = function(){return "Currency";};
$KeywordRegistry.currency$eur = function(){return "EUR";};
$KeywordRegistry.currency$usd = function(){return "USD";};
$KeywordRegistry.currency$cad = function(){return "CAD";};
$KeywordRegistry.currency$chf = function(){return "CHF";};
$KeywordRegistry.productGroupcode = function(){return "ProductGroupcode";};
......
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