fix op_liste Zahlungseingang - Anzeige Währungen
This commit is contained in:
parent
ea5a43e259
commit
f294d64e8c
4 changed files with 30 additions and 18 deletions
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,8 +95,10 @@
|
|||
</h:outputText>
|
||||
</td>
|
||||
<td>
|
||||
<!-- if not EUR -->
|
||||
<h:outputText rendered="#{invoice.item['invoice.currency'] ne 'EUR'}" value=" EUR" />
|
||||
<!-- if not Main Currency -->
|
||||
<h:outputText
|
||||
rendered="#{invoice.item['invoice.currency'] ne opListController.currenciesOutMain}"
|
||||
value=" #{opListController.currenciesOutMain}" />
|
||||
</td>
|
||||
|
||||
|
||||
|
|
@ -121,7 +123,8 @@
|
|||
</td>
|
||||
|
||||
<td style="color: red;">
|
||||
<h:outputText rendered="#{!empty invoice.item['invoice.saldo.byrate']}" value="EUR" />
|
||||
<h:outputText rendered="#{!empty invoice.item['invoice.saldo.byrate']}"
|
||||
value="#{opListController.currenciesOutMain}" />
|
||||
</td>
|
||||
|
||||
<!-- Teilbetrag -->
|
||||
|
|
@ -199,19 +202,19 @@
|
|||
</h:outputText>
|
||||
</h:panelGroup>
|
||||
</strong>
|
||||
<!-- Anzeige des Zahlbetrags in EUR bei Fremdwärungszahlung -->
|
||||
<ui:fragment rendered="#{workitem.item['payment.currency'] ne 'EUR'}">
|
||||
<!-- Anzeige des Zahlbetrags in Maincurrency bei Fremdwärungszahlung -->
|
||||
<ui:fragment rendered="#{workitem.item['payment.currency'] ne opListController.currenciesOutMain}">
|
||||
<br />
|
||||
EUR <h:outputText value="#{opListController.calculatePaymentSaldoEUR()}">
|
||||
#{opListController.currenciesOutMain} <h:outputText
|
||||
value="#{opListController.calculatePaymentSaldoMainCurrency()}">
|
||||
<f:convertNumber minFractionDigits="2" locale="de" />
|
||||
</h:outputText>
|
||||
</ui:fragment>
|
||||
</td>
|
||||
|
||||
|
||||
<td></td>
|
||||
|
||||
<td />
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<!-- dieses feld speichert die selection der rechnungen -->
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<ui:fragment rendered="#{!readonly}">
|
||||
<h:selectOneMenu required="#{required?validationController.required:false}" value="#{workitem.item[item.name]}">
|
||||
<f:selectItems value="#{aglConfigController.getSelectItems('currency.out')}" />
|
||||
<f:ajax event="change" render="#{formComponents.clientId}" />
|
||||
</h:selectOneMenu>
|
||||
</ui:fragment>
|
||||
<ui:fragment rendered="#{readonly}">
|
||||
|
|
|
|||
|
|
@ -552,7 +552,7 @@ result.isValid=true;
|
|||
<bpmn2:sequenceFlow id="SequenceFlow_4" sourceRef="StartEvent_1" targetRef="Task_1">
|
||||
<bpmn2:documentation id="documentation_xo2RYQ"/>
|
||||
</bpmn2:sequenceFlow>
|
||||
<bpmn2:dataObject id="DataObject_1" name="Form">
|
||||
<bpmn2:dataObject id="DataObject_1" imixs:datatype="form-data" name="Form">
|
||||
<bpmn2:documentation id="Documentation_17"><![CDATA[<?xml version="1.0"?>
|
||||
<imixs-form>
|
||||
<imixs-form-section columns="2" >
|
||||
|
|
@ -651,7 +651,7 @@ result.isValid=true;
|
|||
<bpmn2:sequenceFlow id="SequenceFlow_5" sourceRef="EventBasedGateway_1" targetRef="IntermediateCatchEvent_1">
|
||||
<bpmn2:documentation id="documentation_9sxTZg"/>
|
||||
</bpmn2:sequenceFlow>
|
||||
<bpmn2:dataObject id="DataObject_2" name="Form">
|
||||
<bpmn2:dataObject id="DataObject_2" imixs:datatype="form-data" name="Form">
|
||||
<bpmn2:documentation id="Documentation_16"><![CDATA[<?xml version="1.0"?>
|
||||
<imixs-form>
|
||||
<imixs-form-section columns="2" label="Zahlungsdaten">
|
||||
|
|
|
|||
Loading…
Reference in a new issue