Author: hansbak
Date: Thu Aug 28 07:08:07 2008 New Revision: 689829 URL: http://svn.apache.org/viewvc?rev=689829&view=rev Log: show only invoices with a certain status to the customer Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=689829&r1=689828&r2=689829&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Thu Aug 28 07:08:07 2008 @@ -177,13 +177,33 @@ <field name="custRequestDate"><ignored/></field> </form> - <form name="ListInvoices" extends="ListInvoices" extends-resource="component://accounting/webapp/accounting/invoice/InvoiceForms.xml"> + <form name="ListInvoices" type="list" separate-columns="true" paginate-target="listInvoices" list-name="invoices" + odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> <row-actions> + <service service-name="getPartyNameForDate" result-map-name="partyNameResultFrom"> + <field-map field-name="partyId" env-name="partyIdFrom"/> + <field-map field-name="compareDate" env-name="invoiceDate"/> + <field-map field-name="lastNameFirst" value="Y"/> + </service> + <service service-name="getPartyNameForDate" result-map-name="partyNameResultTo"> + <field-map field-name="partyId" env-name="partyId"/> + <field-map field-name="compareDate" env-name="invoiceDate"/> + <field-map field-name="lastNameFirst" value="Y"/> + </service> <script location="component://mypage/webapp/mypage/WEB-INF/actions/ConvertInvoiceCurrency.groovy"/> </row-actions> <field name="invoiceId" widget-style="buttontext"> <hyperlink description="${invoiceId}" target="invoice.pdf?invoiceId=${invoiceId}&other=Y"/> </field> + <field name="invoiceTypeId"><display-entity entity-name="InvoiceType" description="${description}"/></field> + <field name="invoiceDate"><display/></field> + <field name="statusId"><display-entity entity-name="StatusItem" description="${description}"/></field> + <field name="description"><display/></field> + <field name="partyIdFrom"><display description="${partyNameResultFrom.fullName} [${partyIdFrom}]"/></field> + <field name="partyIdTo" parameter-name="partyId"><display description="${partyNameResultTo.fullName} [${partyId}]"/></field> + <field name="invoiceDate"><display description="${bsh:invoiceDate.toString().substring(0,10)}"/></field> + <field name="total" widget-area-style="align-text"><display type="currency" currency="${currencyUomId}"/></field> + <field name="amountToApply" widget-area-style="align-text"><display type="currency" currency="${currencyUomId}"/></field> </form> </forms> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml?rev=689829&r1=689828&r2=689829&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Thu Aug 28 07:08:07 2008 @@ -464,7 +464,17 @@ <actions> <set field="headerItem" value="invoices"/> <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetMyCompany.groovy"/> - <set field="parameters.partyId" from-field="myCompanyId"/> + <entity-condition list-name="invoices" entity-name="Invoice"> + <condition-list combine="and"> + <condition-expr field-name="partyId" operator="equals" env-name="myCompanyId"/> + <condition-list combine="or"> + <condition-expr field-name="statusId" operator="equals" value="APPROVED"/> + <condition-expr field-name="statusId" operator="equals" value="SEND"/> + <condition-expr field-name="statusId" operator="equals" value="READY"/> + <condition-expr field-name="statusId" operator="equals" value="PAID"/> + </condition-list> + </condition-list> + </entity-condition> </actions> <widgets> <section> |
Free forum by Nabble | Edit this page |