Author: ashish
Date: Thu Dec  3 12:05:05 2009
New Revision: 886748

URL: http://svn.apache.org/viewvc?rev=886748&view=rev
Log:
Applied patch from jira issue: OFBIZ-3291 - On PaymentGroup screens records are 
getting repeated and are not filtered on basis of PaymentGroupTypeId.

Thanks Surya & Sumit for the contribution.

Modified:
    ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml
    ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml
    ofbiz/trunk/applications/accounting/widget/PaymentGroupForms.xml
    ofbiz/trunk/applications/accounting/widget/PaymentGroupScreens.xml
    ofbiz/trunk/applications/accounting/widget/ap/ApScreens.xml
    ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml

Modified: ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml?rev=886748&r1=886747&r2=886748&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml Thu Dec  3 
12:05:05 2009
@@ -255,7 +255,7 @@
         <field name="finAccountId"><hidden/></field>
         <field name="paymentGroupTypeId"><hidden 
value="BATCH_PAYMENT"/></field>
     </form>
-    <form name="ListDepositSlips" type="list" target="FindDepositSlips" 
extends="ListPaymentGroup" 
extends-resource="component://accounting/widget/PaymentGroupForms.xml"
+    <form name="ListDepositSlips" type="list" target="FindDepositSlips" 
extends="ListPaymentGroup" 
extends-resource="component://accounting/widget/PaymentGroupForms.xml" 
list-name="paymentGroupList"
             odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar" header-row-style="header-row-2">
         <field name="paymentGroupId" widget-style="buttontext">
             <hyperlink description="${paymentGroupId}" 
target="EditDepositSlipAndMembers">
@@ -263,7 +263,7 @@
                 <parameter param-name="finAccountId"/>
             </hyperlink>
         </field>
-        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" 
widget-style="buttontext" use-when="${paymentGroup.paymentGroupTypeId == 
'BATCH_PAYMENT'} @and 
${groovy:org.ofbiz.base.util.UtilValidate.isNotEmpty(paymentGroupMembers)}">
+        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" 
widget-style="buttontext" use-when="${paymentGroupTypeId == 'BATCH_PAYMENT'} 
@and 
${groovy:org.ofbiz.base.util.UtilValidate.isNotEmpty(paymentGroupMembers)}">
             <hyperlink target="deleteDepositSlip" 
description="${uiLabelMap.CommonCancel}" also-hidden="false">
                 <parameter param-name="paymentGroupId"/>
                 <parameter param-name="finAccountId"/>

Modified: ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml?rev=886748&r1=886747&r2=886748&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/FinAccountScreens.xml Thu Dec  3 
12:05:05 2009
@@ -305,6 +305,19 @@
                 <set field="tabButtonItem" value="findDepositSlips"/>
                 <set field="finAccountId" 
from-field="parameters.finAccountId"/>
                 <entity-one entity-name="FinAccount" value-field="finAccount"/>
+                <entity-condition 
entity-name="PmtGrpMembrPaymentAndFinAcctTrans" 
list="pmtGrpMembrPaymentAndFinAcctTransList">
+                    <condition-list combine="and">
+                        <condition-expr field-name="paymentGroupId" 
from-field="parameters.paymentGroupId" ignore-if-empty="true"/>
+                        <condition-expr field-name="finAccountId" 
from-field="parameters.finAccountId"/>
+                    </condition-list>
+                </entity-condition>
+                <set field="paymentGroupIds" 
value="${groovy:org.ofbiz.entity.util.EntityUtil.getFieldListFromEntityList(pmtGrpMembrPaymentAndFinAcctTransList,
 'paymentGroupId', true);}" type="List"/>
+                <entity-condition entity-name="PaymentGroup" 
list="paymentGroupList">
+                    <condition-list combine="and">
+                        <condition-expr field-name="paymentGroupId" 
operator="in" from-field="paymentGroupIds" ignore-if-empty="true"/>
+                        <condition-expr field-name="paymentGroupTypeId" 
value="BATCH_PAYMENT"/>
+                    </condition-list>
+                </entity-condition>
             </actions>
             <widgets>
                 <decorator-screen name="CommonFinAccountDecorator" 
location="${parameters.finAccountDecoratorLocation}">

Modified: ofbiz/trunk/applications/accounting/widget/PaymentGroupForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/PaymentGroupForms.xml?rev=886748&r1=886747&r2=886748&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/PaymentGroupForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/PaymentGroupForms.xml Thu Dec  3 
12:05:05 2009
@@ -29,22 +29,9 @@
         <field name="searchButton" widget-style="smallSubmit"><submit 
button-type="button"/></field>
     </form>
 
-    <form name="ListPaymentGroup" type="list" separate-columns="true" 
default-entity-name="PaymentGroup" list-name="listIt" 
+    <form name="ListPaymentGroup" type="list" separate-columns="true" 
default-entity-name="PaymentGroup" list-name="paymentGroupList" 
         paginate-target="FindPaymentGroup" paginate="true" 
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-        <actions>
-            <service service-name="performFind" result-map="result" 
result-map-list="listIt">
-                <field-map field-name="inputFields" from-field="parameters"/>
-                <field-map field-name="entityName" 
value="PmtGrpMembrPaymentAndFinAcctTrans"/>
-                <field-map field-name="viewIndex" from-field="viewIndex"/>
-                <field-map field-name="viewSize" from-field="viewSize"/>
-                <field-map field-name="orderBy" value="effectiveDate DESC"/>
-            </service>
-        </actions>
         <row-actions>
-            <entity-one entity-name="PaymentGroup" value-field="paymentGroup">
-                <field-map field-name="paymentGroupId"/>
-            </entity-one>
-            <set field="paymentGroupTypeId" 
from-field="paymentGroup.paymentGroupTypeId"/>
             <entity-and entity-name="PaymentGroupMember" 
list="paymentGroupMembers" filter-by-date="true">
                 <field-map field-name="paymentGroupId"/>
             </entity-and>
@@ -55,7 +42,7 @@
             </hyperlink>
         </field>
         <field name="paymentGroupTypeId" 
title="${uiLabelMap.FormFieldTitle_paymentGroupType}"><display-entity 
entity-name="PaymentGroupType"/></field>
-        <field name="paymentGroupName"><display 
description="${paymentGroup.paymentGroupName}"/></field>
+        <field name="paymentGroupName"><display 
description="${paymentGroupName}"/></field>
         <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" 
widget-style="buttontext" use-when="${paymentGroupTypeId == 'BATCH_PAYMENT'} 
@and 
${groovy:org.ofbiz.base.util.UtilValidate.isNotEmpty(paymentGroupMembers)}">
             <hyperlink target="cancelPaymentGroup" 
description="${uiLabelMap.CommonCancel}" also-hidden="false">
                 <parameter param-name="paymentGroupId"/>
@@ -74,6 +61,9 @@
     </form>
     
     <form name="EditPaymentGroup" type="single" target="updatePaymentGroup" 
title="" default-map-name="paymentGroup">
+        <actions>
+            <set field="finAccountId" from-field="parameters.finAccountId" 
default-value=""/>
+        </actions>
         <alt-target use-when="paymentGroup==null" target="createPaymentGroup"/>
         <auto-fields-service service-name="updatePaymentGroup"/>
         <field use-when="paymentGroup!=null" name="paymentGroupId" 
tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
@@ -90,8 +80,8 @@
                 </entity-options>
             </drop-down>
         </field>
-        <field use-when="finAccount!=null" name="finAccountName" 
title="${uiLabelMap.FormFieldTitle_finAccountName}"><display 
description="${finAccount.finAccountName}" type="text"></display></field>
-        <field use-when="finAccount!=null" name="ownerPartyId" 
title="${uiLabelMap.FormFieldTitle_ownerPartyId}"><display 
description="${finAccount.ownerPartyId}" type="text"></display></field>
+        <field use-when="finAccountId!=null" name="finAccountName" 
title="${uiLabelMap.FormFieldTitle_finAccountName}"><display 
description="${finAccount.finAccountName}" type="text"></display></field>
+        <field use-when="finAccountId!=null" name="ownerPartyId" 
title="${uiLabelMap.FormFieldTitle_ownerPartyId}"><display 
description="${finAccount.ownerPartyId}" type="text"></display></field>
         <field name="paymentGroupName" 
use-when="display==true"><display/></field>
         <field name="submitButton" use-when="paymentGroup==null" 
title="${uiLabelMap.CommonCreate}"><submit button-type="button"/></field>
         <field name="submitButton" use-when="paymentGroup!=null" 
title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>

Modified: ofbiz/trunk/applications/accounting/widget/PaymentGroupScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/PaymentGroupScreens.xml?rev=886748&r1=886747&r2=886748&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/PaymentGroupScreens.xml 
(original)
+++ ofbiz/trunk/applications/accounting/widget/PaymentGroupScreens.xml Thu Dec  
3 12:05:05 2009
@@ -27,6 +27,9 @@
                 <set field="titleProperty" value="AccountingFindPaymentGroup"/>
                 <set field="headerItem" value="PaymentGroup"/>
                 <set field="tabButtonItem" value="Find"/>
+                <entity-condition entity-name="PaymentGroup" 
list="paymentGroupList">
+                    <condition-expr field-name="paymentGroupId" 
from-field="parameters.paymentGroupId" ignore-if-empty="true"/>
+                </entity-condition>
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" 
location="${parameters.mainDecoratorLocation}">

Modified: ofbiz/trunk/applications/accounting/widget/ap/ApScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ap/ApScreens.xml?rev=886748&r1=886747&r2=886748&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ap/ApScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ap/ApScreens.xml Thu Dec  3 
12:05:05 2009
@@ -76,6 +76,12 @@
             <actions>
                 <set field="titleProperty" 
value="AccountingFindApPaymentGroups"/>
                 <set field="headerItem" value="apPaymentGroups"/>
+                <entity-condition entity-name="PaymentGroup" 
list="paymentGroupList">
+                    <condition-list combine="and">
+                        <condition-expr field-name="paymentGroupId" 
from-field="parameters.paymentGroupId" ignore-if-empty="true"/>
+                        <condition-expr field-name="paymentGroupTypeId" 
value="CHECK_RUN"/>
+                    </condition-list>
+                </entity-condition>
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" 
location="${parameters.mainDecoratorLocation}">

Modified: ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml?rev=886748&r1=886747&r2=886748&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml 
(original)
+++ ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml Thu Dec  
3 12:05:05 2009
@@ -116,6 +116,12 @@
             <actions>
                 <set field="titleProperty" 
value="AccountingFindArPaymentGroups"/>
                 <set field="headerItem" value="paymentGroups"/>
+                <entity-condition entity-name="PaymentGroup" 
list="paymentGroupList">
+                    <condition-list combine="and">
+                        <condition-expr field-name="paymentGroupId" 
from-field="parameters.paymentGroupId" ignore-if-empty="true"/>
+                        <condition-expr field-name="paymentGroupTypeId" 
value="BATCH_PAYMENT"/>
+                    </condition-list>
+                </entity-condition>
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" 
location="${parameters.mainDecoratorLocation}">


Reply via email to