Author: ashish
Date: Fri Jul 10 13:48:34 2009 New Revision: 792953 URL: http://svn.apache.org/viewvc?rev=792953&view=rev Log: Applied patch from jira issue OFBIZ-2699 - Create Payment Batches for Ar Payment. Now createPaymentGroupAndMember is available to create Payment Group & Member records. So used the same. Thanks Rishi for your contribution on this. Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml ofbiz/trunk/applications/accounting/servicedef/services_payment.xml ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl 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=792953&r1=792952&r2=792953&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 Fri Jul 10 13:48:34 2009 @@ -428,22 +428,6 @@ </iterate> </simple-method> - <simple-method method-name="createPaymentBatch" short-description="create a batch of payments"> - <now-timestamp field="nowTimestamp"/> - <set field="createPaymentGroupCtx.paymentGroupName" from-field="parameters.paymentGroupName"/> - <set field="createPaymentGroupCtx.paymentGroupTypeId" value="BATCH_PAYMENT"/> - <call-service service-name="createPaymentGroup" in-map-name="createPaymentGroupCtx"> - <result-to-field result-name="paymentGroupId"/> - </call-service> - <set field="paymentIds" from-field="parameters.paymentIds"/> - <iterate list="paymentIds" entry="paymentId"> - <set field="createPaymentGroupMemberCtx.paymentId" from-field="paymentId"/> - <set field="createPaymentGroupMemberCtx.paymentGroupId" from-field="paymentGroupId"/> - <set field="createPaymentGroupMemberCtx.fromDate" from-field="nowTimestamp"/> - <call-service service-name="createPaymentGroupMember" in-map-name="createPaymentGroupMemberCtx"/> - </iterate> - <field-to-result field="paymentGroupId"/> - </simple-method> <simple-method method-name="getPaymentRunningTotal" short-description="calculate running total for payments"> <set field="paymentIds" from-field="parameters.paymentIds"/> <set field="paymentRunningTotal" type="BigDecimal" value="0"/> @@ -471,7 +455,6 @@ </simple-method> <simple-method method-name="createPaymentAndPaymentGroupForInvoices" short-description="Creates Payments, PaymentApplications and PaymentGroup for the same"> - <now-timestamp field="nowTimestamp"/> <set field="invoices" type="List"/> <iterate list="parameters.invoiceIds" entry="invoiceId"> <entity-one entity-name="Invoice" value-field="invoice" auto-field-map="true"/> @@ -496,7 +479,6 @@ <if-not-empty field="paymentIds"> <set field="createPaymentGroupAndMemberMap.paymentIds" from-field="paymentIds"/> <set field="createPaymentGroupAndMemberMap.paymentGroupTypeId" value="CHECK_RUN"/> - <set field="createPaymentGroupAndMemberMap.fromDate" from-field="nowTimestamp"/> <set field="createPaymentGroupAndMemberMap.paymentGroupName" value="Check Run for ${nowTimestamp}"/> <call-service service-name="createPaymentGroupAndMember" in-map-name="createPaymentGroupAndMemberMap"> <result-to-field result-name="paymentGroupId"/> @@ -562,6 +544,9 @@ </simple-method> <simple-method method-name="createPaymentGroupAndMember" short-description="creates PaymentGroup and PaymentGroupMembers"> + <if-empty field="parameters.fromDate"> + <now-timestamp field="parameters.fromDate"/> + </if-empty> <set-service-fields service-name="createPaymentGroup" map="parameters" to-map="createPaymentGroupMap"/> <call-service service-name="createPaymentGroup" in-map-name="createPaymentGroupMap"> <result-to-field result-name="paymentGroupId"/> Modified: ofbiz/trunk/applications/accounting/servicedef/services_payment.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_payment.xml?rev=792953&r1=792952&r2=792953&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_payment.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_payment.xml Fri Jul 10 13:48:34 2009 @@ -148,13 +148,6 @@ INVOICE_READY if status is INVOICE_PAID, and reverses related AcctgTrans by calling copyAcctgTransAndEntries service</description> <attribute name="paymentId" mode="IN" optional="false" type="String"/> </service> - <service name="createPaymentBatch" engine="simple" - location="component://accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml" invoke="createPaymentBatch" auth="true"> - <description>create batch for payments</description> - <attribute name="paymentIds" type="List" mode="IN" optional="false"/> - <attribute name="paymentGroupName" type="String" mode="IN" optional="false"/> - <attribute name="paymentGroupId" type="String" mode="OUT" optional="false"/> - </service> <service name="getPaymentRunningTotal" engine="simple" location="component://accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml" invoke="getPaymentRunningTotal" auth="true"> <description>calculate running total for payments</description> Modified: ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml?rev=792953&r1=792952&r2=792953&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml Fri Jul 10 13:48:34 2009 @@ -47,7 +47,7 @@ </request-map> <request-map uri="createPaymentBatch"> <security https="true" auth="true"/> - <event type="service" invoke="createPaymentBatch"/> + <event type="service" invoke="createPaymentGroupAndMember"/> <response name="success" type="view" value="PaymentGroupOverview"/> <response name="error" type="view" value="BatchPayments"/> </request-map> Modified: ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl?rev=792953&r1=792952&r2=792953&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl Fri Jul 10 13:48:34 2009 @@ -66,6 +66,7 @@ <span class="label">${uiLabelMap.AccountingPayment} ${uiLabelMap.PartyPartyGroupName}</span> <input type="text" size='25' name='paymentGroupName'> <input type="hidden" name='organizationPartyId' value="${organizationPartyId?if_exists}"> + <input type="hidden" name='paymentGroupTypeId' value="BATCH_PAYMENT"> </div> <div> <span class="label">${uiLabelMap.AccountingRunningTotal} :</span> |
Free forum by Nabble | Edit this page |