ilscipio/scipio-erp

View on GitHub
applications/accounting/widget/ap/ApScreens.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 AP/CommonScreens  -->
    <screen name="APDashboard">
        <section>
            <actions>
                <set field="activeSubMenuItem" value="apmain"/>
                <set field="invoiceTypeId" value="PURCHASE_INVOICE"/>
                <set field="titleProperty" value="CommonOverview"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonApDecorator" 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="ApPortalPage"/>
                                 -->
                                 <include-screen name="ApInvoicesDueSoon" location="component://accounting/widget/ap/ApScreens.xml"/>
                                 <include-screen name="ApPastDueInvoices" location="component://accounting/widget/ap/ApScreens.xml"/>
                            </widgets>
                        </section>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
    
    <!-- SCIPIO: Form migration -->
    <screen name="ApPastDueInvoices">
        <section>
           <actions>
                <set field="invoiceTypeId" value="PURCHASE_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.AccountingAccountsPayable}">
                            <include-screen name="ScipioInvoices" location="component://accounting/widget/invoice/InvoiceScreens.xml"/>
                        </screenlet>
                    </widgets>              
                </section>
            </widgets>
        </section>
    </screen>
    
    <screen name="ApInvoicesDueSoon">
        <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>
    
    <screen name="FindApPayments">
        <section>
            <actions>
                <set field="titleProperty" value="AccountingFindApPayments"/>
                <set field="activeSubMenuItem" value="findApPayments"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonApPaymentDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
                            <decorator-section name="menu-bar">
                                <container style="button-bar">
                                    <link target="newPayment" text="${uiLabelMap.CommonNew} ${uiLabelMap.CommonPayment}" style="${styles.link_nav} ${styles.action_add}"/>
                                </container>
                            </decorator-section>
                            <decorator-section name="search-options">
                                <include-form name="FindApPayments" location="component://accounting/widget/ap/VendorForms.xml"/>
                            </decorator-section>
                            <decorator-section name="search-results">
                                <include-form name="ListPayments" location="component://accounting/widget/payments/PaymentForms.xml"/>
                            </decorator-section>
                        </decorator-screen>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="NewOutgoingPayment">
        <section>
            <actions>
                <set field="titleProperty" value="AccountingNewPaymentOutgoing"/>
                <set field="activeSubMenuItem" value="newApPayment"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonApPaymentDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <include-form name="NewPaymentOut" location="component://accounting/widget/payments/PaymentForms.xml"/>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
</screens>