ilscipio/scipio-erp

View on GitHub
applications/accounting/widget/payments/PaymentForms.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="FindPayments" type="single" target="findPayments"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
        <field name="paymentId" title="${uiLabelMap.CommonId}" position="1"><text-find ignore-case="true"/></field>
        <field name="comments" position="2"><text-find ignore-case="true"/></field>
        <field name="paymentTypeId" title="${uiLabelMap.CommonType}" position="1">
            <drop-down allow-empty="true">
                <entity-options description="${description}" entity-name="PaymentType">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="statusId" title="${uiLabelMap.CommonStatus}" position="2">
            <drop-down allow-empty="true">
                <entity-options description="${description}" entity-name="StatusItem">
                    <entity-constraint name="statusTypeId" operator="equals" value="PMNT_STATUS"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field position="1" name="partyIdFrom"><lookup target-form-name="LookupPartyName"/></field>
        <field position="2" name="partyIdTo"><lookup target-form-name="LookupPartyName"/></field>
        <field position="1" name="amount"><text/></field>
        <field name="paymentRefNum" position="2"><text-find ignore-case="true"/></field>
        <field name="paymentGatewayResponseId" position="2"><text/></field>
        <field name="searchAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}"><submit button-type="button"/></field>
    </form>
    
    <form name="ListPayments" type="list" separate-columns="true" default-entity-name="Payment" list-name="listIt" paginate-target="findPayments" paginate="true"
        odd-row-style="alternate-row"> <!-- 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="entityName" value="PaymentAndTypeAndCreditCard"/>
                <field-map field-name="orderBy" value="effectiveDate DESC"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <row-actions>
            <set field="amountToApply" value="${groovy:org.ofbiz.accounting.payment.PaymentWorker.getPaymentNotApplied(delegator,paymentId);}"/>
            <entity-one entity-name="PartyNameView" value-field="partyFrom">
                <field-map field-name="partyId" value="${partyIdFrom}" />
            </entity-one>
            <entity-one entity-name="PartyNameView" value-field="partyTo">
                <field-map field-name="partyId" value="${partyIdTo}" />
            </entity-one>
        </row-actions>
        <field name="effectiveDate"><display type="date"/></field>
        <field name="paymentId" title="${uiLabelMap.CommonPayment}" widget-style="${styles.link_nav_info_id}">
            <hyperlink description="${paymentId}" target="paymentOverview">
                <parameter param-name="paymentId"/>
            </hyperlink>
        </field>
        <field name="statusId" title="${uiLabelMap.CommonStatus}" use-when="isReduced==false"><display-entity entity-name="StatusItem"/></field>
        <!--<field name="comments" use-when="isReduced==false"><display/></field> -->
        <field name="partyIdFrom" title="${uiLabelMap.AccountingFromParty}" use-when="isReduced==false" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="${partyFrom.groupName} ${partyFrom.firstName} ${partyFrom.lastName}">
                <parameter param-name="partyId" from-field="partyIdFrom"/>
            </hyperlink>
        </field>
        <!--
        <field name="partyIdTo" title="${uiLabelMap.AccountingToParty}" widget-style="${styles.link_nav_info_id}">
                <hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="${partyTo.groupName} ${partyTo.firstName} ${partyTo.lastName}">
                    <parameter param-name="partyId" from-field="partyIdTo"/>
                </hyperlink>
        </field>-->
        <!-- <field name="paymentTypeId" title="${uiLabelMap.CommonType}" use-when="isReduced==false"><display-entity entity-name="PaymentType"/></field> -->
        <field name="currencyUomId"><hidden/></field>
        <field name="amount" title="${uiLabelMap.CommonAmount}" widget-area-style="amount" title-area-style="align-right"><display also-hidden="false" type="currency" currency="${currencyUomId}"/></field>
        <!-- <field name="amountToApply" title="${uiLabelMap.CommonOutstanding}" widget-area-style="amount" title-area-style="align-right"><display also-hidden="false" type="currency" currency="${currencyUomId}"/></field> -->
    </form>
    
    
    <form name="ListPaymentsReduced" type="list" separate-columns="true" default-entity-name="Payment" list-name="listIt" paginate="false"
        odd-row-style="alternate-row" view-size="10"> <!-- 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="entityName" value="PaymentAndTypeAndCreditCard"/>
                <field-map field-name="orderBy" value="effectiveDate ASC"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <field name="paymentId" title="${uiLabelMap.CommonPayment}" widget-style="${styles.link_nav_info_id}">
                <hyperlink description="${paymentId}" target="paymentOverview">
                <parameter param-name="paymentId"/>
            </hyperlink>
        </field>
        <field name="partyIdFrom" title="${uiLabelMap.AccountingFromParty}">
            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName} ${firstName} ${lastName}"></display-entity>
        </field>
         <field name="effectiveDate"><display type="date"/></field>
         <field name="amount" title="${uiLabelMap.CommonAmount}" widget-area-style="amount" title-area-style="align-right"><display also-hidden="false" type="currency" currency="${currencyUomId}"/></field>
         <field name="amountToApply" title="${uiLabelMap.CommonOutstanding}" widget-area-style="amount" title-area-style="align-right"><display also-hidden="false" type="currency" currency="${currencyUomId}"/></field>
    </form>

    <form name="EditPaymentAttributes" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml">
        <field name="partyIdFrom"><lookup target-form-name="LookupPartyName"/></field>
        <field name="partyIdTo"><lookup target-form-name="LookupPartyName"/></field>
        <field name="statusId" title="${uiLabelMap.CommonStatus}" entry-name="attributeMap.statusId">
            <drop-down allow-empty="true">
                <entity-options description="${description}" entity-name="StatusItem" key-field-name="statusId">
                    <entity-constraint name="statusTypeId" operator="equals" value="PMNT_STATUS"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="saveAction" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit/></field>
    </form>

    <form name="NewPaymentOut" type="single" target="createPayment" default-map-name="payment"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <entity-condition entity-name="PaymentType" list="paymentTypes">
                <condition-list combine="or">
                    <condition-expr field-name="parentTypeId" operator="equals" value="DISBURSEMENT"/>
                    <condition-expr field-name="parentTypeId" operator="equals" value="TAX_PAYMENT"/>
                </condition-list>
                <order-by field-name="description"/>
            </entity-condition>
            <entity-one entity-name="PartyGroup" use-cache="true" value-field="partyGroup">
                <field-map field-name="partyId" from-field="parameters.partyIdFrom"/>
            </entity-one>
            <set field="partyGroupName" from-field="partyGroup.groupName"/>
            <set field="paymentPartyId" from-field="parameters.partyIdFrom" default-value="${defaultOrganizationPartyId}"/>
            <entity-condition entity-name="PaymentMethodAndFinAccount" list="paymentMethodAndFinAccounts">
                <condition-list>
                    <condition-expr field-name="partyId" from-field="paymentPartyId"/>
                    <condition-expr field-name="statusId" operator="not-equals" value="FNACT_MANFROZEN"/>
                    <condition-expr field-name="statusId" operator="not-equals" value="FNACT_CANCELLED"/>
                </condition-list>
            </entity-condition>
        </actions>
        <field name="statusId"><hidden value="PMNT_NOT_PAID"/></field>
        <field name="currencyUomId"><hidden value="${defaultOrganizationPartyCurrencyUomId}"/></field>
        <field position="1" name="organizationPartyId" title="${uiLabelMap.CommonFrom} ${uiLabelMap.CommonParty}" parameter-name="partyIdFrom" event="onchange" action="javascript:(document.NewPaymentOut.action = 'newPayment'),(document.NewPaymentOut.submit())">
            <drop-down allow-empty="false" no-current-selected-key="${defaultOrganizationPartyId}">
                <option key="${parameters.partyIdFrom}" description="${partyGroupName}"/>
                <entity-options description="${groupName}" entity-name="PartyAcctgPrefAndGroup" key-field-name="partyId">
                    <entity-order-by field-name="groupName"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="partyIdTo" title="${uiLabelMap.CommonTo} ${uiLabelMap.CommonParty}" position="2" required-field="true"><lookup target-form-name="LookupPartyName"/></field>
        <field name="paymentTypeId" title="${uiLabelMap.CommonType}" position="1" required-field="true">
            <drop-down allow-empty="false">
                <list-options list-name="paymentTypes" key-name="paymentTypeId" description="${description}"/>
            </drop-down>
        </field>
        <field name="paymentMethodId" title="${uiLabelMap.CommonMethod}" position="2">
            <drop-down allow-empty="false">
                <entity-options entity-name="PaymentMethod" description="${description}">
                    <entity-constraint name="partyId" operator="equals" env-name="defaultOrganizationPartyId"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="paymentRefNum" position="1"><text/></field>
        <field name="overrideGlAccountId" position="2"><lookup target-form-name="LookupGlAccount"/></field>
        <field name="amount" title="${uiLabelMap.CommonAmount}" position="1" required-field="true"><text/></field>
        <field name="comments" position="2"><text size="70"/></field>
        <field name="isDepositWithDrawPayment"><hidden value="Y"/></field>
        <field name="finAccountTransTypeId" required-field="true"><hidden value="WITHDRAWAL"/></field>
        <field position="1" name="createAction" widget-style="${styles.link_run_sys} ${styles.action_add}" title="${uiLabelMap.CommonCreate}">
            <submit button-type="button"/>
        </field>
    </form>
    <form name="NewPaymentIn" type="single" target="createPayment" default-map-name="payment"
        header-row-style="header-row" > <!-- orig: default-table-style=-style="basic-table" -->
        <field name="statusId"><hidden value="PMNT_NOT_PAID"/></field>
        <field name="currencyUomId"><hidden value="${defaultOrganizationPartyCurrencyUomId}"/></field>
        <field name="partyIdFrom" title="${uiLabelMap.CommonFrom} ${uiLabelMap.CommonParty}" required-field="true"><lookup target-form-name="LookupPartyName"/></field>
        <field name="organizationPartyId" title="${uiLabelMap.CommonTo} ${uiLabelMap.CommonParty}" parameter-name="partyIdTo" position="2">
            <drop-down allow-empty="false" no-current-selected-key="${defaultOrganizationPartyId}">
                <entity-options description="${groupName}" entity-name="PartyAcctgPrefAndGroup" key-field-name="partyId">
                    <entity-order-by field-name="groupName"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="paymentTypeId" title="${uiLabelMap.CommonType}" position="1" required-field="true">
            <drop-down allow-empty="false">
                <entity-options description="${description}" entity-name="PaymentType">
                    <entity-constraint name="parentTypeId" value="RECEIPT"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="paymentMethodId" title="${uiLabelMap.CommonMethod}" position="2">
            <drop-down allow-empty="false">
                <entity-options entity-name="PaymentMethod" description="${description}">
                    <entity-constraint name="partyId" operator="equals" env-name="defaultOrganizationPartyId"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="paymentRefNum" position="1"><text/></field>
        <field name="overrideGlAccountId" position="2"><lookup target-form-name="LookupGlAccount"/></field>
        <field name="amount" title="${uiLabelMap.CommonAmount}" position="1" required-field="true"><text/></field>
        <field name="comments" position="2"><text size="70"/></field>
        <field name="finAccountId" position="2">
            <drop-down allow-empty="true">
                <entity-options entity-name="FinAccount" description="${finAccountName} [${finAccountId}]" filter-by-date="true">
                    <entity-constraint name="finAccountTypeId" value="BANK_ACCOUNT"/>
                    <entity-constraint name="statusId" operator="not-equals" value="FNACT_MANFROZEN"/>
                    <entity-constraint name="statusId" operator="not-equals" value="FNACT_CANCELLED"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="isDepositWithDrawPayment"><hidden value="Y"/></field>
        <field name="finAccountTransTypeId"><hidden value="DEPOSIT"/></field>
        <field position="1" name="createAction" widget-style="${styles.link_run_sys} ${styles.action_add}" title="${uiLabelMap.CommonCreate}">
            <submit button-type="button"/>
        </field>
    </form>

    <form name="EditPayment" type="single" target="updatePayment" default-map-name="payment">
        <actions>
            <set field="isDisbursement" value="${groovy:org.ofbiz.accounting.util.UtilAccounting.isDisbursement(payment);}" type="Boolean"/>
        </actions>
        <field name="paymentId"><hidden/></field>
        <field name="paymentTypeId" title="${uiLabelMap.CommonType}" position="1">
            <drop-down allow-empty="false">
                <entity-options description="${description}" entity-name="PaymentType">
                    <entity-constraint name="parentTypeId" value="${groovy:isDisbursement==true?&quot;DISBURSEMENT&quot;:&quot;RECEIPT&quot;}"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="statusId" title="${uiLabelMap.CommonStatus}" position="2">
            <display-entity entity-name="StatusItem"/>
        </field>
        <field name="paymentMethodId" title="${uiLabelMap.CommonMethod}" position="2">
            <drop-down allow-empty="true">
                <entity-options  key-field-name="paymentMethodId" entity-name="PaymentMethod" description="${paymentMethodTypeId} (${paymentMethodId})">
                    <entity-constraint name="partyId" operator="equals" value="${groovy:isDisbursement==true?payment.partyIdFrom:payment.partyIdTo}"/>
                    <entity-order-by field-name="paymentMethodTypeId"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="partyIdFrom" title="${uiLabelMap.CommonFrom} ${uiLabelMap.CommonParty}" position="1"><lookup target-form-name="LookupPartyName"/></field>
        <field name="partyIdTo" title="${uiLabelMap.CommonTo} ${uiLabelMap.CommonParty}"  position="2"><lookup target-form-name="LookupPartyName"/></field>
        <field name="amount" title="${uiLabelMap.CommonAmount}" position="1"><text/></field>
        <field position="2" name="currencyUomId">
            <drop-down allow-empty="false" 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="actualCurrencyAmount" position="1" title="${uiLabelMap.AccountingActualCurrencyAmount}"><text/></field>
        <field name="actualCurrencyUomId" position="2" title="${uiLabelMap.AccountingActualCurrencyUomId}">
            <drop-down allow-empty="true">
                <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="effectiveDate" position="2"><date-time type="date"/></field>
        <field name="paymentRefNum" position="1"><text/></field>
        <field name="comments" position="2"><text/></field>
        <field name="paymentPreferenceId"><ignored/></field>
        <field name="paymentGatewayResponseId"><ignored/></field>
        <field name="finAccountTransId" position="1"><text/></field>
        <field name="overrideGlAccountId" position="2"><lookup target-form-name="LookupGlAccount"/></field>
        <field position="1" name="updateAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
    </form>

    <form name="editPaymentApplicationsInv" default-entity-name="PaymentApplication" list-name="paymentApplicationsInv" target="removePaymentApplication" type="list" separate-columns="false"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="paymentApplicationId"><hidden/></field>
        <field name="paymentId"><hidden/></field>
        <field name="invoiceId" title="${uiLabelMap.CommonInvoice}">
            <display-entity entity-name="Invoice" description="${description}">
                <sub-hyperlink target="invoiceOverview" description="[${invoiceId}]">
                    <parameter param-name="invoiceId"/>
                </sub-hyperlink>
            </display-entity>
        </field>
        <field name="invoiceItemSeqId"><display/></field>
        <field name="amountApplied"><display/></field>
        <field name="removeAction" widget-style="${styles.link_run_sys} ${styles.action_remove}"><submit/></field>
    </form>
    <form name="editPaymentApplicationsPay" default-entity-name="PaymentApplication" list-name="paymentApplicationsPay" target="removePaymentApplication" type="list" separate-columns="false"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="paymentApplicationId"><hidden/></field>
        <field name="paymentId"><hidden/></field>
        <field name="toPaymentId"><display/></field>
        <field name="amountApplied"><display/></field>
        <field name="removeAction" widget-style="${styles.link_run_sys} ${styles.action_remove}"><submit/></field>
    </form>
    <form name="editPaymentApplicationsBil" default-entity-name="PaymentApplication" list-name="paymentApplicationsBil" target="removePaymentApplication" type="list" separate-columns="false"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="paymentApplicationId"><hidden/></field>
        <field name="paymentId"><hidden/></field>
        <field name="billingAccountId"><display/></field>
        <field name="invoiceId"><hidden/></field>
        <field name="amountApplied"><display/></field>
        <field name="removeAction" title="${uiLabelMap.CommonRemove}" widget-style="${styles.link_run_sys} ${styles.action_remove}"><submit/></field>
    </form>
    <form name="editPaymentApplicationsTax" default-entity-name="PaymentApplication" list-name="paymentApplicationsTax" target="removePaymentApplication" type="list" separate-columns="false"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="paymentApplicationId"><hidden/></field>
        <field name="paymentId"><hidden/></field>
        <field name="taxAuthGeoId"><display/></field>
        <field name="amountApplied"><display/></field>
        <field name="removeAction" title="${uiLabelMap.CommonRemove}" widget-style="${styles.link_run_sys} ${styles.action_remove}"><submit/></field>
    </form>

    <form name="listInvoicesNotApplied" type="list" list-name="invoices" target="createPaymentApplication" title=""
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="paymentId"><hidden/></field>
        <field name="invoiceId" title="${uiLabelMap.CommonInvoice}" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="invoiceOverview" description="${invoiceId}">
                <parameter param-name="invoiceId"/>
            </hyperlink>
        </field>
        <field name="description"><display/></field>
        <field name="invoiceDate"><display type="date"/></field>
        <field name="amount" title="${uiLabelMap.CommonAmount}" widget-area-style="amount" title-area-style="align-right"><display type="currency" currency="${currencyUomId}"/></field>
        <field name="amountApplied" widget-area-style="amount" title-area-style="align-right" parameter-name="dummy"><display  type="currency" currency="${currencyUomId}"/></field>
        <field name="amountToApply" title="${uiLabelMap.CommonOutStanding}" widget-area-style="amount" title-area-style="align-right" parameter-name="amountApplied"><text size="10"/></field>
        <field name="invoiceProcessing" use-when="&quot;${uiConfigMap.invoiceProcessing}&quot;.equals(&quot;Y&quot;)"><check/></field>
        <field name="invoiceProcessing" use-when="&quot;${uiConfigMap.invoiceProcessing}&quot;.equals(&quot;N&quot;)"><check/></field>
        <field name="applyAction"  title="${uiLabelMap.CommonApply}" widget-style="${styles.link_run_sys} ${styles.action_update}">
            <submit button-type="button"/>
        </field>
    </form>

    <form name="listInvoicesNotAppliedOtherCurrency" extends="listInvoicesNotApplied" list-name="invoicesOtherCurrency"/>

    <form name="listPaymentsNotApplied" type="list" list-name="payments" target="createPaymentApplication" title=""
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="paymentId"><hidden/></field>
        <field name="toPaymentId" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="paymentOverview" description="[${toPaymentId}]">
                <parameter param-name="paymentId" from-field="toPaymentId"/>
            </hyperlink>
        </field>
        <field name="effectiveDate"><display/></field>
        <field name="amount" title="${uiLabelMap.CommonAmount}" widget-area-style="amount" title-area-style="align-right"><display  type="currency" currency="${currencyUomId}"/></field>
        <field name="amountApplied" widget-area-style="amount" title-area-style="align-right" parameter-name="dummy"><display  type="currency" currency="${currencyUomId}"/></field>
        <field name="amountToApply" title="${uiLabelMap.CommonOutstanding}" widget-area-style="amount" title-area-style="align-right" parameter-name="amountApplied"><text size="10"/></field>
        <field name="applyAction" title="${uiLabelMap.CommonApply}" widget-style="${styles.link_run_sys} ${styles.action_update}">
            <submit button-type="button"/>
        </field>
    </form>

    <form name="addPaymentApplication" type="single" target="createPaymentApplication" title=""
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="paymentId"><hidden/></field>
        <field name="invoiceId" title="${uiLabelMap.CommonInvoice}"><lookup target-form-name="LookupInvoice"/></field>
        <field name="invoiceItemSeqId" use-when="&quot;${uiConfigMap.invoiceProcessing}&quot;.equals(&quot;YY&quot;)"><text size="10"/></field>
        <field name="toPaymentId"><lookup target-form-name="LookupPayment"/></field>
        <field name="billingAccountId"><lookup target-form-name="LookupBillingAccount"/></field>
        <field name="taxAuthGeoId"><lookup target-form-name="LookupGeo"/></field>
        <field name="amountToApply" parameter-name="amountApplied" tooltip="${uiLabelMap.AccountingLeaveEmptyForMaximumAmount}"><text/></field>
        <field name="invoiceProcessing" use-when="&quot;${uiConfigMap.invoiceProcessing}&quot;.equals(&quot;Y&quot;)"><check/></field>
        <field name="invoiceProcessing" use-when="&quot;${uiConfigMap.invoiceProcessing}&quot;.equals(&quot;N&quot;)"><check/></field>
        <field name="applyAction"  title="${uiLabelMap.CommonApply}" widget-style="${styles.link_run_sys} ${styles.action_update}">
            <submit button-type="button"/>
        </field>
    </form>
    
    <form name="AcctgTransAndEntries" type="list" list-name="AcctgTransAndEntries"
        odd-row-style="alternate-row"> 
        <field name="invoiceId" title="${uiLabelMap.CommonInvoice}" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="invoiceOverview?invoiceId=${invoiceId}" description="${invoiceId}"/>
        </field>
        <field name="paymentId" title="${uiLabelMap.CommonPayment}" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="paymentOverview?paymentId=${paymentId}" description="${paymentId}"/>
        </field>
        <field name="amount" title="${uiLabelMap.CommonAmount}" widget-area-style="amount" title-area-style="align-right"><display type="currency" currency="${currencyUomId}"/></field>
        <field name="origAmount" widget-area-style="amount" title-area-style="align-right"><display type="currency" currency="${origCurrencyUomId}"/></field>
        <field name="acctgTransId" widget-style="${styles.link_nav_info_id}">
            <hyperlink description="${acctgTransId}" target="EditAcctgTrans?acctgTransId=${acctgTransId}&amp;organizationPartyId=${organizationPartyId}"/>
        </field>
        <field name="acctgTransTypeId" title="${uiLabelMap.CommonType}"><display-entity entity-name="AcctgTransType"/></field>
        <field name="glJournalId" title="${uiLabelMap.AccountingGlJournal}"><display-entity entity-name="GlJournal" description="${glJournalName}"/></field>
        <field name="glAccountTypeId" title="${uiLabelMap.FormFieldTitle_glAccountType}"><display-entity entity-name="GlAccountType"/></field>
        <field name="glAccountClassId" title="${uiLabelMap.AccountingGlAccountClass}"><display-entity entity-name="GlAccountClass" description="${description}"/></field>
        <field name="partyId" title="${uiLabelMap.PartyParty}"><display-entity entity-name="PartyNameView" description="${lastName} ${groupName}"/></field>
        <field name="reconcileStatusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
        <field name="origCurrencyUomId"><ignored/></field>
        <field name="currencyUomId"><ignored/></field>
        <field name="shipmentId"><ignored/></field>
        <field name="receiptId"><ignored/></field>
        <field name="inventoryItemId"><ignored/></field>
        <field name="workEffortId"><ignored/></field>
        <field name="physicalInventoryId"><ignored/></field>
        <field name="transDescription"><ignored/></field>
        <field name="paymentId"><hidden/></field>
        <sort-order>
            <sort-field name="acctgTransId"/>
            <sort-field name="acctgTransEntrySeqId"/>
        </sort-order>
    </form>
    
    
    <form name="ListChecksToPrint" type="multi" list-name="payments" target="printChecks" separate-columns="true"
        odd-row-style="alternate-row" target-window="_blank"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="paymentId" title="${uiLabelMap.CommonPayment}" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="paymentOverview" description="${paymentId}">
                <parameter param-name="paymentId"/>
            </hyperlink>
        </field>
        <field name="partyIdTo" title="${uiLabelMap.PartyPartyTo}">
          <display-entity description="${firstName} ${middleName} ${lastName} ${groupName}" entity-name="PartyNameView" key-field-name="partyId"/>
        </field>
        <field name="amount" title="${uiLabelMap.CommonAmount}" widget-area-style="amount"><display type="currency" currency="${currencyUomId}"/></field>
        <field name="effectiveDate"><display/></field>
        <field name="_rowSubmit" title="${uiLabelMap.CommonSelect}"><check/></field>
        <field name="submitAction" title="${uiLabelMap.CommonPrint}" widget-style="${styles.link_run_sys} ${styles.action_export}">
            <submit/>
        </field>
    </form>
    <form name="ListChecksToSend" type="multi" use-row-submit="true" list-name="payments" target="quickSendPayment?organizationPartyId=${organizationPartyId}" separate-columns="true"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <field name="paymentId"><hidden/></field>
        <field name="paymentId" title="${uiLabelMap.CommonPayment}" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="paymentOverview" description="${paymentId}">
                <parameter param-name="paymentId"/>
            </hyperlink>
        </field>
        <field name="partyIdTo" title="${uiLabelMap.PartyPartyTo}">
          <display-entity description="${firstName} ${middleName} ${lastName} ${groupName}" entity-name="PartyNameView" key-field-name="partyId"/>
        </field>
        <field name="amount" title="${uiLabelMap.CommonAmount}" widget-area-style="amount"><display type="currency" currency="${currencyUomId}"/></field>
        <field name="effectiveDate"><display/></field>
        <field name="paymentRefNum"><text/></field>
        <field name="_rowSubmit" title="${uiLabelMap.CommonSelect}"><check/></field>
        <field name="submitAction" title="${uiLabelMap.CommonSend}" widget-style="${styles.link_run_sys} ${styles.action_send}"><submit/></field>
    </form>

    <form name="FindSalesInvoicesByDueDate" type="single" target="FindSalesInvoicesByDueDate"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="invoiceTypeId"><hidden value="SALES_INVOICE"/></field>
        <field name="organizationPartyId" parameter-name="partyIdFrom">
            <drop-down allow-empty="false">
                <entity-options description="${partyId}" entity-name="PartyRole" key-field-name="partyId">
                    <entity-constraint name="roleTypeId" value="INTERNAL_ORGANIZATIO"/>
                    <entity-order-by field-name="partyId"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="partyId"><lookup target-form-name="LookupPartyName"/></field>
        <field name="daysOffset"><text default-value="0"/></field>
        <field name="searchAction" title="${uiLabelMap.CommonSelect}" widget-style="${styles.link_run_sys} ${styles.action_find}">
            <submit button-type="button"/>
        </field>
    </form>

    <form name="FindPurchaseInvoicesByDueDate" type="single" target="FindPurchaseInvoicesByDueDate"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="invoiceTypeId"><hidden value="PURCHASE_INVOICE"/></field>
        <field name="organizationPartyId" parameter-name="partyId">
            <drop-down allow-empty="false">
                <entity-options description="${partyId}" entity-name="PartyRole" key-field-name="partyId">
                    <entity-constraint name="roleTypeId" value="INTERNAL_ORGANIZATIO"/>
                    <entity-order-by field-name="partyId"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="partyIdFrom"><lookup target-form-name="LookupPartyName"/></field>
        <field name="daysOffset"><text default-value="0"/></field>
        <field name="searchAction" title="${uiLabelMap.CommonSelect}" widget-style="${styles.link_run_sys} ${styles.action_find}">
            <submit button-type="button"/>
        </field>
    </form>
    
    <form name="ListInvoicesByDueDate" type="list" list-name="invoicePaymentInfoList"
        odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
        <row-actions>
            <entity-one entity-name="Invoice" value-field="invoice" ></entity-one>
        </row-actions>
        <field name="invoiceId"  title="${uiLabelMap.CommonInvoice}" widget-style="${styles.link_nav_info_id}">
            <hyperlink target="invoiceOverview" description="${invoiceId}">
                <parameter param-name="invoiceId"/>
            </hyperlink>
        </field>
        <field name="termTypeId" title="${uiLabelMap.CommonTerm}">
            <display-entity entity-name="TermType" description="${description}"/>
        </field>
        <field name="dueDate" title="${uiLabelMap.CommonDue}"><display type="date"/></field>
        <field name="amount" title="${uiLabelMap.CommonAmount}" widget-area-style="amount" title-area-style="align-right"><display type="currency" currency="${invoice.currencyUomId}"/></field>
        <field name="paidAmount" title="${uiLabelMap.CommonPaid}" widget-area-style="amount" title-area-style="align-right"><display type="currency" currency="${invoice.currencyUomId}"/></field>
        <field name="outstandingAmount" title="${uiLabelMap.CommonOutstanding}" widget-area-style="amount" title-area-style="align-right"><display type="currency" currency="${invoice.currencyUomId}"/></field>
    </form>
    
    <!-- 
    *******************
    * Accounts Payable
    *******************
     -->
     

    
    <!-- 
    *******************
    * Accounts Receivable
    *******************
     -->
     
    <form name="FindBatchPayments" type="single" target="batchPayments">
        <actions>
            <set field="organizationPartyId" from-field="organizationPartyId" default-value="${defaultOrganizationPartyId}"/>
            <set field="noConditionFind" value="Y"/>
        </actions>
        <field name="paymentMethodTypeId" title="${uiLabelMap.FormFieldTitle_paymentMethodTypeId}">
            <drop-down allow-empty="true">
                <entity-options entity-name="PaymentMethodType" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="organizationPartyId"><hidden/></field>
        <field name="noConditionFind"><hidden/></field>
        <field name="cardType" tooltip="Select Credit Card from above list of Payment Method Types.">
            <drop-down allow-empty="true">
                <entity-options entity-name="Enumeration" description="${enumCode}" key-field-name="enumCode">
                    <entity-constraint name="enumTypeId" operator="equals" value="CREDIT_CARD_TYPE"/>
                    <entity-order-by field-name="enumId"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="partyIdFrom" title="${uiLabelMap.AccountingPartyIdFrom}">
            <lookup target-form-name="LookupCustomerName"/>
        </field> 
        <field name="fromDate"><date-time/></field>
        <field name="thruDate"><date-time/></field>
        <field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field>
    </form>
    <form name="FindBatchPaymentsForDepositSlip" target="NewDepositSlip" extends="FindBatchPayments" extends-resource="component://accounting/widget/payments/PaymentForms.xml">
        <field name="finAccountId"><hidden value="${finAccountId}"/></field>
    </form>
    <form name="FindArPayments" type="single" target="findArPayments" extends="FindPayments" extends-resource="component://accounting/widget/payments/PaymentForms.xml">
        <field name="parentTypeId"><hidden value="RECEIPT"/></field>
        <field name="paymentTypeId" title="${uiLabelMap.CommonType}" position="1">
            <drop-down allow-empty="true">
                <entity-options entity-name="PaymentType" description="${description}">
                    <entity-constraint name="parentTypeId" value="RECEIPT"/>
                </entity-options>
            </drop-down>
        </field>
    </form>
    <form name="FindArPaymentGroups" target="FindArPaymentGroups" extends="FindPaymentGroup" extends-resource="component://accounting/widget/payments/PaymentGroupForms.xml">
        <field name="paymentGroupTypeId"><hidden value="BATCH_PAYMENT"/></field>
    </form>
    
    <form name="FindGatewayResponses" type="single" target="FindGatewayResponses" title=""
        header-row-style="header-row" default-table-style="basic-table">
        <field name="paymentGatewayResponseId" title="${uiLabelMap.AccountingPaymentGatewayResponseId}">
            <text-find/>
        </field>
        <field name="paymentServiceTypeEnumId">
            <drop-down allow-empty="true">
                <entity-options entity-name="Enumeration" key-field-name="enumId">
                    <entity-constraint name="enumTypeId" operator="equals" value="PRDS_PAYSVC"/>
                    <entity-order-by field-name="sequenceId"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="orderPaymentPreferenceId" title="${uiLabelMap.AccountingOrderPaymentPreferenceId}">
            <text-find/>
        </field>
        <field name="paymentMethodTypeId">
            <drop-down allow-empty="true">
                <entity-options entity-name="PaymentMethodType" key-field-name="paymentMethodTypeId">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="transCodeEnumId">
            <drop-down allow-empty="true">
                <entity-options entity-name="Enumeration" key-field-name="enumId">
                    <entity-constraint name="enumTypeId" operator="equals" value="PGT_CODE"/>
                    <entity-order-by field-name="sequenceId"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="referenceNum">
            <text-find size="60" maxlength="60"/>
        </field>
        <field name="performSearch"><hidden value="Y"/></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="submitButton" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}">
            <submit button-type="button"/>
        </field>
    </form>
    
    <!-- Brings up a list of gateway responses. TODO: should cut down data displayd -->
    <form name="ListGatewayResponses" type="list" use-row-submit="true" target="" title="" list-name="listIt" paginate-target="FindGatewayResponses"
        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
        <actions>
            <set field="entityName" value="PaymentGatewayResponse"/>
            <set field="orderBy" value="transactionDate DESC"/>
            <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="orderBy"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <auto-fields-entity entity-name="PaymentGatewayResponse" default-field-type="display"/>
        <!-- note that this overrides auto-fields-entity -->
        <field name="paymentGatewayResponseId" widget-style="buttontext">
          <hyperlink description="${paymentGatewayResponseId}" target="ViewGatewayResponse">
                <parameter param-name="paymentGatewayResponseId"/>
            </hyperlink>
        </field>
        <field name="paymentServiceTypeEnumId">
            <display-entity entity-name="Enumeration" key-field-name="enumId"/>
        </field>
        <field name="paymentMethodTypeId">
            <display-entity entity-name="PaymentMethodType" key-field-name="paymentMethodTypeId"/>
        </field>
        <field name="transCodeEnumId">
            <display-entity entity-name="Enumeration" key-field-name="enumId"/>
        </field>
    </form>
    
    <!-- presents the orderId and orderPaymentPreferenceId for a gateway response with links to the order -->
    <form name="ViewGatewayResponseRelations" type="single" target="" title=""
        header-row-style="header-row" default-table-style="basic-table">
        <field name="orderId" widget-style="buttontext">
            <hyperlink description="${orderId}" target="/ordermgr/control/orderview" also-hidden="false" target-type="inter-app">
                <parameter param-name="orderId"/>
            </hyperlink>
        </field>
        <field name="orderPaymentPreferenceId"><display/></field>
    </form>
    <form name="ViewGatewayResponsePayments" type="list" list-name="payments" title="" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
        <field name="paymentId" widget-style="buttontext">
            <hyperlink description="${paymentId}" target="paymentOverview">
                <parameter param-name="paymentId"/>
            </hyperlink>
        </field>
        <field name="paymentTypeId" title="${uiLabelMap.AccountingPaymentType}"><display-entity entity-name="PaymentType"/></field>
        <field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem"/></field>
        <field name="comments"><display/></field>
        <field name="partyIdFrom" title="${uiLabelMap.AccountingFromParty}">
            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${lastName},${firstName}">
                <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="[${partyIdFrom}]" >
                    <parameter param-name="partyId" from-field="partyIdFrom"/>
                </sub-hyperlink>
            </display-entity>
        </field>
        <field name="partyIdTo" title="${uiLabelMap.AccountingToParty}">
            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${lastName},${firstName}">
                <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="[${partyIdTo}]" >
                    <parameter param-name="partyId" from-field="partyIdTo"/>
                </sub-hyperlink>
            </display-entity>
        </field>
        <field name="effectiveDate"><display/></field>
        <field name="currencyUomId"><hidden/></field>
        <field name="amount"><display also-hidden="false" type="currency" currency="${currencyUomId}"/></field>
    </form>


    <!-- displays the gateway response in detail -->
    <form name="ViewGatewayResponse" type="single" target="processCaptureTransaction" title="" default-map-name="paymentGatewayResponse"
        header-row-style="header-row" default-table-style="basic-table">
        <auto-fields-entity entity-name="PaymentGatewayResponse" default-field-type="display"/>
        <!-- TODO: what is the correct way to ensure that the response was authorized?
        <field name="submitButton" use-when="paymentGatewayResponse!=null&amp;&amp;paymentGatewayResponse.getString(&quot;gatewayFlag&quot;).equals(&quot;A&quot;)" title="${uiLabelMap.AccountingCapture}" widget-style="smallSubmit"><submit button-type="button"/></field>
        -->
        <field name="paymentServiceTypeEnumId">
            <display-entity entity-name="Enumeration" key-field-name="enumId"/>
        </field>
        <field name="paymentMethodTypeId">
            <display-entity entity-name="PaymentMethodType" key-field-name="paymentMethodTypeId"/>
        </field>
        <field name="transCodeEnumId">
            <display-entity entity-name="Enumeration" key-field-name="enumId"/>
        </field>
    </form>
    
    <!-- form for authorizing a transaction -->
    <form name="AuthorizeTransaction" type="single" target="processAuthorizeTransaction" title=""
        header-row-style="header-row-2" default-table-style="basic-table">
        <field name="orderId"><lookup target-form-name="LookupOrderHeader"/></field>
        <field name="orderPaymentPreferenceId"><lookup target-form-name="LookupOrderPaymentPreference"/></field>
        <field name="paymentMethodTypeId" title="${uiLabelMap.CommonPaymentMethodType}">
            <drop-down allow-empty="false">
                <entity-options entity-name="PaymentMethodType"/>
            </drop-down>
        </field>
        <field name="overrideAmount" title="${uiLabelMap.AccountingAmount}"><text/></field>
        <field name="submitButton" title="${uiLabelMap.AccountingAuthorize}" widget-style="smallSubmit"><submit button-type="button"/></field>
    </form>
    
    <!-- form for capturing a transaction -->
    <form name="CaptureTransaction" type="single" target="processCaptureTransaction" title=""
        header-row-style="header-row-2" default-table-style="basic-table">
        <field name="orderId"><lookup target-form-name="LookupOrderHeader"/></field>
        <field name="orderPaymentPreferenceId"><lookup target-form-name="LookupOrderPaymentPreference"/></field>
        <field name="paymentMethodTypeId" title="${uiLabelMap.CommonPaymentMethodType}">
            <drop-down allow-empty="false">
                <entity-options entity-name="PaymentMethodType"/>
            </drop-down>
        </field>
        <field name="paymentTypeId" title="${uiLabelMap.AccountingPaymentType}">
            <drop-down allow-empty="false">
                <entity-options entity-name="PaymentType" key-field-name="paymentTypeId">
                    <entity-constraint name="parentTypeId" operator="equals" value="RECEIPT"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="captureAmount" title="${uiLabelMap.AccountingAmount}"><text/></field>
        <field name="submitButton" title="${uiLabelMap.AccountingCapture}" widget-style="smallSubmit"><submit button-type="button"/></field>
    </form>
</forms>