diff --git a/applications/accounting/groovyScripts/payment/PaymentServices.groovy b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
index 7375a59970..d416292137 100644
--- a/applications/accounting/groovyScripts/payment/PaymentServices.groovy
+++ b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
@@ -321,4 +321,21 @@ def cancelPaymentBatch() {
}
}
}
-}
\ No newline at end of file
+}
+
+def getPayments() {
+ payments = []
+ if (parameters.paymentGroupId) {
+ paymentGroupMembers = from("PaymentGroupMember").where("paymentGroupId", parameters.paymentGroupId).filterByDate().queryList()
+ if (paymentGroupMembers) {
+ paymentIds = EntityUtil.getFieldListFromEntityList(paymentGroupMembers, "paymentId", true)
+ payments = from("Payment").where(EntityCondition.makeCondition("paymentId", EntityOperator.IN, paymentIds)).queryList()
+ }
+ }
+ if (parameters.finAccountTransId) {
+ payments = from("Payment").where("finAccountTransId", parameters.finAccountTransId).queryList()
+ }
+ result = success()
+ result.payments = payments
+ return result
+}
diff --git a/applications/accounting/minilang/payment/PaymentServices.xml b/applications/accounting/minilang/payment/PaymentServices.xml
index d30eaa3046..9f059cb700 100644
--- a/applications/accounting/minilang/payment/PaymentServices.xml
+++ b/applications/accounting/minilang/payment/PaymentServices.xml
@@ -537,26 +537,6 @@ under the License.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/applications/accounting/servicedef/services_payment.xml b/applications/accounting/servicedef/services_payment.xml
index 77f80df702..8a0dae3ff6 100644
--- a/applications/accounting/servicedef/services_payment.xml
+++ b/applications/accounting/servicedef/services_payment.xml
@@ -207,8 +207,8 @@ under the License.
-
+
Get list of payment