Author: apatel
Date: Tue Nov 3 07:23:03 2009 New Revision: 832319 URL: http://svn.apache.org/viewvc?rev=832319&view=rev Log: Fixed up batchPayments to use PaymentAndTypePartyNameView. Added necessary relationship attributes to view entity. Minor looks updates as well for consistency. Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml?rev=832319&r1=832318&r2=832319&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml Tue Nov 3 07:23:03 2009 @@ -2764,6 +2764,12 @@ <view-link entity-alias="PY" rel-entity-alias="SI"> <key-map field-name="statusId"/> </view-link> + <relation type="one" fk-name="PAYMENT_PMTYP" rel-entity-name="PaymentType"> + <key-map field-name="paymentTypeId"/> + </relation> + <relation type="one" fk-name="PAYMENT_PMETH_TP" rel-entity-name="PaymentMethodType"> + <key-map field-name="paymentMethodTypeId"/> + </relation> </view-entity> <view-entity entity-name="PaymentAndType" package-name="org.ofbiz.accounting.payment" 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=832319&r1=832318&r2=832319&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 Tue Nov 3 07:23:03 2009 @@ -47,11 +47,11 @@ 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); + payments = delegator.findList("PaymentAndTypePartyNameView", EntityCondition.makeCondition(paymentCond, EntityOperator.AND), null, null, null, false); } } else { paymentCond.add(EntityCondition.makeCondition("finAccountTransId", EntityOperator.EQUALS, null)); - payments = delegator.findList("Payment", EntityCondition.makeCondition(paymentCond, EntityOperator.AND), null, null, null, false); + payments = delegator.findList("PaymentAndTypePartyNameView", EntityCondition.makeCondition(paymentCond, EntityOperator.AND), null, null, null, false); } paymentListWithCreditCard = []; paymentListWithoutCreditCard = []; 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=832319&r1=832318&r2=832319&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/ar/payment/batchPayments.ftl Tue Nov 3 07:23:03 2009 @@ -107,7 +107,7 @@ <input type="hidden" name='thruDate' value="${thruDate?if_exists}"> </div> <table class="basic-table"> - <tr class="header-row"> + <tr class="header-row-2"> <td>${uiLabelMap.FormFieldTitle_paymentId}</td> <td>${uiLabelMap.Party}</td> <td>${uiLabelMap.CommonAmount}</td> @@ -117,16 +117,12 @@ <input type="checkbox" id="checkAllPayments" name="checkAllPayments" onchange="javascript:togglePaymentId(this);"/> </td> </tr> + <#assign alt_row = false> <#list paymentList as payment> - <tr> + <tr <#if alt_row> class="alternate-row"</#if>> <td><a href="<@ofbizUrl>paymentOverview?paymentId=${payment.paymentId}</@ofbizUrl>">${payment.paymentId}</a></td> <td> - <#assign partyName = (delegator.findOne("PartyNameView", {"partyId" : payment.partyIdFrom}, false))!> - <#if partyName.partyTypeId == "PERSON"> - <a href="/partymgr/control/viewprofile?partyId=${payment.partyIdFrom}">${(partyName.firstName)!} ${(partyName.lastName)!}[${(payment.partyIdFrom)!}]</a> - <#elseif (partyName.partyTypeId)! == "PARTY_GROUP"> - <a href="/partymgr/control/viewprofile?partyId=${payment.partyIdFrom}">${(partyName.groupName)!}[${(payment.partyIdFrom)!}]</a> - </#if> + <a href="/partymgr/control/viewprofile?partyId=${payment.partyIdFrom}">${(payment.partyFromFirstName)!} ${(payment.partyFromLastName)!} ${(payment.partyFromGroupName)!}[${(payment.partyIdFrom)!}]</a> </td> <td><@ofbizCurrency amount=payment.amount isoCode=payment.currencyUomId/></td> <td>${payment.effectiveDate?if_exists}</td> @@ -134,6 +130,7 @@ <input type="checkbox" id="paymentId_${payment_index}" name="paymentIds" value="${payment.paymentId}" onclick="javascript:getPaymentRunningTotal('paymentId_${payment_index}');"/> </td> </tr> + <#assign alt_row = !alt_row> </#list> <div id="createPaymentBatch" style="display: none;" align="right"> <span class="label">${uiLabelMap.AccountingPaymentGroupName}</span> |
Free forum by Nabble | Edit this page |