ilscipio/scipio-erp

View on GitHub
applications/accounting/widget/ledger/GlobalGlAccountsForms.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.
-->

<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">

    <form name="ListGlAccountOrganization" list-name="listIt" target="" title="" type="list" paginate-target="ListGlAccountOrganization"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <set field="entityName" value="GlAccountOrganization"/>
            <set field="noConditionFind" value="Y"/>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="entityName" from-field="entityName"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <auto-fields-entity entity-name="GlAccountOrganization" default-field-type="display"/>
        <field name="glAccountId" title="${uiLabelMap.CommonEdit}" widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" description="${glAccountId}" target="GlAccountNavigate">
                <parameter param-name="glAccountId"/>
            </hyperlink>
        </field>
    </form>

    <!-- Displays the form for assigning accounts to a party or company -->
    <!-- TODO: Localize field names -->
    <form name="AssignGlAccount" type="single" target="createGlAccountOrganization" title="" default-map-name="account"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="glAccountId">
            <drop-down>
                <entity-options entity-name="GlAccount" description="${accountCode} - ${accountName} [${glAccountId}]">
                    <entity-order-by field-name="accountCode"/>
                </entity-options>
            </drop-down>
        </field>
        <!-- <field name="organizationPartyId" title="Party" -->
        <field name="partyId" parameter-name="organizationPartyId">
            <drop-down>
                <entity-options entity-name="PartyRoleAndPartyDetail" description="${partyId}" >
                <!-- entity-options entity-name="PartyRoleAndPartyDetail" description="${organizationPartyId}" -->
                    <entity-constraint name="roleTypeId" value="INTERNAL_ORGANIZATIO"/>
                    <entity-order-by field-name="partyId"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="submitAction" title="${uiLabelMap.AccountingCreateAssignment}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>

    <form name="ListGlAccount" list-name="listIt" target="" title="" type="list" default-entity-name="GlAccount" 
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <set field="entityName" value="GlAccount"/>
            <set field="noConditionFind" value="Y"/>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="entityName" from-field="entityName"/>
                <field-map field-name="orderBy" value="accountCode"/>
                <field-map field-name="noConditionFind" value="Y"/>
            </service>
            <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
        </actions>
        <field name="accountCode" title="${uiLabelMap.CommonCode}" widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" description="${accountCode}" target="GlAccountNavigate">
                <parameter param-name="glAccountId"/>
            </hyperlink>
        </field>
        <field name="accountName" title="${uiLabelMap.CommonName}" entry-name="glAccountId"><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountName}"/></field>
        <field name="parentGlAccountId" title="${uiLabelMap.CommonParent}" widget-style="${styles.link_nav_info_id} ${styles.action_view}">
            <hyperlink target="GlAccountNavigate" description="${parentGlAccountId}" use-when="parentGlAccountId!=null">
                    <parameter param-name="glAccountId"/>
            </hyperlink>
        </field>
        <field name="glAccountTypeId" title="${uiLabelMap.CommonType}"><display-entity entity-name="GlAccountType"/></field>
        <field name="glAccountClassId" title="${uiLabelMap.CommonClass}"><display-entity entity-name="GlAccountClass"/></field>
        <field name="glResourceTypeId" title="${uiLabelMap.CommonResource}"><display-entity entity-name="GlResourceType"/></field>
        <!-- 
        <field name="description"><display/></field>
        <field name="glXbrlClassId" title="XBRL ${uiLabelMap.CommonClass}"><display-entity entity-name="GlXbrlClass"/></field>
        
        <field name="productId" title="${uiLabelMap.AccountingProduct}"><display-entity entity-name="Product"/></field>
        <field name="externalId"><display/></field>
         -->
    </form>
    <form name="ListGlAccountPdf" extends="ListGlAccount">
        <actions>
            <entity-condition entity-name="GlAccount" list="listIt">
                <order-by field-name="glAccountId"/>
            </entity-condition> 
        </actions>
        <field name="accountCode" title="${uiLabelMap.CommonCode}" widget-style="buttontext"><display/></field>
    </form>

    <form name="EditGlAccount" type="single" target="updateGlAccount" title="" default-map-name="glAccount"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <!-- SCIPIO -->
            <include-screen-actions name="GetGlAccountActions" location="component://accounting/widget/ledger/GlobalGlAccountsScreens.xml"/>
        </actions>
        <alt-target use-when="glAccount==null" target="createGlAccount"/>
        <field name="glAccountId" use-when="glAccount!=null" title="${uiLabelMap.CommonId}"><display/></field>
        <!-- SCIPIO: the screen shows this now
        <field name="glAccountId" use-when="glAccount==null&amp;&amp;glAccountId!=null" title="${uiLabelMap.CommonId}" tooltip="${uiLabelMap.AccountingCouldNotFindGlAccount} [${glAccountId}]"><display also-hidden="false"/></field>-->
        <!-- this to be taken care of with auto-fields-service as soon as it uses entity field info too -->
        <field name="accountCode" title="${uiLabelMap.CommonCode}" position="2"><text/></field>
        <field name="accountName" title="${uiLabelMap.CommonName}" required-field="true"><text/></field>
        <field name="glAccountTypeId" title="${uiLabelMap.CommonType}">
            <drop-down allow-empty="false" no-current-selected-key="_NA_">
                <entity-options entity-name="GlAccountType" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="glAccountClassId" title="${uiLabelMap.CommonClass}" position="2">
            <drop-down allow-empty="false">
                <entity-options entity-name="GlAccountClass" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="glResourceTypeId" title="${uiLabelMap.CommonResource}">
            <drop-down allow-empty="false" no-current-selected-key="_NA_">
                <entity-options entity-name="GlResourceType" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="glXbrlClassId" title="XBRL ${uiLabelMap.CommonClass}" position="2">
            <drop-down allow-empty="true">
                <entity-options entity-name="GlXbrlClass" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="parentGlAccountId" title="${uiLabelMap.CommonParent}">
            <drop-down allow-empty="true">
                <entity-options key-field-name="glAccountId" entity-name="GlAccount" description="${accountCode} - ${accountName}">
                    <entity-order-by field-name="accountCode"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="productId" title="${uiLabelMap.AccountingProduct}">
            <drop-down allow-empty="true">
                <entity-options entity-name="Product" description="${productId} - ${internalName}">
                    <entity-order-by field-name="productId"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="externalId" position="2"><text/></field>
        <field name="description"><textarea/></field>
        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
        <field name="submitAction" title="${uiLabelMap.CommonAdd}" use-when="glAccount==null" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>

    <!-- this is used to list AcctgTransEntries and can be called either by using an acctgTransId or a glAccountId -->
    <form name="ListAcctgTransEntries" type="list" list-name="entries" default-entity-name="AcctgTransEntry"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="acctgTransId" widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" description="${acctgTransId}" target="ListAcctgTransEntries">
                <parameter param-name="acctgTransId"/>
            </hyperlink>
        </field>
        <field name="acctgTransEntrySeqId"><display/></field>
        <field name="glAccountId">
            <display-entity entity-name="GlAccount" description="${accountName}">
                <sub-hyperlink target="ListGlAccountEntries" description="[${glAccountId}]">
                <parameter param-name="glAccountId"/>
            </sub-hyperlink>
             </display-entity>
        </field>
        <field name="description"><display/></field>
        <field name="voucherRef"><display/></field>
        <field name="partyId"><display/></field>
        <field name="organizationPartyId"><display/></field>
        <field name="productId"><display/></field>
        <field name="debitCreditFlag"><display/></field>
        <field name="amount" title="${uiLabelMap.CommonAmount}" widget-area-style="amount" title-area-style="align-right"><display/></field>
        <field name="reconcileStatusId"><display/></field>
        <field name="settlementTermId"><display/></field>
        <field name="isSummary"><display/></field>
    </form>

    <form name="GlAccountsNavForm" type="single" target="" title="GL Accounts" default-map-name="journal"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="backToAdmin" title=" " widget-style="${styles.link_nav_cancel}">
            <hyperlink also-hidden="false" description="${uiLabelMap.AccountingBackToAdmin}" target="AdminMain">
                <parameter param-name="organizationPartyId"/>
            </hyperlink>
        </field>
    </form>

    <form name="ListGlReconciliations" type="list" list-name="glReconciliations" default-entity-name="GlReconciliation"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="glReconciliationId" widget-style="${styles.link_nav_info_id}">
           <hyperlink also-hidden="false" description="${glReconciliationId}" target="EditGlReconciliation">
                <parameter param-name="glReconciliationId"/>
                <parameter param-name="organizationPartyId"/>
                <parameter param-name="glAccountId"/>
            </hyperlink>
        </field>
        <field name="glReconciliationName"><display/></field>
        <field name="description"><display/></field>
        <field name="createdByUserLogin"><display/></field>
        <field name="glAccountId">
            <display-entity entity-name="GlAccount" description="${accountName}">
                <sub-hyperlink target="ListGlAccountEntries" description="[${glAccountId}]">
                <parameter param-name="glAccountId"/>
                <parameter param-name="organizationPartyId"/>
            </sub-hyperlink>
            </display-entity>
        </field>
        <field name="reconciledBalance"><display/></field>
        <field name="reconciledDate"><display/></field>
    </form>

    <form name="ListGlReconciliationEntries" type="list" list-name="glReconciliationEntries" default-entity-name="GlReconciliationEntry"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="glReconciliationId"><display/></field>
        <field name="acctgTransId" widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" description="${acctgTransId}" target="ListAcctgTransEntries">
                <parameter param-name="acctgTransId"/>
            </hyperlink>
        </field>
        <field name="acctgTransEntrySeqId"><display/></field>
        <field name="reconciledAmount"><display/></field>
    </form>
    
    <form name="ListRateAmounts" type="list" target="expireRateAmount" paginate-target="viewRateAmounts"
        odd-row-style="alternate-row" header-row-style="header-row-2"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <set field="sortField" from-field="parameters.sortField" default-value="rateTypeId"/>
            <entity-condition entity-name="RateAmountAndRelations" filter-by-date="true">
                <order-by field-name="${sortField}"/>
                <order-by field-name="rateTypeId"/>
                <order-by field-name="periodTypeId"/>
            </entity-condition>
        </actions>
        <field name="rateTypeId"><hidden/></field>
        <field name="rateCurrencyUomId"><hidden/></field>
        <field name="rateDescription"><display/></field>
        <field name="periodTypeId" title="${uiLabelMap.CommonPeriod}"><display description="${periodDescription}"/></field>
        <field name="partyId" title="${uiLabelMap.CommonParty}" sort-field="true" widget-style="${styles.link_nav_info_name_long} ${styles.action_view}">
            <hyperlink target="/partymgr/control/viewprofile" description="${groupName}${lastName} ${firstName} ${middleName}" target-type="inter-app">
                <parameter param-name="partyId"/>
            </hyperlink>
        </field>
        <field name="workEffortId" sort-field="true"><display description="${workEffortName}"/></field>
        <field name="emplPositionTypeId" title="${uiLabelMap.CommonPosition}" sort-field="true"><display description="${employeePositionDescription}"/></field>
        <field name="rateAmount" widget-area-style="amount" title-area-style="align-right"><display type="currency" currency="${rateCurrencyUomId}"/></field>
        
        <field name="fromDate" title="${uiLabelMap.CommonFrom}" ><display type="date"/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}" ><display type="date"/></field>
        <field name="delete" title="${uiLabelMap.CommonExpire}" widget-style="${styles.link_run_sys} ${styles.action_terminate}"><submit/></field>
    </form>

    <form name="updateRateAmount" type="single" target="updateRateAmount" default-service-name="updateRateAmount"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
        </actions>
        <field name="rateTypeId" title="${uiLabelMap.CommonType}">
            <drop-down>
                <entity-options entity-name="RateType" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="periodTypeId" title="${uiLabelMap.CommonPeriod}" position="2">
            <drop-down>
                <entity-options entity-name="PeriodType" description="${description}">
                    <entity-constraint name="periodTypeId" operator="like" value="RATE_%"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="rateAmount" position="1"><text/></field>
        <field name="rateCurrencyUomId" title="${uiLabelMap.Currency}" position="2">
       
            <drop-down allow-empty="true" no-current-selected-key="${defaultOrganizationPartyCurrencyUomId}">
                <entity-options key-field-name="uomId" description="${description} - ${abbreviation}" entity-name="Uom">
                    <entity-constraint name="uomTypeId" operator="equals" value="CURRENCY_MEASURE"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="partyId" title="${uiLabelMap.CommonParty}"><lookup target-form-name="LookupPartyName"></lookup></field>
        <field name="workEffortId"><lookup target-form-name="LookupWorkEffort"><sub-hyperlink target="WorkEffortSummary" description="${workEffortName}"/></lookup></field>
        <field name="emplPositionTypeId" title="${uiLabelMap.CommonPosition}" position="2">
            <drop-down allow-empty="true">
                <entity-options entity-name="EmplPositionType" description="${description}">
                    <entity-constraint name="emplPositionTypeId" operator="not-equals" value="_NA_"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="submitAction" title="${uiLabelMap.AccountingUpdateRateAmount}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit/></field>
    </form>
</forms>