You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2021/09/14 12:05:35 UTC
[ofbiz-framework] 01/02: Fixed: No functional change,
simplify a conditional
This is an automated email from the ASF dual-hosted git repository.
nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit 65e955be885875fc61287de50f69bd5af0acd57a
Author: Nicolas Malin <ni...@nereide.fr>
AuthorDate: Tue Sep 14 09:07:34 2021 +0200
Fixed: No functional change, simplify a conditional
---
.../accounting/groovyScripts/payment/PaymentServices.groovy | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/applications/accounting/groovyScripts/payment/PaymentServices.groovy b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
index 2b72fdc..795713b 100644
--- a/applications/accounting/groovyScripts/payment/PaymentServices.groovy
+++ b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
@@ -627,6 +627,7 @@ def createPaymentFromOrder() {
return result
}
}
+
def createPaymentApplication() {
// Create a Payment Application
if (!parameters.invoiceId && !parameters.billingAccountId && !parameters.taxAuthGeoId && !parameters.toPaymentId) {
@@ -675,10 +676,9 @@ def createPaymentApplication() {
}
}
- if (!paymentAppl.amountApplied) {
- if (parameters.billingAccountId || parameters.taxAuthGeoId) {
- paymentAppl.amountApplied = notAppliedPayment
- }
+ if (!paymentAppl.amountApplied &&
+ (parameters.billingAccountId || parameters.taxAuthGeoId)) {
+ paymentAppl.amountApplied = notAppliedPayment
}
paymentAppl.paymentApplicationId = delegator.getNextSeqId("PaymentApplication")
paymentAppl.create()