gilPts commented on code in PR #517:
URL: https://github.com/apache/ofbiz-framework/pull/517#discussion_r1088742354


##########
applications/accounting/groovyScripts/admin/ListInvoiceItemTypesGlAccount.groovy:
##########
@@ -30,25 +30,25 @@ invoiceItemTypes = 
from('InvoiceItemType').where(exprBldr.LIKE(invoiceItemTypeId
 context.invoiceItemTypes = invoiceItemTypes.collect { invoiceItemType ->
     defaultAccount = true
     glAccount = null
-    invoiceItemTypeOrgs = 
invoiceItemType.getRelated("InvoiceItemTypeGlAccount", [organizationPartyId : 
organizationPartyId], null, false)
+    invoiceItemTypeOrgs = 
invoiceItemType.getRelated('InvoiceItemTypeGlAccount', [organizationPartyId: 
organizationPartyId], null, false)
     overrideGlAccountId = null
     if (invoiceItemTypeOrgs) {
         invoiceItemTypeOrg = invoiceItemTypeOrgs[0]
         overrideGlAccountId = invoiceItemTypeOrg.glAccountId
 
-        glAccounts = invoiceItemTypeOrg.getRelated("GlAccount", null, null, 
false)
+        glAccounts = invoiceItemTypeOrg.getRelated('GlAccount', null, null, 
false)
         if (glAccounts) {
             glAccount = glAccounts[0]
             defaultAccount = false
         }
     } else {
-        glAccount = invoiceItemType.getRelatedOne("DefaultGlAccount", false)
+        glAccount = invoiceItemType.getRelatedOne('DefaultGlAccount', false)
     }
 
-    return [invoiceItemTypeId : invoiceItemType.invoiceItemTypeId,
-                  description : invoiceItemType.description,
-                  defaultGlAccountId : invoiceItemType.defaultGlAccountId,
-                  overrideGlAccountId : overrideGlAccountId,
-                  defaultAccount : defaultAccount,
-                  activeGlDescription : glAccount?.accountName]
+    return [invoiceItemTypeId: invoiceItemType.invoiceItemTypeId,
+            description: invoiceItemType.description,
+            defaultGlAccountId: invoiceItemType.defaultGlAccountId,
+            overrideGlAccountId: overrideGlAccountId,
+            defaultAccount: defaultAccount,
+            activeGlDescriptio: glAccount?.accountName]

Review Comment:
   Nice Catch, Thanks :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to