Author: hansbak
Date: Fri Dec  4 03:22:29 2009
New Revision: 887048

URL: http://svn.apache.org/viewvc?rev=887048&view=rev
Log:
add a invoice list portlet for the logged-on suplier

Modified:
    ofbiz/trunk/applications/accounting/data/AccountingPortletData.xml
    ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml
    ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml

Modified: ofbiz/trunk/applications/accounting/data/AccountingPortletData.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/AccountingPortletData.xml?rev=887048&r1=887047&r2=887048&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/data/AccountingPortletData.xml 
(original)
+++ ofbiz/trunk/applications/accounting/data/AccountingPortletData.xml Fri Dec  
4 03:22:29 2009
@@ -68,4 +68,10 @@
 
     <PortalPagePortlet portalPageId="ApPortalPage" 
portalPortletId="ApPastDueInvoices" portletSeqId="00001" columnSeqId="00001" 
sequenceNum="0"/>
     <PortalPagePortlet portalPageId="ApPortalPage" 
portalPortletId="ApInvoicesDueSoon" portletSeqId="00001" columnSeqId="00001" 
sequenceNum="1"/>
+
+    <PortalPortlet portalPortletId="ListSupplierInvoices" portletName="List 
Supplier Invoices"
+        screenName="ListSupplierInvoices"
+        screenLocation="component://accounting/widget/InvoiceScreens.xml"
+        description="List Invoices for a certain supplier who is just logged 
in"/>
+    <PortletPortletCategory portalPortletId="ListSupplierInvoices" 
portletCategoryId="ACCOUNTING"/>
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml?rev=887048&r1=887047&r2=887048&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml Fri Dec  4 
03:22:29 2009
@@ -649,5 +649,10 @@
         <field name="partyIdFrom"><ignored/></field>
         <field name="partyIdTo"><ignored/></field>
     </form>
-
+    
+    <form name="ListSupplierInvoices" extends="ListInvoices" 
list-name="invoiceslistexternal"
+        odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
+        <field name="partyIdFrom"><ignored/></field>
+        <field name="partyIdTo"><ignored/></field>
+    </form>
 </forms>

Modified: ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml?rev=887048&r1=887047&r2=887048&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml Fri Dec  4 
03:22:29 2009
@@ -564,4 +564,29 @@
         </section>
     </screen>
 
+    <screen name="ListSupplierInvoices">
+        <section>
+            <actions>
+                <set field="myCompanyId" from-field="userLogin.partyId"/>
+                <entity-condition list="invoiceslistexternal" 
entity-name="Invoice">
+                    <condition-list combine="and">
+                        <condition-expr field-name="partyIdFrom" 
operator="equals" from-field="myCompanyId"/>
+                        <condition-expr field-name="invoiceTypeId" 
operator="equals" value="PURCHASE_INVOICE"/>
+                        <condition-list combine="or">
+                            <condition-expr field-name="statusId" 
operator="equals" value="INVOICE_APPROVED"/>
+                            <condition-expr field-name="statusId" 
operator="equals" value="INVOICE_SENT"/>
+                            <condition-expr field-name="statusId" 
operator="equals" value="INVOICE_READY"/>
+                            <condition-expr field-name="statusId" 
operator="equals" value="INVOICE_PAID"/>
+                        </condition-list>
+                    </condition-list>
+                    <order-by field-name="invoiceDate DESC"/>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <screenlet title="${uiLabelMap.PageTitleListInvoices}" 
navigation-form-name="ListInvoices">
+                    <include-form name="ListSupplierInvoices"  
location="component://accounting/widget/InvoiceForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
 </screens>
\ No newline at end of file


Reply via email to