diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListController.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListController.java
index 36d15e6..03a0356 100644
--- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListController.java
+++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListController.java
@@ -376,11 +376,11 @@ public class OPListController implements Serializable {
}
/**
- * Berechnet den Zahlbetrag in EUR bei Fremdwärungen
+ * Berechnet den Zahlbetrag in der Hauswährung bei Fremdwährungen
*
* @return
*/
- public double calculatePaymentSaldoEUR() {
+ public double calculatePaymentSaldoMainCurrency() {
double result = 0;
if (invoiceList != null) {
for (ItemCollection invoice : invoiceList) {
@@ -425,4 +425,12 @@ public class OPListController implements Serializable {
}
}
+ public String getCurrenciesOutMain() {
+ try {
+ return invoiceService.getCurrenciesOutMain();
+ } catch (PluginException e) {
+ return "undefined currency";
+ }
+ }
+
}
diff --git a/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_opliste.xhtml b/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_opliste.xhtml
index 35b61c7..790df6c 100644
--- a/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_opliste.xhtml
+++ b/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/section_opliste.xhtml
@@ -95,8 +95,10 @@
-
-
+
+
|
@@ -121,7 +123,8 @@
-
+
|
@@ -199,19 +202,19 @@
-
-
+
+
- EUR
+ #{opListController.currenciesOutMain}
-
-
- |
-
+ |
+
+
@@ -244,11 +247,11 @@
// set the payment amount to the invoice total if the field is still empty
- // if the paymetn dif is lower than the invoice saldo we take the dif amount
- // if the currecny is not EUR and not equal go home!
+ // if the payment dif is lower than the invoice saldo we take the dif amount
+ // if the currency is not Main Currency and not equal go home!
function initInvoicePayment(element) {
// console.log('...initInvoicePayment...' + element.checked);
-
+ var mainCurrency = "#{ opListController.currenciesOutMain }";
var currentTD = $(element).closest('td');
var prevTD = $(currentTD).prev().prev().prev().prev().prev();
var amountValue = $(prevTD).text();
@@ -276,7 +279,7 @@
// wenn wir noch keinen wert haben, dann betrag übernehmen
if ($(amountInput).val() == '' || $(amountInput).val() == '0,00') {
// wenn wir einen saldo.max.byrate haben
- if (paymentCurrency === 'EUR' && saldoMaxByRate > '') {
+ if (paymentCurrency === mainCurrency && saldoMaxByRate > '') {
amountValue = saldoMaxByRate;
} else {
amountValue = amountValue;
diff --git a/office-alexander-logistics-app/src/main/webapp/pages/workitems/parts/alexander/currency_out.xhtml b/office-alexander-logistics-app/src/main/webapp/pages/workitems/parts/alexander/currency_out.xhtml
index 939e703..0fb4c74 100644
--- a/office-alexander-logistics-app/src/main/webapp/pages/workitems/parts/alexander/currency_out.xhtml
+++ b/office-alexander-logistics-app/src/main/webapp/pages/workitems/parts/alexander/currency_out.xhtml
@@ -5,6 +5,7 @@
+
diff --git a/workflow/dwc/zahlungseingang-dwc-1.0.3.bpmn b/workflow/dwc/zahlungseingang-dwc-1.0.3.bpmn
index fb34d77..771983e 100644
--- a/workflow/dwc/zahlungseingang-dwc-1.0.3.bpmn
+++ b/workflow/dwc/zahlungseingang-dwc-1.0.3.bpmn
@@ -552,7 +552,7 @@ result.isValid=true;
-
+
@@ -651,7 +651,7 @@ result.isValid=true;
-
+