You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/12/03 18:02:00 UTC
[jira] [Commented] (OFBIZ-12717) Eca createPaymentFromOrder failed if payment already exist
[ https://issues.apache.org/jira/browse/OFBIZ-12717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642880#comment-17642880 ]
ASF subversion and git services commented on OFBIZ-12717:
---------------------------------------------------------
Commit 2eeed5182d427bbb071eb5b23c0c7dd5fcc4dcef in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=2eeed5182d ]
Fixed: Eca createPaymentFromOrder failed if payment already exist (OFBIZ-12717)
Groovy migration, before migration was
<if-not-empty field="orderPaymentPrefAndPayments">
<log level="info" message="Payment not created for order ${orderHeader.orderId},
at least a single payment already exists"/>
<return/>
</if-not-empty> )
After migration is
if (from("OrderPaymentPrefAndPayment")
.where([EntityCondition.makeCondition("orderId", orderHeader.orderId),
EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL,
"PAYMENT_CANCELLED")])
.queryCount() > 1) {
return error("Payment not created for order ${orderHeader.orderId},
at least a single payment already exists")
}
queryCount() > 1 had to be queryCount() > 0
return error had to be return failure
Thanks: Marie-Aline Pantais
> Eca createPaymentFromOrder failed if payment already exist
> ----------------------------------------------------------
>
> Key: OFBIZ-12717
> URL: https://issues.apache.org/jira/browse/OFBIZ-12717
> Project: OFBiz
> Issue Type: Bug
> Components: accounting
> Affects Versions: 22.01.01
> Reporter: Marie-Aline Pantais
> Assignee: Jacques Le Roux
> Priority: Major
> Attachments: OFBIZ-12717.patch
>
>
> Groovy migration
> Before migration was
>
> {code:java}
> <if-not-empty field="orderPaymentPrefAndPayments">
> <log level="info" message="Payment not created for order ${orderHeader.orderId}, at least a single payment already exists"/>
> <return/>
> </if-not-empty> ){code}
>
> After migration is
>
> {code:java}
> if (from("OrderPaymentPrefAndPayment")
> .where([EntityCondition.makeCondition("orderId", orderHeader.orderId),
> EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")])
> .queryCount() > 1) {
> return error("Payment not created for order ${orderHeader.orderId}, at least a single payment already exists")
> }
> {code}
> queryCount() > 1 had to be queryCount() > 0
> return error had to be return failure
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)