Author: ashish
Date: Sun Jul 12 12:04:06 2009 New Revision: 793339 URL: http://svn.apache.org/viewvc?rev=793339&view=rev Log: Applied patch from jira issue OFBIZ-2706 - Create a screen under AP -> Invoice, which will search for a PURCHASE_INVOICE between dates. Implemented: 1) Generated Checks for payment group as per the payments. 2) The "Checks To Print" link will only be visible for PaymentGroups of type "CHECK_RUN". Thanks Arpit, Rishi & Sumit for the contribution. Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/controller.xml ofbiz/trunk/applications/accounting/widget/Menus.xml ofbiz/trunk/applications/accounting/widget/ap/CommonScreens.xml ofbiz/trunk/applications/accounting/widget/ap/Menus.xml Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=793339&r1=793338&r2=793339&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original) +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Sun Jul 12 12:04:06 2009 @@ -5992,6 +5992,9 @@ <property key="AccountingPaymentGroupOverview"> <value xml:lang="en">Payment Group Overview</value> </property> + <property key="AccountingPaymentGroupOverviewFor"> + <value xml:lang="en">Payment Group Overview For</value> + </property> <property key="AccountingPaymentHeader"> <value xml:lang="ar">رأسÙØ© اÙتسدÙد</value> <value xml:lang="en">Payment Header</value> Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy?rev=793339&r1=793338&r2=793339&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/PrintChecks.groovy Sun Jul 12 12:04:06 2009 @@ -21,6 +21,9 @@ import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilNumber; +import org.ofbiz.entity.condition.EntityCondition; +import org.ofbiz.entity.condition.EntityOperator; +import org.ofbiz.entity.util.EntityUtil; // rounding mode decimals = UtilNumber.getBigDecimalScale("invoice.decimals"); @@ -56,5 +59,9 @@ payments.add(payment); } } -context.payments = payments; - +paymentGroupMembers = EntityUtil.filterByDate(delegator.findList("PaymentGroupMember", EntityCondition.makeCondition("paymentGroupId", EntityOperator.EQUALS, parameters.paymentGroupId), null, null, null, false)); +//in the case of a multiple payments, paymentId List is supplied. +paymentGroupMembers.each { paymentGropupMember-> + payments.add(paymentGropupMember.getRelatedOne("Payment")); +} +context.payments = payments; \ No newline at end of file Modified: ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/controller.xml?rev=793339&r1=793338&r2=793339&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/controller.xml Sun Jul 12 12:04:06 2009 @@ -51,7 +51,7 @@ <request-map uri="processMassCheckRun"> <security https="true" auth="true"/> <event type="service" invoke="createPaymentAndPaymentGroupForInvoices"/> - <response name="success" type="request" value="FindPurchaseInvoices"/> + <response name="success" type="request" value="PaymentGroupOverview"/> <response name="error" type="view" value="FindPurchaseInvoices"/> </request-map> Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=793339&r1=793338&r2=793339&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/Menus.xml (original) +++ ofbiz/trunk/applications/accounting/widget/Menus.xml Sun Jul 12 12:04:06 2009 @@ -502,6 +502,17 @@ <parameter param-name="paymentGroupId" from-field="paymentGroup.paymentGroupId"/> </link> </menu-item> + <menu-item name="printCheck" title="${uiLabelMap.AccountingPrintChecks}"> + <condition> + <and> + <if-compare field="display" operator="equals" value="true"/> + <if-compare field="paymentGroup.paymentGroupTypeId" operator="equals" value="CHECK_RUN"/> + </and> + </condition> + <link target="printChecks.pdf"> + <parameter param-name="paymentGroupId" from-field="paymentGroup.paymentGroupId"/> + </link> + </menu-item> <menu-item name="cancelpaymentGroup" title="${uiLabelMap.CommonCancel}"> <condition> <and> Modified: ofbiz/trunk/applications/accounting/widget/ap/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ap/CommonScreens.xml?rev=793339&r1=793338&r2=793339&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/ap/CommonScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/ap/CommonScreens.xml Sun Jul 12 12:04:06 2009 @@ -261,4 +261,47 @@ </widgets> </section> </screen> + + <screen name="CommonPaymentGroupDecorator"> + <section> + <actions> + <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"> + <decorator-section name="pre-body"> + <section> + <widgets> + <include-menu name="PaymentGroupTabBar" location="component://accounting/widget/Menus.xml"/> + </widgets> + </section> + </decorator-section> + <decorator-section name="body"> + <section> + <widgets> + <section> + <condition> + <not><if-empty field="paymentGroup"/></not> + </condition> + <widgets> + <include-menu name="PaymentGroupSubTabBar" location="component://accounting/widget/Menus.xml"/> + <container style="h1"><label>${uiLabelMap.AccountingPaymentGroupOverviewFor} ${paymenGroup.paymentGroupName} [${paymentGroupId}]</label></container> + </widgets> + <fail-widgets> + <container style="h1"><label>${uiLabelMap.AccountingNewPaymentGroup}</label></container> + </fail-widgets> + </section> + <decorator-section-include name="body"/> + </widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> \ No newline at end of file Modified: ofbiz/trunk/applications/accounting/widget/ap/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ap/Menus.xml?rev=793339&r1=793338&r2=793339&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/ap/Menus.xml (original) +++ ofbiz/trunk/applications/accounting/widget/ap/Menus.xml Sun Jul 12 12:04:06 2009 @@ -22,6 +22,7 @@ <menu-item name="agreements" title="${uiLabelMap.AccountingAgreements}"><link target="FindAgreement"/></menu-item> <menu-item name="invoices" title="${uiLabelMap.AccountingInvoicesMenu}"><link target="FindApInvoices"/></menu-item> <menu-item name="payments" title="${uiLabelMap.AccountingPaymentsMenu}"><link target="findPayments"/></menu-item> + <menu-item name="PaymentGroup" title="${uiLabelMap.AccountingPaymentGroup}"><link target="FindPaymentGroup"/></menu-item> <menu-item name="findVendors" title="${uiLabelMap.PartyVendor} ${uiLabelMap.CommonList}"><link target="findVendors"/></menu-item> <menu-item name="reports" title="${uiLabelMap.AccountingReports}"><link target="listReports"/></menu-item> </menu> |
Free forum by Nabble | Edit this page |