Author: ashish
Date: Thu Jul 9 12:24:13 2009 New Revision: 792526 URL: http://svn.apache.org/viewvc?rev=792526&view=rev Log: Applied patch from jira issue OFBIZ-2699 - Create Payment Batches for Ar Payment Following thing is covered in this patch: -- functionality to cancel payment group and expire association with payment. Thanks Awdesh & Rishi for your contribution. Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml ofbiz/trunk/applications/accounting/servicedef/services_payment.xml ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml ofbiz/trunk/applications/accounting/widget/CommonScreens.xml ofbiz/trunk/applications/accounting/widget/Menus.xml ofbiz/trunk/applications/accounting/widget/ar/CommonScreens.xml Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml?rev=792526&r1=792525&r2=792526&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml Thu Jul 9 12:24:13 2009 @@ -126,4 +126,9 @@ <set-nonpk-fields value-field="lookedUpValue" map="parameters"/> <store-value value-field="lookedUpValue"/> </simple-method> + <simple-method method-name="deletePaymentGroupMember" short-description="Delete a Payment Group Member"> + <entity-one entity-name="PaymentGroupMember" value-field="paymentGroupMember"/> + <now-timestamp field="paymentGroupMember.thruDate"/> + <store-value value-field="paymentGroupMember"/> + </simple-method> </simple-methods> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml?rev=792526&r1=792525&r2=792526&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml Thu Jul 9 12:24:13 2009 @@ -459,4 +459,14 @@ </iterate> <field-to-result field="paymentRunningTotal"/> </simple-method> + <simple-method method-name="cancelPaymentBatch" short-description="cancel payment batch"> + <set field="paymentGroupId" from-field="parameters.paymentGroupId"/> + <entity-and entity-name="PaymentGroupMember" list="paymentGroupMembers"> + <field-map field-name="paymentGroupId"/> + </entity-and> + <iterate list="paymentGroupMembers" entry="paymentGroupMember"> + <set-service-fields service-name="deletePaymentGroupMember" map="paymentGroupMember" to-map="deletePaymentGroupMemberMap"/> + <call-service service-name="deletePaymentGroupMember" in-map-name="deletePaymentGroupMemberMap"/> + </iterate> + </simple-method> </simple-methods> Modified: ofbiz/trunk/applications/accounting/servicedef/services_payment.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_payment.xml?rev=792526&r1=792525&r2=792526&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_payment.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_payment.xml Thu Jul 9 12:24:13 2009 @@ -161,4 +161,9 @@ <attribute name="paymentIds" type="List" mode="IN" optional="false"/> <attribute name="paymentRunningTotal" type="BigDecimal" mode="OUT" optional="false"/> </service> + <service name="cancelPaymentBatch" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml" invoke="cancelPaymentBatch" auth="true"> + <description>cancel payment batch</description> + <attribute name="paymentGroupId" type="String" mode="IN" optional="false"/> + </service> </services> Modified: ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml?rev=792526&r1=792525&r2=792526&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_paymentmethod.xml Thu Jul 9 12:24:13 2009 @@ -775,7 +775,8 @@ <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> </service> - <service name="deletePaymentGroupMember" default-entity-name="PaymentGroupMember" engine="entity-auto" invoke="delete" auth="true"> + <service name="deletePaymentGroupMember" default-entity-name="PaymentGroupMember" engine="simple" + location="component://accounting/script/org/ofbiz/accounting/payment/PaymentMethodServices.xml" invoke="deletePaymentGroupMember" auth="true"> <description>Delete a Payment Group Member</description> <auto-attributes include="pk" mode="IN" optional="false"/> </service> Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=792526&r1=792525&r2=792526&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Thu Jul 9 12:24:13 2009 @@ -430,6 +430,13 @@ <security https="true" auth="true"/> <response name="success" type="view" value="PaymentGroupOverview"/> </request-map> + + <request-map uri="cancelPaymentGroup"> + <security https="true" auth="true"/> + <event type="service" invoke="cancelPaymentBatch"/> + <response name="success" type="view" value="PaymentGroupOverview"/> + <response name="error" type="view" value="PaymentGroupOverview"/> + </request-map> <!-- transaction page requests --> <request-map uri="FindGatewayResponses"> Modified: ofbiz/trunk/applications/accounting/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CommonScreens.xml?rev=792526&r1=792525&r2=792526&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/CommonScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/CommonScreens.xml Thu Jul 9 12:24:13 2009 @@ -85,6 +85,9 @@ <set field="headerItem" value="PaymentGroup"/> <set field="paymentGroupId" from-field="parameters.paymentGroupId"/> <entity-one entity-name="PaymentGroup" value-field="paymentGroup"/> + <entity-and entity-name="PaymentGroupMember" list="paymentGroupMembers" filter-by-date="true"> + <field-map field-name="paymentGroupId"/> + </entity-and> </actions> <widgets> <decorator-screen name="main-decorator"> Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=792526&r1=792525&r2=792526&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/Menus.xml (original) +++ ofbiz/trunk/applications/accounting/widget/Menus.xml Thu Jul 9 12:24:13 2009 @@ -503,6 +503,17 @@ <parameter param-name="paymentGroupId" from-field="paymentGroup.paymentGroupId"/> </link> </menu-item>--> + <menu-item name="cancelpaymentGroup" title="${uiLabelMap.CommonCancel}"> + <condition> + <and> + <not><if-empty field="paymentGroupMembers"/></not> + <not><if-empty field="paymentGroup"/></not> + </and> + </condition> + <link target="cancelPaymentGroup"> + <parameter param-name="paymentGroupId" from-field="paymentGroup.paymentGroupId"/> + </link> + </menu-item> </menu> <menu name="FixedAssetMaintTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" Modified: ofbiz/trunk/applications/accounting/widget/ar/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ar/CommonScreens.xml?rev=792526&r1=792525&r2=792526&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/ar/CommonScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/ar/CommonScreens.xml Thu Jul 9 12:24:13 2009 @@ -123,6 +123,9 @@ <set field="headerItem" value="PaymentGroup"/> <set field="paymentGroupId" from-field="parameters.paymentGroupId"/> <entity-one entity-name="PaymentGroup" value-field="paymentGroup"/> + <entity-and entity-name="PaymentGroupMember" list="paymentGroupMembers" filter-by-date="true"> + <field-map field-name="paymentGroupId"/> + </entity-and> </actions> <widgets> <decorator-screen name="main-decorator"> |
Free forum by Nabble | Edit this page |