You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2013/08/09 05:08:26 UTC
svn commit: r1512132 - in /ofbiz/trunk/applications/accounting:
entitydef/entitymodel.xml
webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy
widget/InvoiceForms.xml widget/InvoiceScreens.xml
Author: hansbak
Date: Fri Aug 9 03:08:25 2013
New Revision: 1512132
URL: http://svn.apache.org/r1512132
Log:
replace groovy file with new view and add orderitemSeqId to invoiceitemlist
Removed:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy
Modified:
ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml
ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml
ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml
Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml?rev=1512132&r1=1512131&r2=1512132&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml Fri Aug 9 03:08:25 2013
@@ -1670,6 +1670,18 @@ under the License.
</view-link>
</view-entity>
+ <view-entity entity-name="InvItemAndOrdItem" package-name="org.ofbiz.accounting.invoice">
+ <member-entity entity-alias="INVITM" entity-name="InvoiceItem"/>
+ <member-entity entity-alias="ORDBIL" entity-name="OrderItemBilling"/>
+ <alias-all entity-alias="INVITM"/>
+ <alias name="orderId" entity-alias="ORDBIL"/>
+ <alias name="orderItemSeqId" entity-alias="ORDBIL"/>
+ <view-link entity-alias="INVITM" rel-entity-alias="ORDBIL" rel-optional="true">
+ <key-map field-name="invoiceId"/>
+ <key-map field-name="invoiceItemSeqId"/>
+ </view-link>
+ </view-entity>
+
<view-entity entity-name="InvoiceContentAndInfo"
package-name="org.ofbiz.accounting.invoice"
title="InvoiceContent Content and DataResource View Entity">
Modified: ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml?rev=1512132&r1=1512131&r2=1512132&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml Fri Aug 9 03:08:25 2013
@@ -139,13 +139,11 @@ under the License.
<field name="currencyUomId"><hidden/></field>
</form>
-<form name="invoiceItems" list-name="invoiceItems" target="" title="" type="list" separate-columns="true" paginate-target="invoiceOverview" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+<form name="invoiceItems" list-name="invItemAndOrdItems" target="" title="" type="list" separate-columns="true" paginate-target="invoiceOverview"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<row-actions>
- <set field="total" value="${groovy:
- import java.math.BigDecimal;
- if(quantity==null) quantity = BigDecimal.ONE;
- if(amount==null) amount = BigDecimal.ZERO;
- return (quantity.multiply(amount));}"/>
+ <set field="quantity" value="${groovy: quantity==null?1:quantity}"/>
+ <set field="total" value="${quantity * amount}"/>
</row-actions>
<auto-fields-entity entity-name="InvoiceItem" default-field-type="display"/>
<field name="invoiceId"><hidden/></field>
@@ -156,6 +154,7 @@ under the License.
<parameter param-name="orderId"/>
</hyperlink>
</field>
+ <field name="orderItemSeqId" widget-area-style="align-text"><display/></field>
<field name="inventoryItemId" widget-area-style="align-text"><display/></field>
<field name="quantity" widget-area-style="align-text"><display/></field>
<field name="amount" title="${uiLabelMap.AccountingUnitPrice}" widget-area-style="align-text"><display type="currency" currency="${invoice.currencyUomId}"/></field>
@@ -208,7 +207,7 @@ under the License.
<field name="paymentApplicationId"><hidden/></field>
<field name="amountApplied" widget-area-style="align-text"><display type="currency" currency="${invoice.currencyUomId}"/></field>
</form>
- <form name="AcctgTransAndEntries" type="list" title="Accounting Transactions" list-name="AcctgTransAndEntries"
+ <form name="AcctgTransAndEntries" type="list" title="Accounting Transactions" list-name="acctgTransAndEntries"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<auto-fields-entity entity-name="AcctgTransAndEntries" default-field-type="display"/>
<field name="invoiceId"><hidden/></field>
Modified: ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml?rev=1512132&r1=1512131&r2=1512132&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml Fri Aug 9 03:08:25 2013
@@ -188,11 +188,14 @@ under the License.
<order-by field-name="invoiceItemSeqId"/>
</entity-and>
<script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/CreateApplicationList.groovy"/>
- <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/OrderListInvoiceItem.groovy"/>
<set field="invoiceAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}" type="BigDecimal"/>
<set field="notAppliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
<set field="appliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(invoice)}" type="BigDecimal"/>
- <entity-condition entity-name="AcctgTransAndEntries" list="AcctgTransAndEntries">
+ <entity-condition entity-name="InvItemAndOrdItem" list="invItemAndOrdItems">
+ <condition-expr field-name="invoiceId" operator="equals" from-field="invoiceId"/>
+ <order-by field-name="invoiceItemSeqId"/>
+ </entity-condition>
+ <entity-condition entity-name="AcctgTransAndEntries" list="acctgTransAndEntries">
<condition-expr field-name="invoiceId" operator="equals" from-field="invoiceId"/>
<order-by field-name="acctgTransId"/>
<order-by field-name="acctgTransEntrySeqId"/>