Author: apatel
Date: Wed Aug 19 11:14:26 2009 New Revision: 805748 URL: http://svn.apache.org/viewvc?rev=805748&view=rev Log: Improved process to create payment deposit batch. Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml ofbiz/trunk/applications/accounting/servicedef/secas.xml ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl ofbiz/trunk/applications/accounting/widget/ar/ArMenus.xml ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml ofbiz/trunk/applications/accounting/widget/ar/forms/ArPaymentForms.xml Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=805748&r1=805747&r2=805748&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original) +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Wed Aug 19 11:14:26 2009 @@ -12306,6 +12306,10 @@ <value xml:lang="th">à¸à¸±à¸à¸¥à¸à¸à¸ªà¸±à¸à¸à¸²</value> <value xml:lang="zh">å¤å¶åå</value> </property> + <property key="PageTitleDepositPaymentsAndCreateBatch"> + <value xml:lang="en">Deposit Payments And Create Batch</value> + <value xml:lang="hi_IN">à¤à¥à¤à¤¤à¤¾à¤¨ à¤à¤®à¤¾ à¤à¤°à¥à¤ तथा बà¥à¤ बनाà¤à¤</value> + </property> <property key="PageTitleEditAgreement"> <value xml:lang="de">Vereinbarung ändern</value> <value xml:lang="en">Edit Agreement</value> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml?rev=805748&r1=805747&r2=805748&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml Wed Aug 19 11:14:26 2009 @@ -424,6 +424,10 @@ <call-service service-name="updatePayment" in-map-name="updatePaymentCtx"/> <clear-field field="updatePaymentCtx"/> </iterate> + <set-service-fields service-name="checkAndCreateBatchForValidPayments" map="parameters" to-map="checkAndCreateBatchForValidPaymentsMap"/> + <call-service service-name="checkAndCreateBatchForValidPayments" in-map-name="checkAndCreateBatchForValidPaymentsMap"> + <result-to-result result-name="paymentGroupId"/> + </call-service> <else> <iterate list="payments" entry="payment"> <set field="isReceipt" value="${groovy:org.ofbiz.accounting.util.UtilAccounting.isReceipt(payment)}" type="Boolean"/> Modified: ofbiz/trunk/applications/accounting/servicedef/secas.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/secas.xml?rev=805748&r1=805747&r2=805748&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/secas.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/secas.xml Wed Aug 19 11:14:26 2009 @@ -168,8 +168,4 @@ <action service="checkInvoicePaymentApplications" mode="sync"/> <action service="capturePaymentsByInvoice" mode="sync"/> </eca> - <eca service="depositWithdrawPayments" event="commit"> - <condition field-name="groupInOneTransaction" operator="equals" value="Y"/> - <action service="checkAndCreateBatchForValidPayments" mode="sync"/> - </eca> </service-eca> Modified: ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml?rev=805748&r1=805747&r2=805748&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml Wed Aug 19 11:14:26 2009 @@ -469,6 +469,7 @@ <attribute name="paymentGroupTypeId" type="String" mode="IN" optional="true"/> <attribute name="paymentGroupName" type="String" mode="IN" optional="true"/> <attribute name="finAccountTransId" type="String" mode="OUT" optional="true"/> + <attribute name="paymentGroupId" type="String" mode="OUT" optional="true"/> </service> <service name="expirePaymentAssociationsOnFinAccountTransCancel" engine="simple" location="component://accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml" invoke="expirePaymentAssociationsOnFinAccountTransCancel"> <description>expire payment associations with paymentGroup on finAccountTrans cancel</description> Modified: ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy?rev=805748&r1=805747&r2=805748&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy Wed Aug 19 11:14:26 2009 @@ -24,6 +24,12 @@ import org.ofbiz.entity.condition.EntityOperator; if ("Y".equals(parameters.noConditionFind)) { List paymentCond = []; + payments = []; + finAccountId = parameters.finAccountId; + context.finAccountId = parameters.finAccountId; + paymentStatusCond = EntityCondition.makeCondition([EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_RECEIVED"), + EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_SENT")], EntityOperator.OR); + paymentCond.add(paymentStatusCond); if (paymentMethodTypeId) { paymentCond.add(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, paymentMethodTypeId)); } @@ -41,11 +47,12 @@ if (finAccountTransList) { finAccountTransIds = EntityUtil.getFieldListFromEntityList(finAccountTransList, "finAccountTransId", true); paymentCond.add(EntityCondition.makeCondition("finAccountTransId", EntityOperator.IN, finAccountTransIds)); + payments = delegator.findList("Payment", EntityCondition.makeCondition(paymentCond, EntityOperator.AND), null, null, null, false); } } else { - paymentCond.add(EntityCondition.makeCondition("finAccountTransId", EntityOperator.NOT_EQUAL, null)); + paymentCond.add(EntityCondition.makeCondition("finAccountTransId", EntityOperator.EQUALS, null)); + payments = delegator.findList("Payment", EntityCondition.makeCondition(paymentCond, EntityOperator.AND), null, null, null, false); } - payments = delegator.findList("Payment", EntityCondition.makeCondition(paymentCond, EntityOperator.AND), null, null, null, false); paymentListWithCreditCard = []; paymentListWithoutCreditCard = []; if (payments) { 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=805748&r1=805747&r2=805748&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml Wed Aug 19 11:14:26 2009 @@ -43,7 +43,7 @@ </request-map> <request-map uri="createPaymentBatch"> <security https="true" auth="true"/> - <event type="service" invoke="checkAndCreateBatchForValidPayments"/> + <event type="service" invoke="depositWithdrawPayments"/> <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=805748&r1=805747&r2=805748&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl Wed Aug 19 11:14:26 2009 @@ -72,11 +72,12 @@ <form id="paymentBatchForm" name="paymentBatchForm" method="post" action="<@ofbizUrl>createPaymentBatch</@ofbizUrl>"> <#if paymentList?has_content> <div> - <span class="label">${uiLabelMap.AccountingPayment} ${uiLabelMap.PartyPartyGroupName}</span> - <input type="text" size='25' id="paymentGroupName" name='paymentGroupName'> <input type="hidden" name='organizationPartyId' value="${organizationPartyId?if_exists}"> <input type="hidden" name='paymentGroupTypeId' value="BATCH_PAYMENT"> - <input type="hidden" name='finAccountId' value="${finAccountId?if_exists}"> + <input type="hidden" name="groupInOneTransaction" value="Y"/> + <#if finAccountId?has_content> + <input type="hidden" name='finAccountId' value="${finAccountId?if_exists}"> + </#if> <input type="hidden" name='paymentMethodTypeId' value="${paymentMethodTypeId?if_exists}"> <input type="hidden" name='cardType' value="${cardType?if_exists}"> <input type="hidden" name='partyIdFrom' value="${partyIdFrom?if_exists}"> @@ -117,6 +118,16 @@ </tr> </#list> <div align="right"> + <span class="label">${uiLabelMap.AccountingPaymentGroupName}</span> + <input type="text" size='25' id="paymentGroupName" name='paymentGroupName'> + <#if finAccounts?has_content> + <span class="label">${uiLabelMap.AccountingBankAccount}</span> + <select name="finAccountId"> + <#list finAccounts as finAccount> + <option value="${finAccount.get("finAccountId")}">${finAccount.get("finAccountName")} [${finAccount.get("finAccountId")}]</option> + </#list> + </select> + </#if> <input id="submitButton" type="submit" value="${uiLabelMap.AccountingCreateBatch}"/> <div> </table> Modified: ofbiz/trunk/applications/accounting/widget/ar/ArMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ar/ArMenus.xml?rev=805748&r1=805747&r2=805748&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/ar/ArMenus.xml (original) +++ ofbiz/trunk/applications/accounting/widget/ar/ArMenus.xml Wed Aug 19 11:14:26 2009 @@ -30,8 +30,8 @@ <menu-item name="findPayments" title="${uiLabelMap.PageTitleFindPayment}"> <link target="findPayments"/> </menu-item> - <menu-item name="batchPayments" title="Batch Payments"> + <menu-item name="batchPayments" title="${uiLabelMap.PageTitleBatchPayments}"> <link target="batchPayments"/> </menu-item> </menu> -</menus> \ No newline at end of file +</menus> Modified: ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml?rev=805748&r1=805747&r2=805748&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml Wed Aug 19 11:14:26 2009 @@ -55,17 +55,19 @@ <screen name="BatchPayments"> <section> <actions> - <set field="titleProperty" value="PageTitleBatchPayments"/> + <set field="titleProperty" value="PageTitleDepositPaymentsAndCreateBatch"/> <set field="headerItem" value="payments"/> <set field="tabButtonItem" value="batchPayments"/> <set field="paymentMethodTypeId" from-field="parameters.paymentMethodTypeId"/> - <set field="finAccountId" from-field="parameters.finAccountId"/> <set field="cardType" from-field="parameters.cardType"/> <set field="fromDate" type="Timestamp" from-field="parameters.fromDate"/> <set field="thruDate" type="Timestamp" from-field="parameters.thruDate"/> <set field="partyIdFrom" from-field="parameters.partyIdFrom"/> <set field="organizationPartyId" from-field="parameters.organizationPartyId"/> <script location="component://accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy"/> + <entity-and entity-name="FinAccount" list="finAccounts"> + <field-map field-name="finAccountTypeId" value="BANK_ACCOUNT"/> + </entity-and> </actions> <widgets> <decorator-screen name="CommonArPaymentDecorator" location="component://accounting/widget/ar/CommonScreens.xml"> Modified: ofbiz/trunk/applications/accounting/widget/ar/forms/ArPaymentForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ar/forms/ArPaymentForms.xml?rev=805748&r1=805747&r2=805748&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/ar/forms/ArPaymentForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/ar/forms/ArPaymentForms.xml Wed Aug 19 11:14:26 2009 @@ -26,13 +26,6 @@ <set field="organizationPartyId" from-field="organizationPartyId" default-value="${defaultOrganizationPartyId}"/> <set field="noConditionFind" value="Y"/> </actions> - <field name="finAccountId"> - <drop-down allow-empty="true"> - <entity-options entity-name="FinAccount" description="${finAccountName} [${finAccountId}]" filter-by-date="true"> - <entity-constraint name="finAccountTypeId" value="BANK_ACCOUNT"/> - </entity-options> - </drop-down> - </field> <field name="paymentMethodTypeId" title="${uiLabelMap.FormFieldTitle_paymentMethodTypeId}"> <drop-down allow-empty="true"> <entity-options entity-name="PaymentMethodType" description="${description}"> @@ -58,7 +51,7 @@ <field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> <form name="FindBatchPaymentsForDepositSlip" target="NewDepositSlip" extends="FindBatchPayments" extends-resource="component://accounting/widget/ar/forms/ArPaymentForms.xml"> - <field name="finAccountId"><display description="${finAccountId}"/></field> + <field name="finAccountId"><hidden value="${finAccountId}"/></field> </form> <form name="FindArPayments" type="single" target="findPayments" extends="FindPayments" extends-resource="component://accounting/webapp/accounting/payment/PaymentForms.xml"> <field name="parentTypeId"><hidden value="RECEIPT"/></field> |
Free forum by Nabble | Edit this page |