Author: apatel
Date: Mon Nov 9 08:42:46 2009 New Revision: 833995 URL: http://svn.apache.org/viewvc?rev=833995&view=rev Log: Extend InvoiceAndType view, added StatusItem relation and InvoiceType desc alias. Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml?rev=833995&r1=833994&r2=833995&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml Mon Nov 9 08:42:46 2009 @@ -1542,16 +1542,17 @@ <member-entity entity-alias="INV" entity-name="Invoice"/> <member-entity entity-alias="IVT" entity-name="InvoiceType"/> <alias-all entity-alias="INV"/> - <alias-all entity-alias="IVT"> - <exclude field="invoiceTypeId"/> - <exclude field="description"/> - </alias-all> + <alias name="parentTypeId" entity-alias="IVT"></alias> + <alias name="invoiceTypeDesc" entity-alias="IVT" field="description"></alias> <view-link entity-alias="INV" rel-entity-alias="IVT"> <key-map field-name="invoiceTypeId"/> </view-link> <relation type="many" rel-entity-name="InvoiceItem"> <key-map field-name="invoiceId"/> </relation> + <relation type="one" fk-name="INVOICE_STTSITM" rel-entity-name="StatusItem"> + <key-map field-name="statusId"/> + </relation> <relation type="many" rel-entity-name="PaymentApplication"> <key-map field-name="invoiceId"/> </relation> Modified: ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl?rev=833995&r1=833994&r2=833995&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl (original) +++ ofbiz/trunk/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl Mon Nov 9 08:42:46 2009 @@ -154,11 +154,9 @@ <#assign invoicePaymentInfoList = dispatcher.runSync("getInvoicePaymentInfoList", Static["org.ofbiz.base.util.UtilMisc"].toMap("invoiceId", invoice.invoiceId, "userLogin", userLogin))/> <#assign invoicePaymentInfo = invoicePaymentInfoList.get("invoicePaymentInfoList").get(0)?if_exists> <#assign statusItem = invoice.getRelatedOneCache("StatusItem")> - <#assign invoiceType = invoice.getRelatedOne("InvoiceType") /> - <#assign statusItem = invoice.getRelatedOne("StatusItem") /> <tr valign="middle"<#if alt_row> class="alternate-row"</#if>> <td><a class="buttontext" href="<@ofbizUrl>invoiceOverview?invoiceId=${invoice.invoiceId}</@ofbizUrl>">${invoice.get("invoiceId")}</a></td> - <td>${invoiceType.description?default(invoice.invoiceTypeId)}</td> + <td>${invoice.invoiceTypeDesc?default(invoice.invoiceTypeId)}</td> <td><#if invoice.get("invoiceDate")?has_content>${invoice.get("invoiceDate")?date}</td></#if> <td><#if invoice.get("dueDate")?has_content>${invoice.get("dueDate")?date}</td></#if> <td>${statusItem.description?default(invoice.statusId)}</td> |
Free forum by Nabble | Edit this page |