[ 
https://issues.apache.org/jira/browse/OFBIZ-11487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17149330#comment-17149330
 ] 

Jacques Le Roux commented on OFBIZ-11487:
-----------------------------------------

Hi Sourabh,

Why using {{invoiceStatusCtx.userLogin = userLogin}} when it's not in the 
simple-method implementation? Do we really need it here? Same for 
{{copyAcctgTransCtx.userLogin = userLogin}}, did you cross issues w/o userLogin 
passed?

Not a big deal but I'd rather write
{code}
+            Map postAcctgTransMap = [:]
+            postAcctgTransMap.acctgTransId = acctgTransId
+            if (acctgTransPayment.isPosted == 'Y')
+                run service: 'postAcctgTrans', with: postAcctgTransMap
+        }
{code}

{code}
+            if (acctgTransPayment.isPosted == 'Y')
+                Map postAcctgTransMap = [:]
+                postAcctgTransMap.acctgTransId = acctgTransId
+                run service: 'postAcctgTrans', with: postAcctgTransMap
+        }
{code}

Also the service should return {{success()}} at the end.

The rest sounds good to me


> Convert voidPayment service from mini-lang to groovy DSL
> --------------------------------------------------------
>
>                 Key: OFBIZ-11487
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11487
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: accounting
>    Affects Versions: Trunk
>            Reporter: Devanshu Vyas
>            Assignee: Sourabh Punyani
>            Priority: Minor
>             Fix For: Upcoming Branch
>
>         Attachments: OFBIZ-11487.patch
>
>
> Convert the voidPayment service code from mini-lang to groovy DSL.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to