ilscipio/scipio-erp

View on GitHub
applications/accounting/widget/ar/ArScreens.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->

<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
   
    <!-- Migrated from AR/CommonScreens  -->
    <screen name="ARDashboard">
        <section>
            <actions>
                <set field="activeSubMenuItem" value="armain"/>
                <set field="invoiceTypeId" value="SALES_INVOICE"/>
                <set field="titleProperty" value="CommonOverview"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonArDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <section>
                            <actions>
                                <set field="organizationPartyId" from-field="organizationPartyId" default-value="${defaultOrganizationPartyId}"/>
                                <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy"/>
                            </actions>
                            <widgets>
                                <!-- SCIPIO: Removed portal page
                                    <include-portal-page id="ArPortalPage"/>
                                 -->
                                 <include-screen name="ArInvoicesDueSoon" location="component://accounting/widget/ar/ArScreens.xml"/>
                                 <include-screen name="ArPastDueInvoices" location="component://accounting/widget/ar/ArScreens.xml"/>
                            </widgets>
                        </section>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    
    <!-- SCIPIO: Form migration -->
    <screen name="ArPastDueInvoices">
        <section>
           <actions>
                <set field="invoiceTypeId" value="SALES_INVOICE"/>
                <set field="organizationPartyId" from-field="organizationPartyId" default-value="${defaultOrganizationPartyId}" global="true"/>
                <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/InvoiceReport.groovy"/>
           
                <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="invoices" from-field="PastDueInvoices"/>
            </actions>
            <widgets>
                <section>
                    <condition>
                        <not>
                            <if-empty field="invoices"/>
                        </not>
                    </condition>
                    <widgets>
                        <screenlet title="${uiLabelMap.AccountingAccountsReceivable}">
                            <include-screen name="ScipioInvoices" location="component://accounting/widget/invoice/InvoiceScreens.xml"/>
                        </screenlet>
                    </widgets>              
                </section>
            </widgets>
        </section>
    </screen>
    
    <screen name="ArInvoicesDueSoon">
        <section>
            <actions>
                <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="invoices" from-field="InvoicesDueSoon"/>
            </actions>
            <widgets>
                <section>
                    <condition>
                        <not>
                            <if-empty field="invoices"/>
                        </not>
                    </condition>
                    <widgets>
                        <screenlet title="${uiLabelMap.AccountingInvoicesDueSoon}: (${InvoicesDueSoonTotalAmount})">
                            <include-screen name="ScipioInvoices" location="component://accounting/widget/invoice/InvoiceScreens.xml"/>
                        </screenlet>
                    </widgets>              
                </section>
            </widgets>
        </section>
    </screen>
</screens>