ilscipio/scipio-erp

View on GitHub
applications/accounting/widget/settings/TaxAuthorityForms.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="FindTaxAuthority" type="single" target="FindTaxAuthority"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        
        <field name="taxAuthGeoId" title="${uiLabelMap.CommonGeo}">
            <!-- SCIPIO: too many entries
            <drop-down allow-empty="true">
                <entity-options entity-name="Geo" description="${geoName} [${geoId}]" key-field-name="geoId"></entity-options>
            </drop-down>-->
            <!-- could do this instead, but inconsistent with rest of form and creates an extra query
            <drop-down allow-empty="true">
                <entity-options entity-name="TaxAuthorityAndGeo" description="${geoName} [${geoId}]" key-field-name="geoId"></entity-options>
            </drop-down>-->
            <lookup target-form-name="LookupTaxAuthorityGeo"/>
        </field>
        <field name="taxAuthPartyId" title="${uiLabelMap.CommonParty}" position="2">
            <lookup target-form-name="LookupTaxAuthorityPartyName"/><!-- SCIPIO: filter out unneeded instead: LookupPartyName -->
        </field>
        <field name="requireTaxIdForExemption">
            <drop-down allow-empty="true">
                <option description="${uiLabelMap.CommonNo}" key="N"/>
                <option description="${uiLabelMap.CommonYes}" key="Y"/>
            </drop-down>
        </field>
        <field name="includeTaxInPrice" position="2">
            <drop-down allow-empty="true">
                <option description="${uiLabelMap.CommonNo}" key="N"/>
                <option description="${uiLabelMap.CommonYes}" key="Y"/>
            </drop-down>
        </field>
        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
        <field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}">
            <submit button-type="button"/>
        </field>
    </form>
    
    <form name="originalFindTaxAuthority" type="list" list-name="taxAuthorityList"
        odd-row-style="alternate-row" paginate-target="FindTaxAuthority"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <entity-condition entity-name="TaxAuthority" list="taxAuthorityList">
                <order-by field-name="taxAuthGeoId"/>
                <order-by field-name="taxAuthPartyId"/>
            </entity-condition>
        </actions>
        <auto-fields-entity entity-name="TaxAuthority" default-field-type="display"/>

        <field name="taxAuthGeoId"><display-entity entity-name="Geo" key-field-name="geoId" description="${geoName} [${geoId}]"/></field>
        <field name="taxAuthPartyId">
            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName} ${firstName} ${lastName}">
                <sub-hyperlink description="${taxAuthPartyId}" target="/partymgr/control/viewprofile" target-type="inter-app" link-style="${styles.link_nav_info_id}">
                    <parameter param-name="partyId" from-field="taxAuthPartyId"/>
                </sub-hyperlink>
            </display-entity>
        </field>

        <field name="editAction" title=" " widget-style="${styles.link_nav} ${styles.action_update}">
            <hyperlink description="${uiLabelMap.CommonEdit}" target="EditTaxAuthority" also-hidden="false">
                <parameter param-name="taxAuthPartyId"/>
                <parameter param-name="taxAuthGeoId"/>
            </hyperlink>
        </field>
    </form>
    
    <form name="ListTaxAuthorities" list-name="listIt" target="" title="" type="list" paginate-target="FindTaxAuthority"
        odd-row-style="alternate-row" header-row-style="header-row-2"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <set field="entityName" value="TaxAuthorityAndDetail"/>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="requestParameters"/>
                <field-map field-name="entityName" from-field="entityName"/>
                <field-map field-name="orderBy" from-field="parameters.sortField"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <row-actions>
            <set field="partyId" from-field="taxAuthPartyId"/>
            <entity-one entity-name="PartyNameView" value-field="party"/>
        </row-actions>
        
        <field name="partyId" title="${uiLabelMap.CommonParty}" widget-style="${styles.link_nav_info_idname_long}">
           <hyperlink also-hidden="false" description="${party.groupName} ${party.firstName} ${party.lastName} [${partyId}]" target="EditTaxAuthority">
                <parameter param-name="taxAuthPartyId"/>
                <parameter param-name="taxAuthGeoId"/>
            </hyperlink>
        </field>
        <field name="taxAuthGeoId" title="${uiLabelMap.CommonGeo}"><display-entity entity-name="Geo" key-field-name="geoId" description="${geoName} [${geoId}]"/></field>
        <field name="requireTaxIdForExemption"><display/></field>
        <field name="taxIdFormatPattern"><display/></field>
        <field name="includeTaxInPrice"><display/></field>
    </form>
    
    <form name="EditTaxAuthority" type="single" target="updateTaxAuthority" title="" default-map-name="taxAuthority"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <alt-target use-when="taxAuthority==null" target="createTaxAuthority"/>
        
        <field  name="taxAuthPartyId" title="${uiLabelMap.CommonParty}" use-when="taxAuthority==null&amp;&amp;taxAuthPartyId==null" required-field="true">
            <lookup target-form-name="LookupPartyName"/>
        </field>
        <field name="taxAuthPartyId" title="${uiLabelMap.CommonParty}" use-when="taxAuthority!=null"  tooltip="${uiLabelMap.CommonNotModifRecreat}">
            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName} ${firstName} ${lastName}"/>
        </field>
        <field name="taxAuthPartyId" title="${uiLabelMap.PartyParty}" use-when="taxAuthority==null&amp;&amp;taxAuthPartyId!=null" tooltip="${uiLabelMap.CommonCannotBeFound}:[${taxAuthPartyId}]">
            <lookup target-form-name="LookupPartyName"/>
        </field>

        <field name="taxAuthGeoId" title="${uiLabelMap.CommonGeo}" use-when="taxAuthority!=null" position="2">
            <display-entity entity-name="Geo" key-field-name="geoId" description="${geoName} [${geoId}]"></display-entity>
        </field>
        <field name="taxAuthGeoId" title="${uiLabelMap.CommonGeo}" use-when="taxAuthority==null&amp;&amp;taxAuthGeoId==null" required-field="true" position="2">
            <lookup target-form-name="LookupGeo"/>
        </field>
        <field  name="taxAuthGeoId" title="${uiLabelMap.CommonGeo}" use-when="taxAuthority==null&amp;&amp;taxAuthGeoId!=null" tooltip="${uiLabelMap.CommonCannotBeFound}:[${taxAuthGeoId}]">
            <lookup target-form-name="LookupGeo"/>
        </field>

        <field name="requireTaxIdForExemption" widget-style="+smallSelect">
            <drop-down no-current-selected-key="Y">
                <option key="Y" description="${uiLabelMap.CommonY}"/>
                <option key="N" description="${uiLabelMap.CommonN}"/>
            </drop-down>
        </field>
        <field name="includeTaxInPrice" widget-style="+smallSelect" position="2">
            <drop-down no-current-selected-key="N">
                <option key="Y" description="${uiLabelMap.CommonY}"/>
                <option key="N" description="${uiLabelMap.CommonN}"/>
            </drop-down>
        </field>
        <field name="taxIdFormatPattern" tooltip="${uiLabelMap.AccountingValidationPattern}"><text/></field>

        <field use-when="taxAuthority!=null" name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
        <field use-when="taxAuthority==null" name="submitAction" title="${uiLabelMap.CommonCreate}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>

    <form name="ListTaxAuthorityCategories" type="list" list-name="taxAuthorityCategoryList" target="updateTaxAuthorityCategory"
        odd-row-style="alternate-row" header-row-style="header-row-2" paginate-target="EditTaxAuthorityCategories"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <entity-condition entity-name="TaxAuthorityCategory" list="taxAuthorityCategoryList">
                <condition-list combine="and">
                    <condition-expr field-name="taxAuthPartyId" from-field="taxAuthPartyId"/>
                    <condition-expr field-name="taxAuthGeoId" from-field="taxAuthGeoId"/>
                </condition-list>
                <order-by field-name="productCategoryId"/>
            </entity-condition>
        </actions>
        <row-actions>
            <entity-one entity-name="ProductCategory" value-field="category"></entity-one>
        </row-actions>
        <field name="taxAuthPartyId"><hidden/></field>
        <field name="taxAuthGeoId"><hidden/></field>
        <field name="productCategoryId" title="${uiLabelMap.CommonCategory}" widget-style="${styles.link_nav_info_idname}">
           <hyperlink also-hidden="false" description="${productCategoryId} - ${category.categoryName}" target="/catalog/control/EditCategory" target-type="inter-app" >
                <parameter param-name="productCategoryId"/>
            </hyperlink>
        </field>
        <field name="deleteAction" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="deleteTaxAuthorityCategory" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="taxAuthPartyId"/>
                <parameter param-name="taxAuthGeoId"/>
                <parameter param-name="productCategoryId"/>
            </hyperlink>
        </field>
    </form>
    
    <form name="AddTaxAuthorityCategory" type="single" target="createTaxAuthorityCategory" title="" default-map-name="taxAuthorityCategory"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <auto-fields-service service-name="createTaxAuthorityCategory"/>
        <field name="taxAuthPartyId"><hidden/></field>
        <field name="taxAuthGeoId"><hidden/></field>
        <field name="productCategoryId" title="${uiLabelMap.CommonCategory}" required-field="true"><lookup target-form-name="LookupProductCategory"/></field>
        <field name="submitAction" title="${uiLabelMap.CommonAdd}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>

    <form name="ListTaxAuthorityAssocs" type="list" list-name="taxAuthorityAssocList" target="updateTaxAuthorityAssoc"
        odd-row-style="alternate-row" header-row-style="header-row-2" paginate-target="EditTaxAuthorityAssocs"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <entity-condition entity-name="TaxAuthorityAssoc" list="taxAuthorityAssocList">
                <condition-list combine="and">
                    <condition-expr field-name="taxAuthPartyId" from-field="taxAuthPartyId"/>
                    <condition-expr field-name="taxAuthGeoId" from-field="taxAuthGeoId"/>
                </condition-list>
                <order-by field-name="toTaxAuthGeoId"/>
            </entity-condition>
        </actions>
        <row-actions>
            <set field="partyId" from-field="toTaxAuthPartyId"/>
            <entity-one entity-name="PartyNameView"  value-field="party"></entity-one>
            <!-- SCIPIO: new -->
            <set field="geoId" from-field="toTaxAuthGeoId"/>
            <entity-one entity-name="Geo"  value-field="geo"></entity-one>
        </row-actions>

        <field name="taxAuthPartyId"><hidden/></field>
        <field name="taxAuthGeoId"><hidden/></field>

        <!-- SCIPIO: combine these for display
        <field name="toTaxAuthPartyId" title="${uiLabelMap.CommonParty}" widget-style="${styles.link_nav_info_idname_long}">
            <hyperlink also-hidden="false" description="${party.groupName} ${party.firstName} ${party.lastName} [${partyId}]" target="EditTaxAuthority">
                <parameter param-name="taxAuthPartyId" from-field="toTaxAuthPartyId"/>
                <parameter param-name="taxAuthGeoId" from-field="toTaxAuthGeoId"/>
            </hyperlink>
        </field>
        <field name="toTaxAuthGeoId" title="${uiLabelMap.CommonGeo}"><display-entity entity-name="Geo" key-field-name="geoId" description="${geoName} [${geoId}]"/></field>
        -->
        <field name="toTaxAuthPartyId"><hidden/></field>
        <field name="toTaxAuthGeoId"><hidden/></field>
        <field name="toTaxAuthCombinedId" title="${uiLabelMap.CommonTo} ${uiLabelMap.AccountingTaxAuthority}">
            <hyperlink also-hidden="false" description="${party.groupName} ${party.firstName} ${party.lastName} [${partyId}] / ${geo.geoName} [${geo.geoId}]" target="EditTaxAuthority">
                <parameter param-name="taxAuthPartyId" from-field="toTaxAuthPartyId"/>
                <parameter param-name="taxAuthGeoId" from-field="toTaxAuthGeoId"/>
            </hyperlink>
        </field> 
        
        <field name="fromDate" title="${uiLabelMap.CommonFrom}"><display type="date"/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}"><date-time type="date"/></field>
        <field name="taxAuthorityAssocTypeId" title="${uiLabelMap.CommonType}">
            <drop-down allow-empty="true">
                <entity-options entity-name="TaxAuthorityAssocType" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        
        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
        <field name="deleteAction" title="${uiLabelMap.CommonDelete}" widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="deleteTaxAuthorityAssoc" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="taxAuthPartyId"/>
                <parameter param-name="taxAuthGeoId"/>
                <parameter param-name="toTaxAuthPartyId"/>
                <parameter param-name="toTaxAuthGeoId"/>
                <parameter param-name="fromDate"/>
            </hyperlink>
        </field>
    </form>
    
    <form name="AddTaxAuthorityAssoc" type="single" target="createTaxAuthorityAssoc" title="" default-map-name="taxAuthorityAssoc"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <!-- SCIPIO: new -->
            <script location="component://accounting/webapp/accounting/WEB-INF/actions/tax/GetTaxAuthorityListForDisplay.groovy"/>
        </actions>
        <!-- SCIPIO: TODO: factor out -->
        <page-script><![CDATA[
        if (typeof changeToTaxAuthCombinedId === 'undefined') {
            function changeToTaxAuthCombinedId(combinedInput) {
                var form = jQuery(combinedInput).closest('form'),
                    partyId = '', geoId = '', id = jQuery(combinedInput).val();
                if (id) { 
                    id = id.split('::');
                    geoId = id.length ? id[0] : '';
                    partyId = id.length ? id[1] : '';
                }
                jQuery('input[name=toTaxAuthGeoId]', form).val(geoId);
                jQuery('input[name=toTaxAuthPartyId]', form).val(partyId); 
            }
            
            jQuery(document).ready(function() {
                var inputs = jQuery('select.AddTaxAuthorityAssoc_toTaxAuthCombinedId_field, .AddTaxAuthorityAssoc_toTaxAuthCombinedId_field select');
                inputs.each(function() {
                    changeToTaxAuthCombinedId(this);
                });
                inputs.on('change', function() {
                    changeToTaxAuthCombinedId(this);
                });
            });
        }
        ]]></page-script>
        <field name="taxAuthPartyId"><hidden/></field>
        <field name="taxAuthGeoId"><hidden/></field>
        
        <!-- SCIPIO: this is needlessly confusing and it's impossible for users to select a tax authority; instead, combine into one select
        <field name="toTaxAuthPartyId" title="${uiLabelMap.CommonParty}" required-field="true"><lookup target-form-name="LookupPartyName"/></field>
        <field name="toTaxAuthGeoId" title="${uiLabelMap.CommonGeo}" required-field="true" position="2">
            <drop-down allow-empty="false">
                <entity-options entity-name="Geo" description="${geoName} [${geoId}]" key-field-name="geoId"></entity-options>
            </drop-down>
        </field> -->
        <field name="toTaxAuthPartyId"><hidden value=""/></field>
        <field name="toTaxAuthGeoId"><hidden value=""/></field>
        <field name="toTaxAuthCombinedId" title="${uiLabelMap.CommonTo} ${uiLabelMap.AccountingTaxAuthority}" required-field="true" 
            widget-style="+AddTaxAuthorityAssoc_toTaxAuthCombinedId_field">
            <drop-down allow-empty="false">
                <list-options key-name="taxAuthCombinedId" list-name="taxAuthorityInfoList" 
                    description="${party.groupName} ${party.firstName} ${party.lastName} [${taxAuthPartyId}] / ${geo.geoName} [${taxAuthGeoId}]"/>
            </drop-down>
        </field>
        
        <field name="taxAuthorityAssocTypeId" title="${uiLabelMap.CommonType}" position="2" >
            <drop-down allow-empty="true">
                <entity-options entity-name="TaxAuthorityAssocType" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}"><date-time type="date"/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}" position="2"><date-time type="date"/></field>
        <field name="submitAction" title="${uiLabelMap.CommonAdd}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>

    <form name="ListTaxAuthorityGlAccounts" type="list" list-name="taxAuthorityGlAccountList" target="updateTaxAuthorityGlAccount"
        odd-row-style="alternate-row" header-row-style="header-row-2" paginate-target="EditTaxAuthorityGlAccounts"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <entity-condition entity-name="TaxAuthorityGlAccount" list="taxAuthorityGlAccountList">
                <condition-list combine="and">
                    <condition-expr field-name="taxAuthPartyId" from-field="taxAuthPartyId"/>
                    <condition-expr field-name="taxAuthGeoId" from-field="taxAuthGeoId"/>
                </condition-list>
                <order-by field-name="glAccountId"/>
            </entity-condition>
        </actions>
        <row-actions>
            <entity-one entity-name="GlAccount" value-field="glAccount" />
            
            <set field="partyId" from-field="organizationPartyId"/>
            <entity-one entity-name="PartyNameView" value-field="party"/>
        </row-actions>
        <field name="taxAuthPartyId"><hidden/></field>
        <field name="taxAuthGeoId"><hidden/></field>
        <field name="glAccountId" title="${uiLabelMap.AccountingGlAccount}" widget-style="${styles.link_nav_info_idname}">
            <hyperlink also-hidden="false" description="${glAccount.accountCode} - ${glAccount.accountName}" target="GlAccountNavigate">
                <parameter param-name="glAccountId"/>
            </hyperlink>
        </field>
        <field name="organizationPartyId" title="${uiLabelMap.CommonParty}" widget-style="${styles.link_nav_info_idname_long}">
           <hyperlink also-hidden="false" description="${party.groupName} ${party.firstName} ${party.lastName} [${partyId}]" target="EditAgreementItemParty">
                <parameter param-name="partyId"/>
                <parameter param-name="agreementId"/>
                <parameter param-name="agreementItemSeqId"/>
            </hyperlink>
        </field>

        <field name="deleteAction" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="deleteTaxAuthorityGlAccount" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="taxAuthPartyId"/>
                <parameter param-name="taxAuthGeoId"/>
                <parameter param-name="glAccountId"/>
                <parameter param-name="organizationPartyId"/>
            </hyperlink>
        </field>
    </form>
    <form name="AddTaxAuthorityGlAccount" type="single" target="createTaxAuthorityGlAccount" title="" default-map-name="taxAuthorityGlAccount"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <auto-fields-service service-name="createTaxAuthorityGlAccount"/>
        <field name="taxAuthPartyId"><hidden/></field>
        <field name="taxAuthGeoId"><hidden/></field>
        <field name="organizationPartyId" title="${uiLabelMap.PartyOrganizationPartyId}" required-field="true"><lookup target-form-name="LookupPartyName"/></field>
        <field name="glAccountId" title="${uiLabelMap.AccountingGlAccount}" required-field="true"><lookup target-form-name="LookupGlAccount"/></field>
        <field name="submitAction" title="${uiLabelMap.CommonAdd}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>

    <form name="ListTaxAuthorityRateProducts" type="list" list-name="taxAuthorityRateProductList" target="updateTaxAuthorityRateProduct" separate-columns="true"
        odd-row-style="alternate-row" header-row-style="header-row-2" paginate-target="EditTaxAuthorityRateProducts"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <entity-condition entity-name="TaxAuthorityRateProduct" list="taxAuthorityRateProductList">
                <condition-list combine="and">
                    <condition-expr field-name="taxAuthPartyId" from-field="taxAuthPartyId"/>
                    <condition-expr field-name="taxAuthGeoId" from-field="taxAuthGeoId"/>
                </condition-list>
                <order-by field-name="fromDate"/>
            </entity-condition>
        </actions>
        <auto-fields-service service-name="updateTaxAuthorityRateProduct"/>

        <field name="taxAuthorityRateSeqId"><hidden/></field>
        <field name="taxAuthPartyId"><hidden/></field>
        <field name="taxAuthGeoId"><hidden/></field>

        <field name="taxAuthorityRateTypeId" title="${uiLabelMap.CommonType}" required-field="true">
            <drop-down allow-empty="false">
                <entity-options entity-name="TaxAuthorityRateType" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="productCategoryId" title="${uiLabelMap.ProductCategory}" required-field="true">
            <drop-down allow-empty="false">
                <entity-options entity-name="TaxAuthorityCategoryView" description="${description} [${productCategoryId}]">
                    <entity-constraint name="taxAuthPartyId" env-name="taxAuthPartyId"/>
                    <entity-constraint name="taxAuthGeoId" env-name="taxAuthGeoId"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="productStoreId" title="${uiLabelMap.ProductStoreId}">
            <!-- <lookup size="10" target-form-name="LookupProductStore"/> -->
            <drop-down allow-empty="true">
                <!-- TODO: filter results... -->
                <entity-options entity-name="ProductStore" description="${storeName} [${productStoreId}]">
                    <entity-order-by field-name="storeName"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="titleTransferEnumId" title="${uiLabelMap.AccountingTitleTransfer}">
            <drop-down allow-empty="true">
                <entity-options entity-name="Enumeration" key-field-name="enumId" description="${description} [${enumCode}]">
                    <entity-constraint name="enumTypeId" value="PTSOFTTFR"/>
                    <entity-order-by field-name="sequenceId"/>
                </entity-options>
            </drop-down>
        </field>

        <field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
        <field name="deleteAction" title="${uiLabelMap.CommonDelete}" widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="deleteTaxAuthorityRateProduct" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="taxAuthPartyId"/>
                <parameter param-name="taxAuthGeoId"/>
                <parameter param-name="taxAuthorityRateSeqId"/>
            </hyperlink>
        </field>
    </form>
    <form name="AddTaxAuthorityRateProduct" type="single" target="createTaxAuthorityRateProduct" title="" default-map-name="taxAuthorityRateProduct"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->

        <field name="taxAuthPartyId"><hidden/></field>
        <field name="taxAuthGeoId"><hidden/></field>
        
        <!-- SCIPIO: TODO: REVIEW: which of these are really required-field?? the form here is hard to reconcile with the id-ne on 
            TaxAuthorityRateProduct entity... note that service may also automatically create some... -->

        <field name="taxAuthorityRateTypeId" title="${uiLabelMap.CommonType}" required-field="true">
            <drop-down allow-empty="false">
                <entity-options entity-name="TaxAuthorityRateType" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="productStoreId" title="${uiLabelMap.CommonStore}" position="2">
            <!-- <lookup size="10" target-form-name="LookupProductStore"/> -->
            <drop-down allow-empty="true">
                <!-- TODO: filter results... -->
                <entity-options entity-name="ProductStore" description="${storeName} [${productStoreId}]">
                    <entity-order-by field-name="storeName"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="productCategoryId" title="${uiLabelMap.CommonCategory}" tooltip="${uiLabelMap.AccountingTaxAuthorityRateProductUseCategoryTab}" required-field="true">
            <drop-down allow-empty="false">
                <entity-options entity-name="TaxAuthorityCategoryView" description="${description} [${productCategoryId}]">
                    <entity-constraint name="taxAuthPartyId" env-name="taxAuthPartyId"/>
                    <entity-constraint name="taxAuthGeoId" env-name="taxAuthGeoId"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="titleTransferEnumId" title="${uiLabelMap.AccountingTitleTransfer}" position="2">
            <drop-down allow-empty="true">
                <entity-options entity-name="Enumeration" key-field-name="enumId" description="${description} [${enumCode}]">
                    <entity-constraint name="enumTypeId" value="PTSOFTTFR"/>
                    <entity-order-by field-name="sequenceId"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="minItemPrice"><text/></field>
        <field name="minPurchase" position="2"><text/></field>
        <field name="taxShipping">
            <drop-down allow-empty="false" no-current-selected-key="Y">
                <option key="Y" description="${uiLabelMap.CommonY}"/>
                <option key="N" description="${uiLabelMap.CommonN}"/>
            </drop-down>
        </field>
        <field name="taxPromotions" position="2">
            <drop-down allow-empty="false" no-current-selected-key="Y">
                <option key="Y" description="${uiLabelMap.CommonY}"/>
                <option key="N" description="${uiLabelMap.CommonN}"/>
            </drop-down>
        </field>
        <field name="taxPercentage" position="2"><text/></field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}"><date-time type="date"/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}" position="2"><date-time type="date"/></field>
        <field name="description"><textarea/></field>
        <field name="submitAction" title="${uiLabelMap.CommonAdd}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
    </form>

    <form name="FindTaxAuthorityParties" type="single" target="ListTaxAuthorityParties" title=""
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="taxAuthPartyId"><hidden/></field>
        <field name="taxAuthGeoId"><hidden/></field>
        <field name="noConditionFind"><hidden value="Y"/></field>

        <field name="partyId" title="${uiLabelMap.CommonParty}"><lookup target-form-name="LookupPartyName"/></field>
        <field name="partyTaxId" title="${uiLabelMap.PartyTaxId}" position="2"><text-find/></field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}"><date-find/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}" position="2"><date-find/></field>
        <field name="isExempt" widget-style="+smallSelect">
            <drop-down allow-empty="true"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down>
        </field>
        <field name="isNexus" widget-style="+smallSelect" position="2">
            <drop-down allow-empty="true"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down>
        </field>

        <field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}"><submit button-type="text-link"/></field>
    </form>
    <form name="ListTaxAuthorityParties" type="list" title="" list-name="listIt"
        odd-row-style="alternate-row" paginate-target="ListTaxAuthorityParties"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <actions>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="orderBy" value="partyId"/>
                <field-map field-name="entityName" value="PartyTaxAuthInfo"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <row-actions>
            <entity-one entity-name="PartyNameView" value-field="party"/>
            <entity-one entity-name="Party" value-field="taxAuthParty" auto-field-map="false">
                <field-map field-name="partyId" from-field="taxAuthPartyId"/>
            </entity-one>
            <entity-one entity-name="PartyGroup" value-field="taxAuthPartyGroup" auto-field-map="false">
                <field-map field-name="partyId" from-field="taxAuthPartyId"/>
            </entity-one>
            <entity-one entity-name="Geo" value-field="geo" auto-field-map="false">
                <field-map field-name="geoId" from-field="taxAuthGeoId"/>
            </entity-one>
        </row-actions>
        
        <field name="partyId" title="${uiLabelMap.CommonParty}" widget-style="${styles.link_nav_info_idname_long}">
            <!-- SCIPIO: TODO: REVIEW: there's no agreementId here, I don't know where this comes from...
            <hyperlink also-hidden="false" description="${party.groupName} ${party.firstName} ${party.lastName} [${partyId}]" target="EditAgreementItemParty">
                <parameter param-name="partyId"/>
                <parameter param-name="agreementId"/>
                <parameter param-name="agreementItemSeqId"/>
            </hyperlink>-->
            <!-- SCIPIO: also, better to link to edit here
            <hyperlink also-hidden="false" description="${party.groupName} ${party.firstName} ${party.lastName} [${partyId}]" target="/partymgr/control/viewprofile" target-type="inter-app">
                <parameter param-name="partyId"/>
            </hyperlink>-->
            <hyperlink target="EditTaxAuthorityPartyInfo" description="${party.groupName} ${party.firstName} ${party.lastName} [${partyId}]" also-hidden="false">
                <parameter param-name="taxAuthPartyId"/>
                <parameter param-name="taxAuthGeoId"/>
                <parameter param-name="partyId"/>
                <parameter param-name="fromDate"/>
            </hyperlink>
        </field>
        <field name="partyTaxId" title="${uiLabelMap.PartyTaxId}"><display/></field>
        <!-- SCIPIO: due to screen combining, these are implied now
        <field name="taxAuthPartyId">
             <hyperlink also-hidden="false" description="${taxAuthPartyId} - ${taxAuthPartyGroup.groupName}" target="/partymgr/control/viewprofile" target-type="inter-app">
                <parameter param-name="partyId" from-field="taxAuthPartyId"/>               
            </hyperlink>
        </field>
        <field name="taxAuthGeoId">
            <hyperlink also-hidden="false" description="${geo.geoName} [${geo.geoId}]" target="/partymgr/control/PartyGeoLocation" target-type="inter-app">
                <parameter param-name="partyId" from-field="taxAuthPartyId"/>
                <parameter param-name="geoId" from-field="taxAuthGeoId"/>               
            </hyperlink>
        </field> -->
        <field name="fromDate" title="${uiLabelMap.CommonFrom}"><display type="date"/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}"><display type="date"/></field>
        <field name="isExempt"><display/></field>
        <field name="isNexus"><display/></field>

        <!-- SCIPIO: now linked on username
        <field name="editAction" title=" " widget-style="${styles.link_nav} ${styles.action_update}">
            <hyperlink target="EditTaxAuthorityPartyInfo" description="${uiLabelMap.CommonEdit}" also-hidden="false">
                <parameter param-name="taxAuthPartyId"/>
                <parameter param-name="taxAuthGeoId"/>
                <parameter param-name="partyId"/>
                <parameter param-name="fromDate"/>
            </hyperlink>
        </field> -->
        <field name="deleteAction" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}">
            <hyperlink target="deleteTaxAuthorityPartyInfo" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                <parameter param-name="taxAuthPartyId"/>
                <parameter param-name="taxAuthGeoId"/>
                <parameter param-name="partyId"/>
                <parameter param-name="fromDate"/>
            </hyperlink>
        </field>
    </form>
    <form name="EditTaxAuthorityPartyInfo" type="single" target="updateTaxAuthorityPartyInfo" title="" default-map-name="partyTaxAuthInfo"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <entity-one entity-name="TaxAuthority" value-field="taxAuthority"/>
        </actions>
        <alt-target use-when="partyTaxAuthInfo==null" target="createTaxAuthorityPartyInfo"/>

        <!-- SCIPIO: NOTE: due to screen merging, only need to show the editable taxAuthGeoId & taxAuthPartyId if there was an error looking up the taxAuthority -->
        <field use-when="taxAuthority==null" name="taxAuthGeoId" title="${uiLabelMap.CommonGeo}" required-field="true">
            <!-- SCIPIO: too many entries
            <drop-down allow-empty="true">
                <entity-options entity-name="Geo" description="${geoName} [${geoId}]" key-field-name="geoId"></entity-options>
            </drop-down>-->
            <drop-down allow-empty="true">
                <entity-options entity-name="TaxAuthorityAndGeo" description="${geoName} [${geoId}]" key-field-name="geoId"></entity-options>
            </drop-down>
        </field>
        <field use-when="taxAuthority!=null" name="taxAuthGeoId" title="${uiLabelMap.CommonGeo}">
            <display-entity entity-name="Geo" description="${geoName} [${geoId}]" key-field-name="geoId" also-hidden="true"/>
        </field>
        <field use-when="taxAuthority==null" name="taxAuthPartyId" title="${uiLabelMap.AccountingTaxAuthorityParty}" required-field="true" position="2">
            <drop-down allow-empty="true">
                <entity-options entity-name="TaxAuthority" description="${taxAuthPartyId}"></entity-options>
            </drop-down>
        </field>
        <field use-when="taxAuthority!=null" name="taxAuthPartyId" title="${uiLabelMap.AccountingTaxAuthorityParty}" position="2">
            <display description="${taxAuthPartyId}" also-hidden="true"/>
        </field>

        <field use-when="partyTaxAuthInfo!=null" name="partyId" title="${uiLabelMap.CommonParty}">
            <display-entity entity-name="PartyNameView" description="${groupName} ${firstName} ${lastName}">
                <sub-hyperlink description="${partyId}" target="/partymgr/control/viewprofile" target-type="inter-app" link-style="${styles.link_nav_info_id}">
                    <parameter param-name="partyId"/>
                </sub-hyperlink>
            </display-entity>
        </field>
        <field use-when="partyTaxAuthInfo==null" name="partyId" title="${uiLabelMap.CommonParty}" required-field="true"><lookup target-form-name="LookupPartyName"/></field>
        
        <field name="partyTaxId" position="2"><text/></field>
        
        <field name="fromDate" title="${uiLabelMap.CommonFrom}" use-when="partyTaxAuthInfo!=null" ><display/></field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}" use-when="partyTaxAuthInfo==null"><date-time type="date"/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}" position="2"><date-time type="date"/></field>
        <field name="isExempt" widget-style="+smallSelect"><drop-down no-current-selected-key="N"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down></field>
        <field name="isNexus" widget-style="+smallSelect" position="2"><drop-down no-current-selected-key="N"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down></field>

        <field use-when="partyTaxAuthInfo!=null" name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="text-link"/></field>
        <field use-when="partyTaxAuthInfo==null" name="submitAction" title="${uiLabelMap.CommonCreate}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="text-link"/></field>
    </form>
</forms>