You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ml...@apache.org on 2024/04/11 10:10:57 UTC
(ofbiz-framework) branch trunk updated: Implemented: Convert Invoice relation screen to dynamic Compound (OFBIZ-12994) (#746)
This is an automated email from the ASF dual-hosted git repository.
mleila pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new c7333c0c93 Implemented: Convert Invoice relation screen to dynamic Compound (OFBIZ-12994) (#746)
c7333c0c93 is described below
commit c7333c0c93940a8bfeaab78e282a447755be8ab8
Author: MLeila <ml...@apache.org>
AuthorDate: Thu Apr 11 12:10:51 2024 +0200
Implemented: Convert Invoice relation screen to dynamic Compound (OFBIZ-12994) (#746)
Implemented: Convert Invoice relation screen to dynamic Compound (OFBIZ-12994)
After the work on the task OFBIZ-11808, and the migration started for
workeffort screens on OFBIZ-12292, the purpose is to migrate all screen
linked to Invoice entity with idea to reduce the code and use widget
improvement developped last years
This migration cover invoice related screens from invoiceOverview to
managment screens and forms for each invoice sub item such as:
Applications
Attributes
ContactMech
Content
Item
Note
Role
Status
Term
TimeEntry
Thanks to Marie-Aline Pantais for her help
---
.../accounting/config/AccountingUiLabels.xml | 12 +
.../accounting/WEB-INF/accounting-controller.xml | 38 ++
.../webapp/accounting/WEB-INF/controller.xml | 4 +-
applications/accounting/widget/AccountingMenus.xml | 13 +-
applications/accounting/widget/CommonScreens.xml | 20 +
applications/accounting/widget/InvoiceForms.xml | 455 +----------------
applications/accounting/widget/InvoiceScreens.xml | 554 +--------------------
.../accounting/AccountingInvoiceApplicationCpd.xml | 379 ++++++++++++++
.../accounting/AccountingInvoiceAttributeCpd.xml | 73 +++
.../accounting/AccountingInvoiceContactMechCpd.xml | 76 +++
.../accounting/AccountingInvoiceContentCpd.xml | 73 +++
.../widget/accounting/AccountingInvoiceCpd.xml | 397 +++++++++++++++
.../widget/accounting/AccountingInvoiceItemCpd.xml | 431 ++++++++++++++++
.../widget/accounting/AccountingInvoiceNoteCpd.xml | 72 +++
.../widget/accounting/AccountingInvoiceRoleCpd.xml | 192 +++++++
.../accounting/AccountingInvoiceStatusCpd.xml | 73 +++
.../widget/accounting/AccountingInvoiceTermCpd.xml | 341 +++++++++++++
.../accounting/AccountingInvoiceTimeEntryCpd.xml | 206 ++++++++
themes/bluelight/webapp/bluelight/style.css | 5 +-
themes/flatgrey/webapp/flatgrey/javascript.css | 5 +-
.../webapp/rainbowstone/javascript.css | 5 +-
themes/tomahawk/webapp/tomahawk/css/style.css | 5 +-
22 files changed, 2440 insertions(+), 989 deletions(-)
diff --git a/applications/accounting/config/AccountingUiLabels.xml b/applications/accounting/config/AccountingUiLabels.xml
index af36538083..154d26a94e 100644
--- a/applications/accounting/config/AccountingUiLabels.xml
+++ b/applications/accounting/config/AccountingUiLabels.xml
@@ -7911,6 +7911,10 @@
<value xml:lang="zh">支付的币种[${paymentCurrencyId}]与发票明细的币种[${itemCurrency}]不同</value>
<value xml:lang="zh-TW">支付的幣種[${paymentCurrencyId}]與發票細項的幣種[${itemCurrency}]不同</value>
</property>
+ <property key="AccountingInvoiceItemsEdit">
+ <value xml:lang="en">Edit invoice Items</value>
+ <value xml:lang="fr">Modifier les lignes de facturation</value>
+ </property>
<property key="AccountingInvoiceItemSeqId">
<value xml:lang="ar">رقم البند</value>
<value xml:lang="de">Pos.Nr.</value>
@@ -8420,6 +8424,14 @@
<value xml:lang="zh">状态变为'注消'</value>
<value xml:lang="zh-TW">狀態變為'註銷'</value>
</property>
+ <property key="AccountingInvoiceTermsAdd">
+ <value xml:lang="en">Add due date rule</value>
+ <value xml:lang="fr">Ajouter une échéance</value>
+ </property>
+ <property key="AccountingInvoiceTermsEdit">
+ <value xml:lang="en">Edit due date rules</value>
+ <value xml:lang="fr">Modifier les échéances</value>
+ </property>
<property key="AccountingInvoiceTimeEntries">
<value xml:lang="ar">قيود وقتية</value>
<value xml:lang="cs">Časová evidence</value>
diff --git a/applications/accounting/webapp/accounting/WEB-INF/accounting-controller.xml b/applications/accounting/webapp/accounting/WEB-INF/accounting-controller.xml
new file mode 100644
index 0000000000..9cd16346b5
--- /dev/null
+++ b/applications/accounting/webapp/accounting/WEB-INF/accounting-controller.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://ofbiz.apache.org/Site-Conf" xsi:schemaLocation="http://ofbiz.apache.org/Site-Conf http://ofbiz.apache.org/dtds/site-conf.xsd">
+
+ <include location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
+ <include location="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml"/>
+ <include location="component://accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml"/>
+ <include location="component://accounting/widget/accounting/AccountingInvoiceContactMechCpd.xml"/>
+ <include location="component://accounting/widget/accounting/AccountingInvoiceContentCpd.xml"/>
+ <include location="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml"/>
+ <include location="component://accounting/widget/accounting/AccountingInvoiceNoteCpd.xml"/>
+ <include location="component://accounting/widget/accounting/AccountingInvoiceRoleCpd.xml"/>
+ <include location="component://accounting/widget/accounting/AccountingInvoiceStatusCpd.xml"/>
+ <include location="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml"/>
+ <include location="component://accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml"/>
+
+ <description>List Accounting compound files</description>
+
+</site-conf>
\ No newline at end of file
diff --git a/applications/accounting/webapp/accounting/WEB-INF/controller.xml b/applications/accounting/webapp/accounting/WEB-INF/controller.xml
index 8479378857..74ecafbc4f 100644
--- a/applications/accounting/webapp/accounting/WEB-INF/controller.xml
+++ b/applications/accounting/webapp/accounting/WEB-INF/controller.xml
@@ -22,6 +22,8 @@ under the License.
xmlns="http://ofbiz.apache.org/Site-Conf" xsi:schemaLocation="http://ofbiz.apache.org/Site-Conf http://ofbiz.apache.org/dtds/site-conf.xsd">
<include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
<include location="component://commonext/webapp/WEB-INF/controller.xml"/>
+ <include location="component://accounting/webapp/accounting/WEB-INF/accounting-controller.xml"/>
+
<description>Accounting Manager Module Site Configuration File</description>
<!-- Events to run on every request before security (chains exempt) -->
@@ -2640,7 +2642,7 @@ under the License.
<view-map name="BillingAccountOrders" type="screen" page="component://accounting/widget/BillingAccountScreens.xml#BillingAccountOrders"/>
<!-- Invoice -->
- <view-map name="invoiceOverview" type="screen" page="component://accounting/widget/InvoiceScreens.xml#invoiceOverview"/>
+ <view-map name="invoiceOverview" type="screen" page="component://accounting/widget/InvoiceScreens.xml#InvoiceOverview"/>
<view-map name="findInvoices" type="screen" page="component://accounting/widget/InvoiceScreens.xml#FindInvoices"/>
<view-map name="newInvoice" type="screen" page="component://accounting/widget/InvoiceScreens.xml#NewInvoice"/>
<view-map name="editInvoice" type="screen" page="component://accounting/widget/InvoiceScreens.xml#EditInvoice"/>
diff --git a/applications/accounting/widget/AccountingMenus.xml b/applications/accounting/widget/AccountingMenus.xml
index 2604efa099..4bcbed2285 100644
--- a/applications/accounting/widget/AccountingMenus.xml
+++ b/applications/accounting/widget/AccountingMenus.xml
@@ -52,7 +52,7 @@ under the License.
<menu-item name="GlobalGLSettings" title="${uiLabelMap.AccountingGlobalGLSettings}"><link target="globalGLSettings"/></menu-item>
<menu-item name="companies" title="${uiLabelMap.AccountingOrgGlSettings}"><link target="ListCompanies"/></menu-item>
</menu>
- <menu name="MainActionMenu" menu-container-style="button-bar button-style-2" default-selected-style="selected">
+ <menu name="MainActionMenu" menu-container-style="button-bar button-style-2" default-selected-style="selected">
<menu-item name="NewGLTransaction" title="${uiLabelMap.CommonCreate} ${uiLabelMap.GlTransaction}">
<condition>
<or>
@@ -69,7 +69,11 @@ under the License.
<if-has-permission permission="ACCOUNTING" action="_CREATE"/>
</or>
</condition>
- <link target="newInvoice"/>
+ <link target="Accounting/Invoice/New" link-type="layered-modal">
+ <set-callback area-target="invoiceOverview" area-id="window">
+ <parameter param-name="invoiceId" from-event-result="invoiceId"/>
+ </set-callback>
+ </link>
</menu-item>
<menu-item name="NewPayment" title="${uiLabelMap.CommonCreate} ${uiLabelMap.CommonPayment}">
<condition>
@@ -289,8 +293,11 @@ under the License.
</or>
</and>
</condition>
- <link target="editInvoice">
+ <link target="Accounting/Invoice/Edit" link-type="layered-modal">
<parameter param-name="invoiceId" from-field="invoice.invoiceId"/>
+ <set-callback area-target="invoiceOverview" area-id="window">
+ <parameter param-name="invoiceId" from-field="invoice.invoiceId"/>
+ </set-callback>
</link>
</menu-item>
<menu-item name="copyInvoice" title="${uiLabelMap.CommonCopy}">
diff --git a/applications/accounting/widget/CommonScreens.xml b/applications/accounting/widget/CommonScreens.xml
index ddfed56367..cb935affda 100644
--- a/applications/accounting/widget/CommonScreens.xml
+++ b/applications/accounting/widget/CommonScreens.xml
@@ -342,4 +342,24 @@ under the License.
</widgets>
</section>
</screen>
+
+ <screen name="CommonEmbeddedDecorator">
+ <section>
+ <actions>
+ <property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>
+ <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
+ <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
+ <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+ <property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
+ <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+ <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
+ <property-map resource="TemporalExpressionUiLabels" map-name="uiLabelMap" global="true"/>
+ <property-map resource="AccountingEntityLabels" map-name="uiLabelMap" global="true"/>
+ </actions>
+ <widgets>
+ <include-screen name="EmbeddedDecorator" location="component://common/widget/CommonScreens.xml"/>
+ </widgets>
+ </section>
+ </screen>
+
</screens>
diff --git a/applications/accounting/widget/InvoiceForms.xml b/applications/accounting/widget/InvoiceForms.xml
index 5342386898..91e972d337 100644
--- a/applications/accounting/widget/InvoiceForms.xml
+++ b/applications/accounting/widget/InvoiceForms.xml
@@ -20,6 +20,7 @@ under the License.
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
+
<!-- Invoice forms -->
<form name="FindInvoices" type="single" target="findInvoices" title="Find and list invoices" default-map-name="parameters"
header-row-style="header-row" default-table-style="basic-table">
@@ -32,7 +33,7 @@ under the License.
</drop-down>
</field>
<field name="statusId">
- <drop-down allow-multiple="true">
+ <drop-down allow-multiple="true" size="8">
<entity-options entity-name="StatusItem" key-field-name="statusId">
<entity-constraint name="statusTypeId" operator="equals" value="INVOICE_STATUS"/>
<entity-order-by field-name="sequenceId"/>
@@ -96,131 +97,17 @@ under the License.
<field name="amountToApply" widget-area-style="align-text"><display type="currency" currency="${currencyUomId}"/></field>
</grid>
- <form name="InvoiceHeader" type="single" title="Invoice header information" default-map-name="invoice"
- header-row-style="header-row" default-table-style="basic-table">
- <actions>
- <set field="total" value="${groovy:return(org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice));}"/>
- <service service-name="getPartyNameForDate" result-map="partyNameResultFrom">
- <field-map field-name="partyId" from-field="invoice.partyIdFrom"/>
- <field-map field-name="compareDate" from-field="invoice.invoiceDate"/>
- <field-map field-name="lastNameFirst" value="Y"/>
- </service>
- <service service-name="getPartyNameForDate" result-map="partyNameResultTo">
- <field-map field-name="partyId" from-field="invoice.partyId"/>
- <field-map field-name="compareDate" from-field="invoice.invoiceDate"/>
- <field-map field-name="lastNameFirst" value="Y"/>
- </service>
- </actions>
- <field name="invoiceId"><hidden/></field>
- <field position="1" name="invoiceTypeId"><display-entity entity-name="InvoiceType"/></field>
- <field name="statusId" title="${uiLabelMap.CommonStatus}" position="2"><display-entity entity-name="StatusItem"/></field>
- <field position="1" name="description"><display/></field>
- <field position="2" name="invoiceMessage"><display/></field>
- <field position="1" name="partyIdFrom">
- <hyperlink description="${partyNameResultFrom.fullName} [${invoice.partyIdFrom}]" target="/partymgr/control/viewprofile" target-type="inter-app">
- <parameter param-name="partyId" from-field="invoice.partyIdFrom"/>
- </hyperlink>
- </field>
- <field position="2" name="partyIdTo" entry-name="partyId">
- <hyperlink description="${partyNameResultTo.fullName} [${invoice.partyId}]" target="/partymgr/control/viewprofile" target-type="inter-app">
- <parameter param-name="partyId" from-field="invoice.partyId"/>
- </hyperlink>
- </field>
- <field position="1" name="roleTypeId"><display/></field>
- <field position="2" name="billingAccountId"><display/></field>
- <field position="1" name="invoiceDate"><display description="${groovy:if(invoice.get("invoiceDate")!=null)return(invoice.getString("invoiceDate").substring(0,10));}"/></field>
- <field position="2" name="dueDate"><display description="${groovy:if(invoice.get("dueDate")!=null)return(invoice.getString("dueDate").substring(0,10));}"/></field>
- <field position="1" name="total"><display description="${total}" type="currency" currency="${invoice.currencyUomId}"/></field>
- <field position="2" name="paidDate"><display description="${groovy:if(invoice.get("paidDate")!=null)return(invoice.getString("paidDate").substring(0,10));}"/></field>
- <field position="1" name="referenceNumber" title="${uiLabelMap.FormFieldTitle_referenceNum}"><display/></field>
- <field name="currencyUomId"><hidden/></field>
- </form>
- <grid name="InvoiceAttributes" list-name="invoiceAttributes" paginate-target="invoiceAttributes"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <auto-fields-entity entity-name="InvoiceAttribute" default-field-type="display"/>
- </grid>
- <grid name="InvoiceContactMech" list-name="invoiceContactMechList" paginate-target="invoiceContactMech"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <row-actions>
- <entity-one entity-name="ContactMechDetail" value-field="contactMechDetail"/>
- </row-actions>
- <auto-fields-entity entity-name="InvoiceContactMech" default-field-type="display"/>
- <field name="contactMechDetail" title="${uiLabelMap.FormFieldTitle_cmDetail}"><display/></field>
- </grid>
- <grid name="InvoiceContent" list-name="invoiceContentList" paginate-target="invoiceContent"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <auto-fields-entity entity-name="InvoiceContent" default-field-type="display"/>
- </grid>
- <grid name="InvoiceNotes" list-name="invoiceNotesList" paginate-target="invoiceNotes"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <auto-fields-entity entity-name="InvoiceNote" default-field-type="display"/>
- </grid>
- <grid name="InvoiceItems" list-name="invItemAndOrdItems" separate-columns="true" paginate-target="invoiceOverview"
+ <grid name="ListCustomerInvoices" extends="ListInvoices" list-name="invoices"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <row-actions>
- <set field="quantity" value="${groovy: quantity ?: 1}" type="BigDecimal"/>
- <set field="total" value="${groovy: quantity * amount ?: 0}" type="BigDecimal"/>
- </row-actions>
- <auto-fields-entity entity-name="InvoiceItem" default-field-type="display"/>
- <field name="invoiceId"><hidden/></field>
- <field name="invoiceItemSeqId"><display/></field>
- <field name="invoiceItemTypeId"><display-entity entity-name="InvoiceItemType"/></field>
- <field name="orderId" widget-style="linktext">
- <hyperlink description="${orderId}" target="/ordermgr/control/orderview" target-type="inter-app">
- <parameter param-name="orderId"/>
- </hyperlink>
- </field>
- <field name="orderItemSeqId" widget-area-style="align-text"><display/></field>
- <field name="inventoryItemId" widget-area-style="align-text"><display/></field>
- <field name="quantity" widget-area-style="align-text"><display/></field>
- <field name="amount" title="${uiLabelMap.AccountingUnitPrice}" widget-area-style="align-text"><display type="currency" currency="${invoice.currencyUomId}"/></field>
- <field name="total"><display type="currency" currency="${invoice.currencyUomId}"/></field>
- <field name="productId" widget-style="linktext">
- <hyperlink description="${productId}" target="/catalog/control/EditProduct" target-type="inter-app">
- <parameter param-name="productId"/>
- </hyperlink>
- </field>
- <field name="overrideGlAccountId" widget-area-style="align-text">
- <hyperlink description="${overrideGlAccountId}" target="GlAccountNavigate">
- <parameter param-name="glAccountId" from-field="overrideGlAccountId"/>
- </hyperlink>
- </field>
+ <field name="partyIdFrom"><ignored/></field>
+ <field name="partyIdTo"><ignored/></field>
</grid>
- <grid name="InvoiceRoles" list-name="invoiceRoles" paginate-target="invoiceRoles" use-row-submit="true"
+ <grid name="ListSupplierInvoices" extends="ListInvoices" list-name="invoiceslistexternal"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <!--auto-fields-entity entity-name="InvoiceRole" default-field-type="display"/-->
- <field name="invoiceId"><hidden/></field>
- <field name="partyId" widget-style="buttontext">
- <hyperlink description="${partyId}" target-type="inter-app" target="/partymgr/control/viewprofile">
- <parameter param-name="partyId"/>
- </hyperlink>
- </field>
- <field name="name" entry-name="partyId">
- <display-entity also-hidden="false" entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${firstName} ${lastName}"/>
- </field>
- <field name="roleTypeId">
- <display-entity also-hidden="false" entity-name="RoleType"/>
- </field>
- <field name="percentage"><display/></field>
- <field name="datetimePerformed"><display/></field>
- </grid>
- <grid name="ListInvoiceApplications" list-name="invoiceApplications" default-entity-name="InvoiceItem" use-row-submit="true"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
- target="updatePaymentApplication" title="Apply payments to invoices" separate-columns="false">
- <field name="invoiceItemSeqId"><display/></field>
- <field name="productId"><display/></field>
- <field name="description" encode-output="false"><display/></field>
- <field name="total" widget-area-style="align-text"><display type="currency" currency="${invoice.currencyUomId}"/></field>
- <field name="invoiceId"><hidden/></field>
- <field name="paymentId" widget-style="linktext">
- <hyperlink description="${paymentId}" target="paymentOverview">
- <parameter param-name="paymentId"/>
- </hyperlink>
- </field>
- <field name="billingAccountId"><hidden/></field>
- <field name="paymentApplicationId"><hidden/></field>
- <field name="amountApplied" widget-area-style="align-text"><display type="currency" currency="${invoice.currencyUomId}"/></field>
+ <field name="partyIdFrom"><ignored/></field>
+ <field name="partyIdTo"><ignored/></field>
</grid>
+
<grid name="AcctgTransAndEntries" list-name="acctgTransAndEntries"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<auto-fields-entity entity-name="AcctgTransAndEntries" default-field-type="display"/>
@@ -279,6 +166,7 @@ under the License.
<submit button-type="button"/>
</field>
</form>
+
<form name="NewPurchaseInvoice" type="single" target="createInvoice" title="Edit Invoice Header" default-map-name="invoice"
header-row-style="header-row" default-table-style="basic-table">
<actions>
@@ -371,260 +259,6 @@ under the License.
</field>
</form>
- <form name="EditInvoiceItems" type="multi" list-name="invoiceItems" default-entity-name="InvoiceItem" target="updateInvoiceItem?invoiceId=${invoiceId}&viewSize=${viewSize}&viewIndex=${viewIndex}" title="Edit Invoice Items" paginate-target="listInvoiceItems"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true">
- <row-actions>
- <set field="total" value="${groovy: (quantity ?: 1) * (amount ?: 0)}" type="BigDecimal"/>
- </row-actions>
- <field name="viewSize"><hidden value="${viewSize}"/></field>
- <field name="viewIndex"><hidden value="${viewIndex}"/></field>
- <field name="invoiceId"><hidden/></field>
- <field name="uomId"><hidden/></field>
- <field name="taxableFlag"><hidden/></field>
- <field name="invoiceItemSeqId" widget-style="buttontext">
- <hyperlink target="listInvoiceItems" description="${invoiceItemSeqId}">
- <parameter param-name="invoiceId"/>
- <parameter param-name="invoiceItemSeqId"/>
- </hyperlink>
- </field>
- <field name="quantity"><text size="10"/></field>
- <field name="invoiceItemTypeId">
- <drop-down allow-empty="false">
- <list-options list-name="invoiceItemTypes" key-name="invoiceItemTypeId" description="${groovy:uiLabelMap.get('InvoiceItemType.description.'+invoiceItemTypeId)}"/>
- </drop-down>
- </field>
- <field name="productId"><lookup target-form-name="LookupProduct" size="20"/></field>
- <field name="description"><text size="50"/></field>
- <field name="overrideGlAccountId">
- <drop-down allow-empty="true">
- <list-options list-name="glAccountOrganizationAndClassList" key-name="glAccountId" description="${glAccountId} ${accountName}"/>
- </drop-down>
- </field>
- <field name="amount" title="${uiLabelMap.AccountingUnitPrice}"><text size="10"/></field>
- <field name="total" widget-area-style="align-text"><display type="currency" currency="${invoice.currencyUomId}"/></field> <!-- this should not look like something you can modify, hence display -->
- <field name="updateButton" title="${uiLabelMap.CommonUpdate}" widget-style="buttontext" ><submit button-type="text-link"/></field>
- <field name="removeButton" title=" " widget-style="buttontext">
- <hyperlink description="${uiLabelMap.CommonRemove}" target="removeInvoiceItem">
- <parameter param-name="invoiceId"/>
- <parameter param-name="invoiceItemSeqId"/>
- <parameter param-name="viewIndex"/>
- <parameter param-name="viewSize"/>
- </hyperlink>
- </field>
- </form>
-
- <form name="EditInvoiceItem" type="single" target="createInvoiceItem" title="" default-map-name="invoiceItem" default-entity-name="InvoiceItem"
- header-row-style="header-row" default-table-style="basic-table">
- <field name="invoiceId"><hidden/></field>
- <field position="1" name="invoiceItemTypeId">
- <drop-down allow-empty="false">
- <list-options list-name="invoiceItemTypes" key-name="invoiceItemTypeId" description="${groovy:uiLabelMap.get('InvoiceItemType.description.'+invoiceItemTypeId)}"/>
- </drop-down>
- </field>
- <field position="1" name="description"><text size="80"/></field>
- <field position="1" name="overrideGlAccountId">
- <drop-down allow-empty="true">
- <list-options list-name="glAccountOrganizationAndClassList" key-name="glAccountId" description="${glAccountId} ${accountName}"/>
- </drop-down>
- </field>
- <field position="2" name="inventoryItemId"><text/></field>
- <field position="1" name="productId">
- <lookup target-form-name="LookupProduct"/>
- </field>
- <field position="2" name="productFeatureId">
- <lookup target-form-name="LookupProductFeature"/>
- </field>
- <field position="1" name="quantity"><text size="10"/></field>
- <field position="2" name="uomId">
- <drop-down allow-empty="true">
- <entity-options key-field-name="uomId" description="${description} - ${abbreviation}" entity-name="Uom">
- <entity-constraint name="uomTypeId" operator="not-equals" value="CURRENCY_MEASURE"/>
- <entity-order-by field-name="description"/>
- </entity-options>
- </drop-down>
- </field>
- <field position="1" name="amount" title="${uiLabelMap.AccountingUnitPrice}"><text size="10"/></field>
- <field position="2" name="taxableFlag">
- <drop-down allow-empty="false" current="selected">
- <option key="Y" description="${uiLabelMap.CommonYes}"/>
- <option key="N" description="${uiLabelMap.CommonNo}"/>
- </drop-down>
- </field>
- <field name="addButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit" use-when="invoiceItem==null">
- <submit button-type="button"/>
- </field>
- <field name="updateButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit" use-when="invoiceItem!=null">
- <submit button-type="button"/>
- </field>
- </form>
- <grid name="ListInvoiceStatus" list-name="invoiceStatus" paginate-target="ListInvoiceStatus"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <field name="invoiceId"><hidden/></field>
- <field name="statusDate"><display description="${groovy:statusDate.toString().substring(0,10)}"/></field>
- <field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem"/></field>
- <field name="changeByUserLoginId"><display /></field>
- </grid>
- <grid name="ListInvoiceTerms" list-name="invoiceTerms"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <auto-fields-entity entity-name="InvoiceTerm" default-field-type="display"/>
- <field name="invoiceId"><hidden/></field>
- <field name="invoiceTermId"><display/></field>
- <field name="termTypeId">
- <display-entity entity-name="TermType"/>
- </field>
- <field name="termDays" widget-area-style="align-right" title-area-style="align-right">
- <display/>
- </field>
- <field name="uomId" title="${uiLabelMap.Uom}">
- <display-entity entity-name="Uom"/>
- </field>
- <field name="edit" title="" widget-style="buttontext">
- <hyperlink description="${uiLabelMap.CommonEdit}" target="editInvoiceTerm" also-hidden="false">
- <parameter param-name="invoiceTermId"/>
- <parameter param-name="invoiceId"/>
- </hyperlink>
- </field>
- <field name="delete" title="" widget-style="buttontext">
- <hyperlink description="${uiLabelMap.CommonDelete}" target="deleteInvoiceTerm" also-hidden="false">
- <parameter param-name="invoiceTermId"/>
- <parameter param-name="invoiceId"/>
- </hyperlink>
- </field>
- </grid>
- <grid name="InvoiceTerms" list-name="invoiceTerms"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <field name="invoiceId"><hidden/></field>
- <field name="invoiceItemSeqId" title="${uiLabelMap.CommonItem}"><display/></field>
- <field name="invoiceTermId"><display/></field>
- <field name="termTypeId" title="${uiLabelMap.CommonType}">
- <display-entity entity-name="TermType"/>
- </field>
- <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field>
- <field name="termDays" title="${uiLabelMap.CommonDays}" widget-area-style="align-right" title-area-style="align-right">
- <display/>
- </field>
- <field name="termValue" title="${uiLabelMap.CommonValue}" widget-area-style="align-right" title-area-style="align-right">
- <display type="currency" currency="${uomId}"/>
- </field>
- <field name="uomId" title="${uiLabelMap.CommonCurrency}">
- <display-entity entity-name="Uom"/>
- </field>
- <field name="textValue" title="${uiLabelMap.CommonText}"><display/></field>
- </grid>
-
- <form name="EditInvoiceTerm" type="single" target="createInvoiceTerm" title=""
- header-row-style="header-row" default-table-style="basic-table" default-map-name="invoiceTerm" default-entity-name="InvoiceTerm" >
- <alt-target use-when="invoiceTerm!=null" target="updateInvoiceTerm"/>
- <auto-fields-entity entity-name="InvoiceTerm"/>
- <field name="invoiceId"><hidden/></field>
- <field name="termTypeId">
- <drop-down>
- <entity-options entity-name="TermType">
- <entity-order-by field-name="description"/>
- </entity-options>
- </drop-down>
- </field>
- <field name="description"><textarea/></field>
- <field name="uomId" title="${uiLabelMap.Uom}">
- <drop-down allow-empty="true">
- <entity-options key-field-name="uomId" description="${description} - ${abbreviation}" entity-name="Uom">
- <entity-order-by field-name="description"/>
- </entity-options>
- </drop-down>
- </field>
- <field name="submitButton" widget-style="smallSubmit"><submit button-type="button"/></field>
- </form>
- <grid name="EditInvoiceApplications" list-name="invoiceApplications" default-entity-name="InvoiceItem" use-row-submit="true" target="updateInvoiceApplication" separate-columns="true"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <field name="statusId"><hidden/></field>
- <field name="paymentApplicationId"><hidden/></field>
- <field name="invoiceItemSeqId"><display/></field>
- <field name="productId"><display/></field>
- <field name="description"><display/></field>
- <field name="total"><display type="currency" currency="${invoice.currencyUomId}"/></field>
- <field name="invoiceId"><hidden/></field>
- <field name="paymentId"><lookup target-form-name="LookupPayment"/></field>
- <field name="billingAccountId"><hidden/></field>
- <field name="amountToApply" disabled="true"><text size="10"/></field>
- <field name="updateButton" title="${uiLabelMap.CommonUpdate}" widget-style="buttontext"><submit button-type="text-link"/></field>
- <field name="removeButton" title=" " widget-style="buttontext" use-when="paymentApplicationId!=null">
- <hyperlink description="${uiLabelMap.CommonRemove}" target="removeInvoiceApplication">
- <parameter param-name="paymentApplicationId"/>
- <parameter param-name="invoiceId"/>
- <parameter param-name="viewIndex"/>
- <parameter param-name="viewSize"/>
- </hyperlink>
- </field>
- </grid>
- <form name="AddPayment" type="single" target="updateInvoiceApplication" title=""
- header-row-style="header-row" default-table-style="basic-table">
- <field name="invoiceId"><hidden/></field>
- <field name="paymentId"><lookup target-form-name="LookupPayment"/></field>
- <field name="amountToApply" parameter-name="amountApplied"><text size="10"/></field>
- <field name="invoiceProcessing" use-when=""${uiConfigMap.invoiceProcessing}".equals("Y")"><check/></field>
- <field name="applyButton" widget-style="smallSubmit">
- <submit button-type="button"/>
- </field>
- </form>
- <grid name="ListPaymentsNotApplied" list-name="payments" target="updateInvoiceApplication"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <field name="invoiceId"><hidden/></field>
- <field name="paymentId" widget-style="buttontext">
- <hyperlink description="[${paymentId}]" target="paymentOverview">
- <parameter param-name="paymentId"/>
- </hyperlink>
- </field>
- <field name="amount"><display type="currency" currency="${currencyUomId}"/></field>
- <field name="effectiveDate"><display type="date"/></field>
- <field name="amountApplied" parameter-name="dummy"><display type="currency" currency="${currencyUomId}"/></field>
- <field name="amountToApply" parameter-name="amountApplied"><text size="10"/></field>
- <field name="applyButton" widget-style="smallSubmit">
- <submit button-type="button"/>
- </field>
- </grid>
- <grid name="ListPaymentsNotAppliedForeignCurrency" extends="ListPaymentsNotApplied" list-name="paymentsActualCurrency"/>
- <grid name="ListInvoiceRoles" list-name="invoiceRoles" use-row-submit="true" paginate-target="invoiceRoles"
- odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
- <!--auto-fields-entity entity-name="InvoiceRole" default-field-type="display"/-->
- <field name="invoiceId"><hidden/></field>
- <field name="partyId" widget-style="buttontext">
- <hyperlink description="${partyId}" target-type="inter-app" target="/partymgr/control/viewprofile">
- <parameter param-name="partyId"/>
- </hyperlink>
- </field>
- <field name="name" entry-name="partyId">
- <display-entity also-hidden="false" entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${firstName} ${lastName}"/>
- </field>
- <field name="roleTypeId">
- <display-entity also-hidden="false" entity-name="RoleType"/>
- </field>
- <field name="percentage"><display/></field>
- <field name="datetimePerformed"><display/></field>
- <field name="removeButton" widget-style="buttontext">
- <hyperlink description="${uiLabelMap.CommonRemove}" target="removeInvoiceRole">
- <parameter param-name="invoiceId"/>
- <parameter param-name="partyId"/>
- <parameter param-name="roleTypeId"/>
- <parameter param-name="viewIndex"/>
- <parameter param-name="viewSize"/>
- </hyperlink>
- </field>
- </grid>
- <form name="EditInvoiceRole" type="single" target="createInvoiceRole" title=""
- header-row-style="header-row" default-table-style="basic-table">
- <auto-fields-entity entity-name="InvoiceRole"/>
- <field name="invoiceId"><hidden/></field>
- <field name="partyId"><lookup target-form-name="LookupPartyName"/></field>
- <field name="roleTypeId">
- <drop-down allow-empty="false">
- <entity-options entity-name="RoleType">
- <entity-order-by field-name="description"/>
- </entity-options>
- </drop-down>
- </field>
- <field name="submitButton" widget-style="smallSubmit"><submit button-type="button"/></field>
- </form>
-
<form name="SendPerEmail" type="single" target="executeSendPerEmail" title=""
header-row-style="header-row" default-table-style="basic-table">
<actions>
@@ -646,62 +280,7 @@ under the License.
<field name="bodyText"><textarea/></field>
<field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
- <grid name="EditTimeEntries" list-name="timeEntries"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <auto-fields-service service-name="updateTimeEntry" default-field-type="display"/>
- <field name="invoiceId"><hidden/></field>
- <field name="deleteLink" title=" " widget-style="buttontext">
- <hyperlink description="${uiLabelMap.CommonDelete}" target="unlinkInvoiceFromTimeEntry" also-hidden="false">
- <parameter param-name="timeEntryId"/>
- <parameter param-name="invoiceId" value="null"/>
- <parameter param-name="invoiceItemSeqId" value="null"/>
- <parameter param-name="viewIndex"/>
- <parameter param-name="viewSize"/>
- </hyperlink>
- </field>
- </grid>
- <grid name="ListTimeEntries" list-name="timeEntries"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <row-actions>
- <entity-one entity-name="Timesheet" value-field="timesheet">
- <field-map field-name="timesheetId" from-field="timesheetId"/>
- </entity-one>
- </row-actions>
- <field name="invoiceId"><hidden/></field>
- <field name="invoiceItemSeqId"><display/></field>
- <field name="timeEntryId"><display/></field>
- <field name="timesheetId" entry-name="timesheet.timesheetId">
- <hyperlink description="${timesheetId}" target="/workeffort/control/EditTimesheet" target-type="inter-app">
- <parameter param-name="timesheetId"/>
- </hyperlink>
- </field>
- <field name="partyId" entry-name="partyId">
- <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName} ${firstName} ${middleName} ${lastName}">
- <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description=" [${partyId}]">
- <parameter param-name="partyId"/>
- </sub-hyperlink>
- </display-entity>
- </field>
- <field name="timesheetPartyId" entry-name="timesheet.partyId">
- <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName} ${firstName} ${middleName} ${lastName}">
- <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description=" [${timesheet.partyId}]">
- <parameter param-name="partyId" from-field="timesheet.partyId"/>
- </sub-hyperlink>
- </display-entity>
- </field>
- <field name="hours"><display/></field>
- <field name="rateTypeId"><display-entity entity-name="RateType"/></field>
- <field name="workEffortId">
- <display-entity entity-name="WorkEffort" description="${workEffortName} [${workEffortId}]">
- <sub-hyperlink description=" [${workEffortId}]" target="/workeffort/control/WorkEffortSummary" target-type="inter-app">
- <parameter param-name="workEffortId"/>
- </sub-hyperlink>
- </display-entity>
- </field>
- <field name="fromDate"><display type="date"/></field>
- <field name="thruDate"><display type="date"/></field>
- <field name="comments"><display/></field>
- </grid>
+
<form name="LookupInvoicesStatus" type="single" target="BillingAccountInvoices" title=""
header-row-style="header-row" default-table-style="basic-table">
<field name="billingAccountId"><hidden/></field>
@@ -715,6 +294,7 @@ under the License.
</field>
<field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field>
</form>
+
<grid name="ListInvoicePaymentInfo" list-name="invoicePaymentInfoList"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<actions>
@@ -731,14 +311,5 @@ under the License.
<field name="paidAmount"><display type="currency" currency="${invoice.currencyUomId}"/></field>
<field name="outstandingAmount"><display type="currency" currency="${invoice.currencyUomId}"/></field>
</grid>
- <grid name="ListCustomerInvoices" extends="ListInvoices" list-name="invoices"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <field name="partyIdFrom"><ignored/></field>
- <field name="partyIdTo"><ignored/></field>
- </grid>
- <grid name="ListSupplierInvoices" extends="ListInvoices" list-name="invoiceslistexternal"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <field name="partyIdFrom"><ignored/></field>
- <field name="partyIdTo"><ignored/></field>
- </grid>
+
</forms>
diff --git a/applications/accounting/widget/InvoiceScreens.xml b/applications/accounting/widget/InvoiceScreens.xml
index f515d38b32..80a22ed7ca 100644
--- a/applications/accounting/widget/InvoiceScreens.xml
+++ b/applications/accounting/widget/InvoiceScreens.xml
@@ -41,6 +41,10 @@ under the License.
<widgets>
<section>
<condition><not><if-empty field="parameters.invoiceId"/></not></condition>
+ <actions>
+ <set field="invoiceId" from-field="parameters.invoiceId"/>
+ <entity-one entity-name="Invoice" value-field="invoice" use-cache="true"/>
+ </actions>
<widgets>
<label style="h1">${uiLabelMap.CommonInvoice}: ${invoiceId}</label>
<include-menu name="InvoiceTabBar" location="${parameters.mainMenuLocation}"/>
@@ -69,7 +73,7 @@ under the License.
</screen>
<screen name="FindInvoices">
<section>
- <actions>
+ <actions>
<set field="headerItem" value="invoices"/>
<set field="tabButtonItem" value="find"/>
<set field="titleProperty" value="PageTitleFindInvoice"/>
@@ -83,27 +87,7 @@ under the License.
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <section>
- <widgets>
- <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
- <decorator-section name="menu-bar">
- <include-menu name="InvoiceSubTabBar" location="${parameters.mainMenuLocation}"/>
- <container style="clear"/>
- </decorator-section>
- <decorator-section name="search-options">
- <platform-specific>
- <html>
- <html-template multi-block="true" location="component://common-theme/template/includes/SetMultipleSelectJsList.ftl"/>
- </html>
- </platform-specific>
- <include-form name="FindInvoices" location="component://accounting/widget/InvoiceForms.xml"/>
- </decorator-section>
- <decorator-section name="search-results">
- <include-grid name="ListInvoices" location="component://accounting/widget/InvoiceForms.xml"/>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
+ <include-screen name="FindInvoices" location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -111,24 +95,10 @@ under the License.
</screen>
<screen name="NewInvoice">
<section>
- <actions>
- <set field="titleProperty" value="AccountingCreateNewInvoice"/>
- <set field="helpAnchor" value="_help_for_new_invoice"/>
- <entity-one entity-name="Invoice" value-field="invoice"/>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <section>
- <widgets>
- <screenlet title="${uiLabelMap.AccountingCreateNewSalesInvoice}">
- <include-form name="NewSalesInvoice" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <screenlet title="${uiLabelMap.AccountingCreateNewPurchaseInvoice}">
- <include-form name="NewPurchaseInvoice" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- </section>
+ <include-screen name="NewInvoice" location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -173,143 +143,12 @@ under the License.
</widgets>
</section>
</screen>
- <screen name="invoiceOverview">
+ <screen name="InvoiceOverview">
<section>
- <actions>
- <set field="titleProperty" value="PageTitleInvoiceOverview"/>
- <set field="tabButtonItem" value="invoiceOverview"/>
- <set field="helpAnchor" value="_help_for_invoice_overview"/>
- <set field="invoiceId" from-field="parameters.invoiceId"/>
- <entity-one entity-name="Invoice" value-field="invoice"/>
- <entity-and entity-name="InvoiceRole" list="invoiceRoles">
- <field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
- <order-by field-name="partyId"/>
- </entity-and>
- <entity-and entity-name="InvoiceStatus" list="invoiceStatus">
- <field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
- <order-by field-name="statusDate"/>
- </entity-and>
- <entity-and entity-name="InvoiceTerm" list="invoiceTerms">
- <field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
- <order-by field-name="invoiceTermId"/>
- </entity-and>
- <entity-and entity-name="TimeEntry" list="timeEntries">
- <field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
- <order-by field-name="invoiceItemSeqId"/>
- </entity-and>
- <script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/CreateApplicationList.groovy"/>
- <set field="parameters.statusId" from-field="invoice.statusId"/>
- <set field="invoiceAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}" type="BigDecimal"/>
- <set field="notAppliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
- <set field="appliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(invoice)}" type="BigDecimal"/>
- <entity-condition entity-name="InvItemAndOrdItem" list="invItemAndOrdItems">
- <condition-expr field-name="invoiceId" operator="equals" from-field="invoiceId"/>
- <order-by field-name="invoiceItemSeqId"/>
- </entity-condition>
- <entity-condition entity-name="AcctgTransAndEntries" list="acctgTransAndEntries">
- <condition-expr field-name="invoiceId" operator="equals" from-field="invoiceId"/>
- <order-by field-name="acctgTransId"/>
- <order-by field-name="acctgTransEntrySeqId"/>
- </entity-condition>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <section>
- <condition>
- <not><if-empty field="invoice"/></not>
- </condition>
- <widgets>
- <section>
- <condition>
- <if-compare field="invoice.statusId" operator="equals" value="INVOICE_IN_PROCESS"/>
- </condition>
- <widgets>
- <screenlet title="${uiLabelMap.AccountingInvoiceHeader}">
- <include-form name="InvoiceHeader" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <container style="lefthalf">
- <screenlet title="${uiLabelMap.CommonStatus}" navigation-form-name="ListInvoiceStatus">
- <include-grid name="ListInvoiceStatus" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <screenlet title="${uiLabelMap.AccountingAppliedPayments} ${appliedAmount?currency(${invoice.currencyUomId})} ${uiLabelMap.AccountingOpenPayments} ${notAppliedAmount?currency(${invoice.currencyUomId})}"
- navigation-form-name="ListInvoiceApplications">
- <include-grid name="ListInvoiceApplications" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </container>
- <container style="righthalf">
- <screenlet title="${uiLabelMap.AccountingInvoiceRoles}" navigation-form-name="InvoiceRoles">
- <include-grid name="InvoiceRoles" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <screenlet title="${uiLabelMap.PartyTerms}">
- <include-grid name="InvoiceTerms" location="component://accounting/widget/InvoiceForms.xml"/>
- <include-grid name="ListInvoicePaymentInfo" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </container>
- <container style="clear"/>
- <screenlet title="${uiLabelMap.AccountingInvoiceItems}" navigation-form-name="InvoiceItems">
- <include-grid name="InvoiceItems" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <section>
- <condition>
- <not><if-empty field="timeEntries"/></not>
- </condition>
- <widgets>
- <screenlet title="${uiLabelMap.AccountingInvoiceTimeEntries}" navigation-form-name="ListTimeEntries">
- <include-grid name="ListTimeEntries" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- </section>
- <screenlet title="${uiLabelMap.AccountingTransactions}" navigation-form-name="AcctgTransAndEntries">
- <include-grid name="AcctgTransAndEntries" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- <fail-widgets>
- <screenlet title="${uiLabelMap.AccountingInvoiceHeader}">
- <include-form name="InvoiceHeader" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <container style="lefthalf">
- <screenlet title="${uiLabelMap.CommonStatus}" navigation-form-name="ListInvoiceStatus">
- <include-grid name="ListInvoiceStatus" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <screenlet title="${uiLabelMap.AccountingAppliedPayments} ${appliedAmount?currency(${invoice.currencyUomId})} ${uiLabelMap.AccountingOpenPayments} ${notAppliedAmount?currency(${invoice.currencyUomId})}"
- navigation-form-name="ListInvoiceApplications">
- <include-grid name="ListInvoiceApplications" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </container>
- <container style="righthalf">
- <screenlet title="${uiLabelMap.AccountingInvoiceRoles}" navigation-form-name="InvoiceRoles">
- <include-grid name="InvoiceRoles" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <screenlet title="${uiLabelMap.PartyTerms}">
- <include-grid name="ListInvoiceTerms" location="component://accounting/widget/InvoiceForms.xml"/>
- <include-grid name="ListInvoicePaymentInfo" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </container>
- <container style="clear"/>
- <screenlet title="${uiLabelMap.AccountingInvoiceItems}" navigation-form-name="InvoiceItems">
- <include-grid name="InvoiceItems" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <section>
- <condition>
- <not><if-empty field="timeEntries"/></not>
- </condition>
- <widgets>
- <screenlet title="${uiLabelMap.AccountingInvoiceTimeEntries}" navigation-form-name="ListTimeEntries">
- <include-form name="ListTimeEntries" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- </section>
- <screenlet title="${uiLabelMap.AccountingTransactions}" navigation-form-name="AcctgTransAndEntries">
- <include-grid name="AcctgTransAndEntries" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </fail-widgets>
- </section>
- </widgets>
- <fail-widgets>
- <label text="${uiLabelMap.AccountingInvoiceDoesNotExists}"></label>
- </fail-widgets>
- </section>
+ <include-screen name="ViewInvoice" location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -317,22 +156,10 @@ under the License.
</screen>
<screen name="InvoiceStatus">
<section>
- <actions>
- <set field="titleProperty" value="PageTitleListInvoices"/>
- <set field="tabButtonItem" value="invoiceStatus"/>
- <set field="invoiceId" from-field="parameters.invoiceId"/>
- <entity-one entity-name="Invoice" value-field="invoice" auto-field-map="true"/>
- <entity-and entity-name="InvoiceStatus" list="invoiceStatus">
- <field-map field-name="invoiceId" from-field="invoice.invoiceId"/>
- <order-by field-name="statusDate"/>
- </entity-and>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <screenlet title="${uiLabelMap.AccountingInvoiceStatusHistory}">
- <include-grid name="ListInvoiceStatus" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
+ <include-screen name="InvoiceStatus" location="component://accounting/widget/accounting/AccountingInvoiceStatusCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -340,108 +167,10 @@ under the License.
</screen>
<screen name="EditInvoiceApplications">
<section>
- <actions>
- <set field="titleProperty" value="PageTitleListEditInvoiceApplications"/>
- <set field="tabButtonItem" value="editInvoiceApplications"/>
- <set field="helpAnchor" value="_help_for_edit_invoice_applications"/>
- <set field="invoiceId" from-field="parameters.invoiceId"/>
- <entity-one entity-name="Invoice" value-field="invoice"/>
- <script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/CreateApplicationList.groovy"/>
- <script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/ListNotAppliedPayments.groovy"/>
- <set field="invoiceAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}" type="BigDecimal"/>
- <set field="notAppliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
- <set field="appliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(invoice)}" type="BigDecimal"/>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <section>
- <condition>
- <and>
- <or>
- <if-has-permission permission="ACCOUNTING" action="_CREATE"/>
- <if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
- </or>
- </and>
- </condition>
- <widgets>
- <section>
- <condition>
- <if-compare field="notAppliedAmount" operator="greater" value="0"/>
- </condition>
- <widgets>
- <screenlet title="${uiLabelMap.AccountingPaymentsApplied} ${appliedAmount?currency(${invoice.currencyUomId})}
- ${uiLabelMap.AccountingOpenPayments} ${notAppliedAmount?currency(${invoice.currencyUomId})}">
- <include-grid name="EditInvoiceApplications" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <section>
- <condition>
- <if-empty field="invoiceApplications"/>
- </condition>
- <widgets>
- <container><label style="h3" text="${uiLabelMap.AccountingNoPaymentsApplicationsfound}"></label></container>
- </widgets>
- </section>
- <section>
- <condition>
- <or>
- <not><if-empty field="payments"/></not>
- <not><if-empty field="paymentsActualCurrency"/></not>
- </or>
- </condition>
- <widgets>
- <screenlet title="${uiLabelMap.AccountingListPaymentsNotYetApplied} [${invoice.partyIdFrom}]
- ${uiLabelMap.AccountingPaymentSentForm} [${invoice.partyId}]">
- <section>
- <condition>
- <not><if-empty field="payments"/></not>
- </condition>
- <widgets>
- <include-grid name="ListPaymentsNotApplied" location="component://accounting/widget/InvoiceForms.xml"/>
- </widgets>
- </section>
- <section>
- <condition>
- <not><if-empty field="paymentsActualCurrency"/></not>
- </condition>
- <widgets>
- <include-grid name="ListPaymentsNotAppliedForeignCurrency" location="component://accounting/widget/InvoiceForms.xml"/>
- </widgets>
- </section>
- </screenlet>
- </widgets>
- </section>
- <screenlet title="${uiLabelMap.AccountingAssignPaymentToInvoice}">
- <include-form name="AddPayment" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- <fail-widgets>
- <screenlet title="${uiLabelMap.AccountingPaymentsApplied} ${appliedAmount?currency(${invoice.currencyUomId})}
- ${uiLabelMap.AccountingOpenPayments} ${notAppliedAmount?currency(${invoice.currencyUomId})}">
- <include-grid name="EditInvoiceApplications" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <section>
- <condition>
- <if-empty field="invoiceApplications"/>
- </condition>
- <widgets>
- <container>
- <label style="h3" text="${uiLabelMap.AccountingNoPaymentsApplicationsfound}"></label>
- </container>
- </widgets>
- </section>
- </fail-widgets>
- </section>
- </widgets>
- <fail-widgets>
- <screenlet
- title="${uiLabelMap.AccountingAppliedPayments} ${appliedAmount?currency(${invoice.currencyUomId})}
- ${uiLabelMap.AccountingOpenPayments} ${notAppliedAmount?currency(${invoice.currencyUomId})}"
- navigation-form-name="ListInvoiceApplications">
- <include-grid name="ListInvoiceApplications" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </fail-widgets>
- </section>
+ <include-screen name="InvoiceApplications" location="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -449,84 +178,10 @@ under the License.
</screen>
<screen name="EditInvoiceItems">
<section>
- <actions>
- <property-map resource="AccountingEntityLabels" map-name="uiLabelMap" global="true"/>
- <set field="viewIndex" from-field="parameters.viewIndex"/>
- <set field="viewSize" from-field="parameters.viewSize"/>
- <set field="titleProperty" value="PageTitleListInvoices"/>
- <set field="tabButtonItem" value="listInvoiceItems"/>
- <set field="helpAnchor" value="_help_for_edit_invoice_time_entries"/>
- <set field="invoiceId" from-field="parameters.invoiceId"/>
- <set field="invoiceItemSeqd" from-field="parameters.invoiceItemSeqId"/>
- <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
- <entity-one entity-name="Invoice" value-field="invoice"/>
- <entity-one entity-name="InvoiceItem" value-field="invoiceItem"/>
- <entity-and entity-name="InvoiceItem" list="invoiceItems">
- <field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
- <order-by field-name="invoiceItemSeqId"/>
- </entity-and>
- <entity-condition entity-name="InvoiceItemType" list="PayrolGroup">
- <condition-expr field-name="parentTypeId" value="PAYROL"/>
- </entity-condition>
- <entity-condition entity-name="InvoiceItemType" list="PayrolList"/>
- <entity-condition entity-name="InvItemAndOrdItem" list="invItemAndOrdItems">
- <condition-expr field-name="invoiceId" operator="equals" from-field="invoiceId"/>
- <order-by field-name="invoiceItemSeqId"/>
- </entity-condition>
- <script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/GetAccountOrganizationAndClass.groovy"/>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <section>
- <condition>
- <and>
- <or>
- <if-has-permission permission="ACCOUNTING" action="_CREATE"/>
- <if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
- </or>
- </and>
- </condition>
- <widgets>
- <screenlet title="${uiLabelMap.AccountingInvoiceItemAdd}">
- <section>
- <condition>
- <not><if-compare field="invoice.invoiceTypeId" operator="equals" value="PAYROL_INVOICE"/></not>
- </condition>
- <widgets>
- <include-form name="EditInvoiceItem" location="component://accounting/widget/InvoiceForms.xml"/>
- </widgets>
- <fail-widgets>
- <platform-specific><html>
- <html-template location="component://accounting/template/invoice/InvoiceItemsPayrol.ftl"/>
- </html></platform-specific>
- </fail-widgets>
- </section>
- </screenlet>
- <screenlet title="${uiLabelMap.AccountingInvoiceItems}">
- <include-form name="EditInvoiceItems" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- <fail-widgets>
- <section>
- <condition>
- <not><if-compare field="invoice.invoiceTypeId" operator="equals" value="PAYROL_INVOICE"/></not>
- </condition>
- <widgets>
- <screenlet>
- <include-grid name="InvoiceItems" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- <fail-widgets>
- <platform-specific>
- <html>
- <html-template location="component://accounting/template/invoice/InvoiceItemsPayrol.ftl"/>
- </html>
- </platform-specific>
- </fail-widgets>
- </section>
- </fail-widgets>
- </section>
+ <include-screen name="InvoiceItems" location="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -534,40 +189,10 @@ under the License.
</screen>
<screen name="EditInvoiceTimeEntries">
<section>
- <actions>
- <set field="viewIndex" from-field="parameters.viewIndex"/>
- <set field="viewSize" from-field="parameters.viewSize"/>
- <set field="titleProperty" value="PageTitleListInvoiceTimeEntries"/>
- <set field="tabButtonItem" value="EditInvoiceTimeEntries"/>
- <set field="helpAnchor" value="_help_for_edit_invoice_time_entries"/>
- <set field="invoiceId" from-field="parameters.invoiceId"/>
- <entity-one entity-name="Invoice" value-field="invoice"/>
- <entity-and entity-name="TimeEntry" list="timeEntries">
- <field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
- <order-by field-name="timeEntryId"/>
- </entity-and>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <screenlet title="${uiLabelMap.AccountingInvoiceTimeEntries}">
- <section>
- <condition>
- <and>
- <or>
- <if-has-permission permission="ACCOUNTING" action="_CREATE"/>
- <if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
- </or>
- </and>
- </condition>
- <widgets>
- <include-grid name="EditTimeEntries" location="component://accounting/widget/InvoiceForms.xml"/>
- </widgets>
- <fail-widgets>
- <include-grid name="ListTimeEntries" location="component://accounting/widget/InvoiceForms.xml"/>
- </fail-widgets>
- </section>
- </screenlet>
+ <include-screen name="InvoiceTimeEntries" location="component://accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -575,26 +200,10 @@ under the License.
</screen>
<screen name="InvoiceAttributes">
<section>
- <actions>
- <set field="titleProperty" value="PageTitleInvoiceAttributes"/>
- <set field="tabButtonItem" value="invoiceAttributes"/>
- <set field="invoiceId" from-field="parameters.invoiceId"/>
- <entity-one entity-name="Invoice" value-field="invoice"/>
- <entity-and entity-name="InvoiceAttribute" list="invoiceAttributes">
- <field-map field-name="invoiceId" from-field="invoiceId"/>
- <order-by field-name="attrName"/>
- </entity-and>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <section>
- <widgets>
- <screenlet title="${uiLabelMap.CommonAttributes}">
- <include-grid name="InvoiceAttributes" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- </section>
+ <include-screen name="InvoiceAttributes" location="component://accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -602,26 +211,10 @@ under the License.
</screen>
<screen name="InvoiceContactMech">
<section>
- <actions>
- <set field="titleProperty" value="PageTitleInvoiceContactMech"/>
- <set field="tabButtonItem" value="invoiceContactMech"/>
- <set field="invoiceId" from-field="parameters.invoiceId"/>
- <entity-one entity-name="Invoice" value-field="invoice"/>
- <entity-and entity-name="InvoiceContactMech" list="invoiceContactMechList">
- <field-map field-name="invoiceId" from-field="invoiceId"/>
- <order-by field-name="contactMechId"/>
- </entity-and>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <section>
- <widgets>
- <screenlet title="${uiLabelMap.PartyContactMechs}">
- <include-grid name="InvoiceContactMech" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- </section>
+ <include-screen name="InvoiceContactMechs" location="component://accounting/widget/accounting/AccountingInvoiceContactMechCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -629,26 +222,10 @@ under the License.
</screen>
<screen name="InvoiceContent">
<section>
- <actions>
- <set field="titleProperty" value="PageTitleInvoiceContent"/>
- <set field="tabButtonItem" value="invoiceContent"/>
- <set field="invoiceId" from-field="parameters.invoiceId"/>
- <entity-one entity-name="Invoice" value-field="invoice"/>
- <entity-and entity-name="InvoiceContent" list="invoiceContentList">
- <field-map field-name="invoiceId" from-field="invoiceId"/>
- <order-by field-name="contentId"/>
- </entity-and>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <section>
- <widgets>
- <screenlet title="${uiLabelMap.CommonContent}">
- <include-grid name="InvoiceContent" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- </section>
+ <include-screen name="InvoiceContents" location="component://accounting/widget/accounting/AccountingInvoiceContentCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -656,26 +233,10 @@ under the License.
</screen>
<screen name="InvoiceNotes">
<section>
- <actions>
- <set field="titleProperty" value="PageTitleInvoiceNotes"/>
- <set field="tabButtonItem" value="invoiceNotes"/>
- <set field="invoiceId" from-field="parameters.invoiceId"/>
- <entity-one entity-name="Invoice" value-field="invoice"/>
- <entity-and entity-name="InvoiceNote" list="invoiceNotesList">
- <field-map field-name="invoiceId" from-field="invoiceId"/>
- <order-by field-name="noteId"/>
- </entity-and>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <section>
- <widgets>
- <screenlet title="${uiLabelMap.CommonNotes}">
- <include-grid name="InvoiceNotes" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- </section>
+ <include-screen name="InvoiceNotes" location="component://accounting/widget/accounting/AccountingInvoiceNoteCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -683,43 +244,10 @@ under the License.
</screen>
<screen name="InvoiceRoles">
<section>
- <actions>
- <set field="titleProperty" value="PageTitleListInvoiceRoles"/>
- <set field="tabButtonItem" value="invoiceRoles"/>
- <set field="helpAnchor" value="_help_for_invoice_roles"/>
- <set field="invoiceId" from-field="parameters.invoiceId"/>
- <entity-one entity-name="Invoice" value-field="invoice"/>
- <entity-and entity-name="InvoiceRole" list="invoiceRoles">
- <field-map field-name="invoiceId" from-field="invoiceId"/>
- <order-by field-name="partyId"/>
- </entity-and>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <section>
- <condition>
- <and>
- <or>
- <if-has-permission permission="ACCOUNTING" action="_CREATE"/>
- <if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
- </or>
- </and>
- </condition>
- <widgets>
- <screenlet id="PartyInvoiceRolePanel" title="${uiLabelMap.AccountingPartyRoleAdd}" collapsible="true">
- <include-form name="EditInvoiceRole" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- <screenlet title="${uiLabelMap.CommonRoles}">
- <include-grid name="ListInvoiceRoles" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- <fail-widgets>
- <screenlet title="${uiLabelMap.CommonRoles}">
- <include-grid name="InvoiceRoles" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </fail-widgets>
- </section>
+ <include-screen name="InvoiceRoles" location="component://accounting/widget/accounting/AccountingInvoiceRoleCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -727,54 +255,10 @@ under the License.
</screen>
<screen name="InvoiceTerms">
<section>
- <actions>
- <set field="titleProperty" value="PageTitleListInvoiceTerms"/>
- <set field="tabButtonItem" value="invoiceTerms"/>
- <set field="invoiceId" from-field="parameters.invoiceId"/>
- <entity-one entity-name="Invoice" value-field="invoice"/>
- <entity-and entity-name="InvoiceTerm" list="invoiceTerms">
- <field-map field-name="invoiceId" from-field="invoiceId"/>
- <order-by field-name="invoiceTermId"/>
- </entity-and>
- <entity-one entity-name="InvoiceTerm" value-field="invoiceTerm">
- <field-map field-name="invoiceTermId" from-field="parameters.invoiceTermId"/>
- </entity-one>
- </actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
<decorator-section name="body">
- <section>
- <condition>
- <and>
- <or>
- <if-has-permission permission="ACCOUNTING" action="_CREATE"/>
- <if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
- </or>
- </and>
- </condition>
- <widgets>
- <section>
- <condition>
- <not>
- <if-compare field="invoice.statusId" operator="equals" value="INVOICE_APPROVED"/>
- </not>
- </condition>
- <widgets>
- <screenlet id="PartyInvoiceTermPanel" collapsible="true">
- <include-form name="EditInvoiceTerm" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- </section>
- <screenlet title="${uiLabelMap.PartyTerms}">
- <include-grid name="ListInvoiceTerms" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </widgets>
- <fail-widgets>
- <screenlet title="${uiLabelMap.PartyTerms}">
- <include-grid name="InvoiceTerms" location="component://accounting/widget/InvoiceForms.xml"/>
- </screenlet>
- </fail-widgets>
- </section>
+ <include-screen name="InvoiceTerms" location="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
diff --git a/applications/accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml b/applications/accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml
new file mode 100644
index 0000000000..e5fa3b079b
--- /dev/null
+++ b/applications/accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml
@@ -0,0 +1,379 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- This document serves as an example for Compound Screen Widget feature -->
+<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sc="http://ofbiz.apache.org/Site-Conf"
+ xmlns:wf="http://ofbiz.apache.org/Widget-Form"
+ xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
+ xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
+
+ <sc:site-conf>
+
+ <sc:request-map uri="Accounting/Invoice/Application/Add"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Application/Add"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Application/Edit"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Application/Edit"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Applications"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Applications"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Applications/Edit"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Applications/Edit"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Applications/List"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Applications/List"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Applications/Payment"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Applications/Payment"/></sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Application/create">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="updatePaymentApplicationDef"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Application/update">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="updatePaymentApplicationDef"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Application/delete">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="removePaymentApplication"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:view-map name="Accounting/Invoice/Application/Add" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml#EditPayment"/>
+ <sc:view-map name="Accounting/Invoice/Application/Edit" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml#EditPayment"/>
+ <sc:view-map name="Accounting/Invoice/Applications" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml#InvoiceApplications"/>
+ <sc:view-map name="Accounting/Invoice/Applications/Edit" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml#EditInvoiceApplications"/>
+ <sc:view-map name="Accounting/Invoice/Applications/List" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml#InvoiceApplications"/>
+ <sc:view-map name="Accounting/Invoice/Applications/Payment" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml#PaymentApplications"/>
+
+ </sc:site-conf>
+
+ <ws:screens>
+
+ <ws:screen name="InvoiceApplications">
+ <ws:section>
+ <ws:condition>
+ <ws:or>
+ <ws:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <ws:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </ws:or>
+ </ws:condition>
+ <ws:actions>
+ <ws:set field="titleProperty" value="PageTitleListEditInvoiceApplications"/>
+ <ws:set field="tabButtonItem" value="editInvoiceApplications"/>
+ <ws:set field="helpAnchor" value="_help_for_edit_invoice_applications"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="actions">
+ <ws:include-menu name="InvoiceApplicationsTabBar" location="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml"/>
+ </ws:decorator-section>
+ <ws:decorator-section name="single">
+ <ws:include-screen name="EditInvoiceApplications"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ <ws:fail-widgets>
+ <ws:include-screen name="ViewInvoiceApplications"/>
+ </ws:fail-widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="EditInvoiceApplications">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ <ws:set field="invoiceAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}" type="BigDecimal"/>
+ <ws:set field="notAppliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
+ <ws:set field="appliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(invoice)}" type="BigDecimal"/>
+ <ws:script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/CreateApplicationList.groovy"/>
+ <ws:script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/ListNotAppliedPayments.groovy"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:screenlet title="${uiLabelMap.AccountingPaymentsApplied} ${appliedAmount?currency(${invoice.currencyUomId})}
+ ${uiLabelMap.AccountingOpenPayments} ${notAppliedAmount?currency(${invoice.currencyUomId})}">
+ <ws:include-form name="EditInvoiceApplications" location="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml"/>
+ </ws:screenlet>
+
+ <ws:section>
+ <ws:condition>
+ <ws:if-empty field="invoiceApplications"/>
+ </ws:condition>
+ <ws:widgets>
+ <ws:container>
+ <ws:label style="h3" text="${uiLabelMap.AccountingNoPaymentsApplicationsfound}"></ws:label>
+ </ws:container>
+ </ws:widgets>
+ </ws:section>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="EditPayment">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:entity-one value-field="paymentApplication" entity-name="PaymentApplication"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:include-form name="EditPayment" location="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="PaymentApplications">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ <ws:set field="notAppliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="list">
+ <ws:section>
+ <ws:condition>
+ <ws:if-compare field="notAppliedAmount" operator="greater" value="0"/>
+ </ws:condition>
+ <ws:actions>
+ <ws:script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/CreateApplicationList.groovy"/>
+ <ws:script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/ListNotAppliedPayments.groovy"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:section>
+ <ws:condition>
+ <ws:or>
+ <ws:not><ws:if-empty field="payments"/></ws:not>
+ <ws:not><ws:if-empty field="paymentsActualCurrency"/></ws:not>
+ </ws:or>
+ </ws:condition>
+ <ws:widgets>
+ <ws:screenlet title="${uiLabelMap.AccountingListPaymentsNotYetApplied} [${invoice.partyIdFrom}]
+ ${uiLabelMap.AccountingPaymentSentForm} [${invoice.partyId}]">
+ <ws:section>
+ <ws:condition>
+ <ws:not><ws:if-empty field="payments"/></ws:not>
+ </ws:condition>
+ <ws:widgets>
+ <ws:include-grid name="ListPaymentsNotApplied"
+ location="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml"/>
+ </ws:widgets>
+ </ws:section>
+ <ws:section>
+ <ws:condition>
+ <ws:not><ws:if-empty field="paymentsActualCurrency"/></ws:not>
+ </ws:condition>
+ <ws:widgets>
+ <ws:include-grid name="ListPaymentsNotAppliedForeignCurrency"
+ location="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml"/>
+ </ws:widgets>
+ </ws:section>
+ </ws:screenlet>
+ </ws:widgets>
+ <ws:fail-widgets>
+ <ws:container>
+ <ws:label style="h3" text="${uiLabelMap.AccountingNoPaymentsApplicationsfound}"></ws:label>
+ </ws:container>
+ </ws:fail-widgets>
+ </ws:section>
+ </ws:widgets>
+ <ws:fail-widgets>
+ <ws:container>
+ <ws:label style="h3" text="${uiLabelMap.AccountingNoPaymentsApplicationsfound}"></ws:label>
+ </ws:container>
+ </ws:fail-widgets>
+ </ws:section>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="ViewInvoiceApplications">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ <ws:script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/CreateApplicationList.groovy"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:screenlet
+ title="${uiLabelMap.AccountingAppliedPayments} ${appliedAmount?currency(${invoice.currencyUomId})}
+ ${uiLabelMap.AccountingOpenPayments} ${notAppliedAmount?currency(${invoice.currencyUomId})}"
+ navigation-form-name="ListInvoiceApplications">
+ <ws:include-grid name="ListInvoiceApplications" location="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml"/>
+ </ws:screenlet>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ </ws:screens>
+
+ <wm:menus>
+
+ <wm:menu name="InvoiceApplicationsTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+ <wm:menu-item name="AddInvoiceApplication" title="${uiLabelMap.AccountingAssignPaymentToInvoice}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Application/Add" link-type="layered-modal">
+ <wm:parameter param-name="invoiceId" from-field="parameters.invoiceId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Applications">
+ <wm:parameter param-name="invoiceId" from-field="parameters.invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ <wm:menu-item name="ApplyAvailablePayment" title="${uiLabelMap.AccountingListPaymentsNotYetApplied}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Applications/Payment" link-type="layered-modal">
+ <wm:parameter param-name="invoiceId" from-field="parameters.invoiceId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Applications">
+ <wm:parameter param-name="invoiceId" from-field="parameters.invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ </wm:menu>
+
+ <wm:menu name="EditInvoiceApplicationsInLineBar"
+ extends="CommonInlineBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+ <wm:menu-item name="UpdateInvoiceApplication" title="${uiLabelMap.CommonUpdate}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Application/Edit" link-type="layered-modal" style="buttontext">
+ <wm:parameter param-name="paymentApplicationId"/>
+ <wm:parameter param-name="paymentId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Applications/Edit">
+ <wm:parameter param-name="invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ <wm:menu-item name="DeleteInvoiceApplication" title="${uiLabelMap.CommonRemove}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Application/delete" request-confirmation="true" style="buttontext">
+ <wm:parameter param-name="paymentApplicationId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Applications/Edit">
+ <wm:parameter param-name="invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ </wm:menu>
+
+ </wm:menus>
+
+ <wf:forms>
+
+ <wf:form name="EditPayment" target="Accounting/Invoice/Application/create" default-map-name="paymentApplication"
+ type="single" title="" header-row-style="header-row" default-table-style="basic-table"
+ extends="CommonBasicSingle" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:field name="paymentApplicationId"><wf:hidden/></wf:field>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="paymentId"><wf:lookup target-form-name="LookupPayment"/></wf:field>
+ <wf:field name="amountToApply" use-when="paymentApplication == null"><wf:text size="10"/></wf:field>
+ <wf:field name="amountToApply" disabled="true" use-when="paymentApplication != null" entry-name="amountApplied"><wf:text size="10"/></wf:field>
+ <wf:field name="invoiceProcessing" use-when=""${uiConfigMap.invoiceProcessing}".equals("Y")"><wf:check/></wf:field>
+ <wf:field name="applyButton" widget-style="smallSubmit">
+ <wf:submit button-type="button"/>
+ </wf:field>
+ </wf:form>
+
+ <wf:grid name="ListInvoiceApplications" paginate-target="Accounting/Invoice/Applications"
+ list-name="invoiceApplications" default-entity-name="InvoiceItem" use-row-submit="true"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+ target="updatePaymentApplication" title="Apply payments to invoices" separate-columns="false"
+ extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:field name="invoiceItemSeqId"><wf:display/></wf:field>
+ <wf:field name="productId"><wf:display/></wf:field>
+ <wf:field name="description" encode-output="false"><wf:display/></wf:field>
+ <wf:field name="total" widget-area-style="align-text"><wf:display type="currency" currency="${invoice.currencyUomId}"/></wf:field>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="paymentId" widget-style="linktext">
+ <wf:hyperlink description="${paymentId}" target="paymentOverview">
+ <wf:parameter param-name="paymentId"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field name="billingAccountId"><wf:hidden/></wf:field>
+ <wf:field name="paymentApplicationId"><wf:hidden/></wf:field>
+ <wf:field name="amountApplied" widget-area-style="align-text"><wf:display type="currency" currency="${invoice.currencyUomId}"/></wf:field>
+ </wf:grid>
+
+ <wf:form name="EditInvoiceApplications" type="list" list-name="invoiceApplications" paginate-target="Accounting/Invoice/Applications/Edit"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+ extends="CommonDynamicList" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:field name="invoiceItemSeqId"><wf:display/></wf:field>
+ <wf:field name="productId"><wf:display/></wf:field>
+ <wf:field name="description"><wf:display/></wf:field>
+ <wf:field name="amountApplied"><wf:display type="currency" currency="${invoice.currencyUomId}"/></wf:field>
+ <wf:field name="total"><wf:display type="currency" currency="${invoice.currencyUomId}"/></wf:field>
+ <wf:field name="menuActions" title=" ">
+ <wf:include-menu name="EditInvoiceApplicationsInLineBar" location="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml"/>
+ </wf:field>
+ </wf:form>
+
+ <wf:grid name="ListPaymentsNotApplied" target="Accounting/Invoice/Application/create"
+ list-name="payments" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+ extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="paymentId" widget-style="buttontext">
+ <wf:hyperlink description="[${paymentId}]" target="paymentOverview">
+ <wf:parameter param-name="paymentId"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field name="amount"><wf:display type="currency" currency="${currencyUomId}"/></wf:field>
+ <wf:field name="effectiveDate"><wf:display type="date"/></wf:field>
+ <wf:field name="amountApplied" parameter-name="dummy"><wf:display type="currency" currency="${currencyUomId}"/></wf:field>
+ <wf:field name="amountToApply" parameter-name="amountApplied"><wf:text size="10"/></wf:field>
+ <wf:field name="applyButton" widget-style="smallSubmit">
+ <wf:submit button-type="button"/>
+ </wf:field>
+ </wf:grid>
+
+ <wf:grid name="ListPaymentsNotAppliedForeignCurrency" extends="ListPaymentsNotApplied" list-name="paymentsActualCurrency"/>
+
+ </wf:forms>
+
+</compound-widgets>
diff --git a/applications/accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml b/applications/accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml
new file mode 100644
index 0000000000..cf35aeb8da
--- /dev/null
+++ b/applications/accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- This document serves as an example for Compound Screen Widget feature -->
+<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sc="http://ofbiz.apache.org/Site-Conf"
+ xmlns:wf="http://ofbiz.apache.org/Widget-Form"
+ xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
+ xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
+
+ <sc:site-conf>
+
+ <sc:request-map uri="Accounting/Invoice/Attributes"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Attributes"/></sc:request-map>
+
+ <sc:view-map name="Accounting/Invoice/Attributes" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml#InvoiceAttributes"/>
+
+ </sc:site-conf>
+
+ <ws:screens>
+
+ <ws:screen name="InvoiceAttributes">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="titleProperty" value="PageTitleInvoiceAttributes"/>
+ <ws:set field="tabButtonItem" value="invoiceAttributes"/>
+ <ws:set field="sortField" from-field="parameters.sortField" default-value="attrName"/>
+ <ws:entity-and entity-name="InvoiceAttribute" list="invoiceAttributes">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="${sortField}" />
+ </ws:entity-and>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:screenlet title="${uiLabelMap.CommonAttributes}">
+ <ws:include-grid name="InvoiceAttributes" location="component://accounting/widget/accounting/AccountingInvoiceAttributeCpd.xml"/>
+ </ws:screenlet>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ </ws:screens>
+
+
+ <wf:forms>
+
+ <wf:grid name="InvoiceAttributes" paginate-target="Accounting/Invoice/Attributes" list-name="invoiceAttributes"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+ extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:auto-fields-entity entity-name="InvoiceAttribute" default-field-type="display"/>
+ </wf:grid>
+
+ </wf:forms>
+
+</compound-widgets>
diff --git a/applications/accounting/widget/accounting/AccountingInvoiceContactMechCpd.xml b/applications/accounting/widget/accounting/AccountingInvoiceContactMechCpd.xml
new file mode 100644
index 0000000000..832a392ffe
--- /dev/null
+++ b/applications/accounting/widget/accounting/AccountingInvoiceContactMechCpd.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- This document serves as an example for Compound Screen Widget feature -->
+<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sc="http://ofbiz.apache.org/Site-Conf"
+ xmlns:wf="http://ofbiz.apache.org/Widget-Form"
+ xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
+ xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
+
+ <sc:site-conf>
+
+ <sc:request-map uri="Accounting/Invoice/ContactMechs"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/ContactMechs"/></sc:request-map>
+
+ <sc:view-map name="Accounting/Invoice/ContactMechs" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceContactMechCpd.xml#InvoiceContactMechs"/>
+
+ </sc:site-conf>
+
+ <ws:screens>
+
+ <ws:screen name="InvoiceContactMechs">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="titleProperty" value="PageTitleInvoiceContactMech"/>
+ <ws:set field="tabButtonItem" value="invoiceContactMech"/>
+ <ws:set field="sortField" from-field="parameters.sortField" default-value="contactMechId"/>
+ <ws:entity-and entity-name="InvoiceContactMech" list="invoiceContactMechList">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="${sortField}" />
+ </ws:entity-and>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:screenlet title="${uiLabelMap.PartyContactMechs}">
+ <ws:include-grid name="InvoiceContactMechs" location="component://accounting/widget/accounting/AccountingInvoiceContactMechCpd.xml"/>
+ </ws:screenlet>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ </ws:screens>
+
+
+ <wf:forms>
+
+ <wf:grid name="InvoiceContactMechs" paginate-target="Accounting/Invoice/ContactMechs" list-name="invoiceContactMechList" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+ extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:row-actions>
+ <wf:entity-one entity-name="ContactMechDetail" value-field="contactMechDetail"/>
+ </wf:row-actions>
+ <wf:auto-fields-entity entity-name="InvoiceContactMech" default-field-type="display"/>
+ <wf:field name="contactMechDetail" title="${uiLabelMap.FormFieldTitle_cmDetail}"><wf:display/></wf:field>
+ </wf:grid>
+
+ </wf:forms>
+
+</compound-widgets>
diff --git a/applications/accounting/widget/accounting/AccountingInvoiceContentCpd.xml b/applications/accounting/widget/accounting/AccountingInvoiceContentCpd.xml
new file mode 100644
index 0000000000..01050b171e
--- /dev/null
+++ b/applications/accounting/widget/accounting/AccountingInvoiceContentCpd.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- This document serves as an example for Compound Screen Widget feature -->
+<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sc="http://ofbiz.apache.org/Site-Conf"
+ xmlns:wf="http://ofbiz.apache.org/Widget-Form"
+ xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
+ xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
+
+ <sc:site-conf>
+
+ <sc:request-map uri="Accounting/Invoice/Contents"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Contents"/></sc:request-map>
+
+ <sc:view-map name="Accounting/Invoice/Contents" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceContentCpd.xml#InvoiceContents"/>
+
+ </sc:site-conf>
+
+ <ws:screens>
+
+ <ws:screen name="InvoiceContents">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="titleProperty" value="PageTitleInvoiceContent"/>
+ <ws:set field="tabButtonItem" value="invoiceContent"/>
+ <ws:set field="sortField" from-field="parameters.sortField" default-value="contentId"/>
+ <ws:entity-and entity-name="InvoiceContent" list="invoiceContentList">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="${sortField}" />
+ </ws:entity-and>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:screenlet title="${uiLabelMap.CommonContent}">
+ <ws:include-grid name="InvoiceContents" location="component://accounting/widget/accounting/AccountingInvoiceContentCpd.xml"/>
+ </ws:screenlet>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ </ws:screens>
+
+
+ <wf:forms>
+
+ <wf:grid name="InvoiceContents" list-name="invoiceContentList" paginate-target="Accounting/Invoice/Contents"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+ extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:auto-fields-entity entity-name="InvoiceContent" default-field-type="display"/>
+ </wf:grid>
+
+ </wf:forms>
+
+</compound-widgets>
diff --git a/applications/accounting/widget/accounting/AccountingInvoiceCpd.xml b/applications/accounting/widget/accounting/AccountingInvoiceCpd.xml
new file mode 100644
index 0000000000..8ed6a60e3c
--- /dev/null
+++ b/applications/accounting/widget/accounting/AccountingInvoiceCpd.xml
@@ -0,0 +1,397 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- This document serves as an example for Compound Screen Widget feature -->
+<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sc="http://ofbiz.apache.org/Site-Conf"
+ xmlns:wf="http://ofbiz.apache.org/Widget-Form"
+ xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
+ xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
+
+ <sc:site-conf>
+ <sc:request-map uri="Accounting/Invoice/Find"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Find"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/List"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/List"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/New"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/New"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/View"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/View"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Edit"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Edit"/></sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/create">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="createInvoice"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/update">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="updateInvoice"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:view-map name="Accounting/Invoice/Find" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceCpd.xml#FindInvoices"/>
+ <sc:view-map name="Accounting/Invoice/List" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceCpd.xml#ListInvoices"/>
+ <sc:view-map name="Accounting/Invoice/New" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceCpd.xml#NewInvoice"/>
+ <sc:view-map name="Accounting/Invoice/View" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceCpd.xml#ViewInvoice"/>
+ <sc:view-map name="Accounting/Invoice/Edit" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceCpd.xml#EditInvoice"/>
+ </sc:site-conf>
+
+ <ws:screens>
+
+ <ws:screen name="FindInvoices">
+ <ws:section>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
+ <ws:decorator-section name="menu-bar">
+ <ws:include-menu name="FindInvoicesMenuBar" location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
+ </ws:decorator-section>
+ <ws:decorator-section name="search-options">
+ <ws:platform-specific>
+ <ws:html><ws:html-template multi-block="true" location="component://common-theme/template/includes/SetMultipleSelectJsList.ftl"/></ws:html>
+ </ws:platform-specific>
+ <ws:include-form name="FindInvoices" location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
+ </ws:decorator-section>
+ <ws:decorator-section name="search-results">
+ <ws:include-screen name="ListInvoices" location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+ <ws:screen name="ListInvoices">
+ <ws:section>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="list">
+ <ws:include-grid name="ListInvoices" location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="NewInvoice">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="titleProperty" value="AccountingCreateNewInvoice"/>
+ <ws:set field="helpAnchor" value="_help_for_new_invoice"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:screenlet title="${uiLabelMap.AccountingCreateNewSalesInvoice}">
+ <ws:include-form name="NewSalesInvoice" location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
+ </ws:screenlet>
+ <ws:screenlet title="${uiLabelMap.AccountingCreateNewPurchaseInvoice}">
+ <ws:include-form name="NewPurchaseInvoice" location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
+ </ws:screenlet>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="ViewInvoice">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="titleProperty" value="PageTitleInvoiceOverview"/>
+ <ws:set field="tabButtonItem" value="invoiceOverview"/>
+ <ws:set field="helpAnchor" value="_help_for_invoice_overview"/>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:section>
+ <ws:condition>
+ <ws:not><ws:if-empty field="invoice"/></ws:not>
+ </ws:condition>
+ <ws:actions>
+ <ws:entity-and entity-name="InvoiceRole" list="invoiceRoles">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="partyId"/>
+ </ws:entity-and>
+ <ws:entity-and entity-name="InvoiceStatus" list="invoiceStatus">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="statusDate"/>
+ </ws:entity-and>
+ <ws:entity-and entity-name="InvoiceTerm" list="invoiceTerms">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="invoiceTermId"/>
+ </ws:entity-and>
+ <ws:entity-and entity-name="TimeEntry" list="timeEntries">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="invoiceItemSeqId"/>
+ </ws:entity-and>
+ <ws:script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/CreateApplicationList.groovy"/>
+ <ws:set field="parameters.statusId" from-field="invoice.statusId"/>
+ <ws:set field="invoiceAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}" type="BigDecimal"/>
+ <ws:set field="notAppliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
+ <ws:set field="appliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(invoice)}" type="BigDecimal"/>
+ <ws:entity-condition entity-name="InvItemAndOrdItem" list="invItemAndOrdItems">
+ <ws:condition-expr field-name="invoiceId" operator="equals" from-field="invoiceId"/>
+ <ws:order-by field-name="invoiceItemSeqId"/>
+ </ws:entity-condition>
+ <ws:entity-condition entity-name="AcctgTransAndEntries" list="acctgTransAndEntries">
+ <ws:condition-expr field-name="invoiceId" operator="equals" from-field="invoiceId"/>
+ <ws:order-by field-name="acctgTransId"/>
+ <ws:order-by field-name="acctgTransEntrySeqId"/>
+ </ws:entity-condition>
+ </ws:actions>
+ <ws:widgets>
+ <ws:screenlet title="${uiLabelMap.AccountingInvoiceHeader}">
+ <ws:include-form name="InvoiceHeader" location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
+ </ws:screenlet>
+ <ws:container style="lefthalf">
+ <ws:screenlet title="${uiLabelMap.CommonStatus}" navigation-form-name="ListInvoiceStatus">
+ <ws:include-grid name="ListInvoiceStatus" location="component://accounting/widget/accounting/AccountingInvoiceStatusCpd.xml"/>
+ </ws:screenlet>
+ <ws:screenlet title="${uiLabelMap.AccountingAppliedPayments} ${appliedAmount?currency(${invoice.currencyUomId})} ${uiLabelMap.AccountingOpenPayments} ${notAppliedAmount?currency(${invoice.currencyUomId})}"
+ navigation-form-name="ListInvoiceApplications">
+ <ws:include-grid name="ListInvoiceApplications" location="component://accounting/widget/accounting/AccountingInvoiceApplicationCpd.xml"/>
+ </ws:screenlet>
+ </ws:container>
+ <ws:container style="righthalf">
+ <ws:screenlet title="${uiLabelMap.AccountingInvoiceRoles}" navigation-form-name="InvoiceRoles">
+ <ws:include-grid name="InvoiceRoles" location="component://accounting/widget/accounting/AccountingInvoiceRoleCpd.xml"/>
+ </ws:screenlet>
+ <ws:screenlet title="${uiLabelMap.PartyTerms}">
+ <ws:section>
+ <ws:condition>
+ <ws:if-compare field="invoice.statusId" operator="equals" value="INVOICE_IN_PROCESS"/>
+ </ws:condition>
+ <ws:widgets>
+ <ws:include-grid name="InvoiceTerms" location="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml"/>
+ </ws:widgets>
+ <ws:fail-widgets>
+ <ws:include-grid name="ListInvoiceTerms" location="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml"/>
+ </ws:fail-widgets>
+ </ws:section>
+ <ws:include-grid name="ListInvoicePaymentInfo" location="component://accounting/widget/InvoiceForms.xml"/>
+ </ws:screenlet>
+ </ws:container>
+ <ws:container style="clear"/>
+ <ws:screenlet title="${uiLabelMap.AccountingInvoiceItems}" navigation-form-name="InvoiceItems">
+ <ws:include-grid name="ListInvoiceItems" location="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml"/>
+ </ws:screenlet>
+ <ws:section>
+ <ws:condition>
+ <ws:not><ws:if-empty field="timeEntries"/></ws:not>
+ </ws:condition>
+ <ws:widgets>
+ <ws:screenlet title="${uiLabelMap.AccountingInvoiceTimeEntries}" navigation-form-name="ListTimeEntries">
+ <ws:include-grid name="ViewInvoiceTimeEntries" location="component://accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml"/>
+ </ws:screenlet>
+ </ws:widgets>
+ </ws:section>
+ <ws:screenlet title="${uiLabelMap.AccountingTransactions}" navigation-form-name="AcctgTransAndEntries">
+ <ws:include-grid name="AcctgTransAndEntries" location="component://accounting/widget/InvoiceForms.xml"/>
+ </ws:screenlet>
+ </ws:widgets>
+ <ws:fail-widgets>
+ <ws:label text="${uiLabelMap.AccountingInvoiceDoesNotExists}"></ws:label>
+ </ws:fail-widgets>
+ </ws:section>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="EditInvoice">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="titleProperty" value="PageTitleEditInvoice"/>
+ <ws:set field="tabButtonItem" value="editInvoice"/>
+ <ws:set field="helpAnchor" value="_help_for_edit_invoice_header"/>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ <ws:entity-one entity-name="InvoiceType" value-field="invoiceType">
+ <ws:field-map field-name="invoiceTypeId" from-field="invoice.invoiceTypeId"/>
+ </ws:entity-one>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:include-form name="EditInvoice" location="component://accounting/widget/accounting/AccountingInvoiceCpd.xml"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ </ws:screens>
+
+ <wm:menus>
+
+ <wm:menu name="FindInvoicesMenuBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+ <wm:menu-item name="AccountingInvoiceCreate" title="${uiLabelMap.AccountingCreateNewInvoice}">
+ <wm:condition>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/New" link-type="layered-modal">
+ <wm:set-callback area-target="Accounting/Invoice/Find"/>
+ </wm:link>
+ </wm:menu-item>
+ </wm:menu>
+
+ </wm:menus>
+
+ <wf:forms>
+
+ <wf:form name="FindInvoices" type="single" target="Accounting/Invoice/Find" title="Find and list invoices" default-map-name="parameters"
+ header-row-style="header-row" default-table-style="basic-table" extends="CommonDynamicSingle" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:field name="noConditionFind"><wf:hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></wf:field>
+ <wf:field name="invoiceId"><wf:text-find ignore-case="true"/></wf:field>
+ <wf:field name="description"><wf:text-find ignore-case="true"/></wf:field>
+ <wf:field position="1" name="invoiceTypeId">
+ <wf:drop-down allow-empty="true">
+ <wf:entity-options entity-name="InvoiceType"/>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field name="statusId">
+ <wf:drop-down allow-multiple="true">
+ <wf:entity-options entity-name="StatusItem" key-field-name="statusId">
+ <wf:entity-constraint name="statusTypeId" operator="equals" value="INVOICE_STATUS"/>
+ <wf:entity-order-by field-name="sequenceId"/>
+ </wf:entity-options>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field position="1" name="partyIdFrom"><wf:lookup target-form-name="LookupPartyName"/></wf:field>
+ <wf:field position="2" name="partyIdTo" parameter-name="partyId"><wf:lookup target-form-name="LookupPartyName"/></wf:field>
+ <wf:field name="billingAccountId"><wf:lookup target-form-name="LookupBillingAccount"/></wf:field>
+ <wf:field name="invoiceDate"><wf:date-find type="date"/></wf:field>
+ <wf:field name="referenceNumber"><wf:text-find/></wf:field>
+ <wf:field name="searchButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><wf:submit button-type="button"/></wf:field>
+ </wf:form>
+
+ <wf:grid name="ListInvoices" list-name="listIt" separate-columns="true" default-entity-name="Invoice" paginate-target="Accounting/Invoice/List"
+ odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"
+ extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:actions>
+ <wf:set field="parameters.sortField" from-field="parameters.sortField" default-value="-invoiceDate"/>
+ <wf:service service-name="performFind" result-map="result" result-map-list="listIt">
+ <wf:field-map field-name="inputFields" from-field="parameters"/>
+ <wf:field-map field-name="entityName" value="InvoiceAndType"/>
+ <wf:field-map field-name="orderBy" from-field="parameters.sortField"/>
+ <wf:field-map field-name="viewIndex" from-field="viewIndex"/>
+ <wf:field-map field-name="viewSize" from-field="viewSize"/>
+ </wf:service>
+ </wf:actions>
+ <wf:row-actions>
+ <wf:service service-name="getPartyNameForDate" result-map="partyNameResultFrom">
+ <wf:field-map field-name="partyId" from-field="partyIdFrom"/>
+ <wf:field-map field-name="compareDate" from-field="invoiceDate"/>
+ <wf:field-map field-name="lastNameFirst" value="Y"/>
+ </wf:service>
+ <wf:service service-name="getPartyNameForDate" result-map="partyNameResultTo">
+ <wf:field-map field-name="partyId" from-field="partyId"/>
+ <wf:field-map field-name="compareDate" from-field="invoiceDate"/>
+ <wf:field-map field-name="lastNameFirst" value="Y"/>
+ </wf:service>
+ <wf:set field="amountToApply" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)}"/>
+ <wf:set field="total" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)}"/>
+ </wf:row-actions>
+ <wf:field name="invoiceId" widget-style="buttontext" sort-field="true">
+ <wf:hyperlink description="${invoiceId}" target="invoiceOverview">
+ <wf:parameter param-name="invoiceId"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field name="invoiceTypeId" sort-field="true"><wf:display-entity entity-name="InvoiceType"/></wf:field>
+ <wf:field name="invoiceDate" sort-field="true"><wf:display type="date"/></wf:field>
+ <wf:field name="statusId" title="${uiLabelMap.CommonStatus}" sort-field="true"><wf:display-entity entity-name="StatusItem"/></wf:field>
+ <wf:field name="description" sort-field="true"><wf:display/></wf:field>
+ <wf:field name="partyIdFrom" title="${uiLabelMap.AccountingFromParty}" sort-field="true">
+ <wf:hyperlink description="${partyNameResultFrom.fullName} [${partyIdFrom}]" target="/partymgr/control/PartyFinancialHistory" target-type="inter-app">
+ <wf:parameter param-name="partyId" from-field="partyIdFrom"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field name="partyIdTo" title="${uiLabelMap.AccountingToParty}" parameter-name="partyId">
+ <wf:hyperlink description="${partyNameResultTo.fullName} [${partyId}]" target="/partymgr/control/PartyFinancialHistory" target-type="inter-app">
+ <wf:parameter param-name="partyId"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field name="total" widget-area-style="align-text"><wf:display type="currency" currency="${currencyUomId}"/></wf:field>
+ <wf:field name="amountToApply" widget-area-style="align-text"><wf:display type="currency" currency="${currencyUomId}"/></wf:field>
+ </wf:grid>
+
+ <wf:form name="NewSalesInvoice" extends="NewSalesInvoice" extends-resource="component://accounting/widget/InvoiceForms.xml">
+ <wf:alt-target target="Accounting/Invoice/create" use-when="invoice==null"/>
+ </wf:form>
+
+ <wf:form name="NewPurchaseInvoice" extends="NewPurchaseInvoice" extends-resource="component://accounting/widget/InvoiceForms.xml">
+ <wf:alt-target target="Accounting/Invoice/create" use-when="invoice==null"/>
+ </wf:form>
+
+ <wf:form name="InvoiceHeader" type="single" title="Invoice header information" default-map-name="invoice"
+ header-row-style="header-row" default-table-style="basic-table">
+ <wf:actions>
+ <wf:set field="total" value="${groovy:return(org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice));}"/>
+ <wf:service service-name="getPartyNameForDate" result-map="partyNameResultFrom">
+ <wf:field-map field-name="partyId" from-field="invoice.partyIdFrom"/>
+ <wf:field-map field-name="compareDate" from-field="invoice.invoiceDate"/>
+ <wf:field-map field-name="lastNameFirst" value="Y"/>
+ </wf:service>
+ <wf:service service-name="getPartyNameForDate" result-map="partyNameResultTo">
+ <wf:field-map field-name="partyId" from-field="invoice.partyId"/>
+ <wf:field-map field-name="compareDate" from-field="invoice.invoiceDate"/>
+ <wf:field-map field-name="lastNameFirst" value="Y"/>
+ </wf:service>
+ </wf:actions>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field position="1" name="invoiceTypeId"><wf:display-entity entity-name="InvoiceType"/></wf:field>
+ <wf:field name="statusId" title="${uiLabelMap.CommonStatus}" position="2"><wf:display-entity entity-name="StatusItem"/></wf:field>
+ <wf:field position="1" name="description"><wf:display/></wf:field>
+ <wf:field position="2" name="invoiceMessage"><wf:display/></wf:field>
+ <wf:field position="1" name="partyIdFrom">
+ <wf:hyperlink description="${partyNameResultFrom.fullName} [${invoice.partyIdFrom}]" target="/partymgr/control/viewprofile" target-type="inter-app">
+ <wf:parameter param-name="partyId" from-field="invoice.partyIdFrom"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field position="2" name="partyIdTo" entry-name="partyId">
+ <wf:hyperlink description="${partyNameResultTo.fullName} [${invoice.partyId}]" target="/partymgr/control/viewprofile" target-type="inter-app">
+ <wf:parameter param-name="partyId" from-field="invoice.partyId"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field position="1" name="roleTypeId"><wf:display/></wf:field>
+ <wf:field position="2" name="billingAccountId"><wf:display/></wf:field>
+ <wf:field position="1" name="invoiceDate"><wf:display description="${groovy:if(invoice.get("invoiceDate")!=null)return(invoice.getString("invoiceDate").substring(0,10));}"/></wf:field>
+ <wf:field position="2" name="dueDate"><wf:display description="${groovy:if(invoice.get("dueDate")!=null)return(invoice.getString("dueDate").substring(0,10));}"/></wf:field>
+ <wf:field position="1" name="total"><wf:display description="${total}" type="currency" currency="${invoice.currencyUomId}"/></wf:field>
+ <wf:field position="2" name="paidDate"><wf:display description="${groovy:if(invoice.get("paidDate")!=null)return(invoice.getString("paidDate").substring(0,10));}"/></wf:field>
+ <wf:field position="1" name="referenceNumber" title="${uiLabelMap.FormFieldTitle_referenceNum}"><wf:display/></wf:field>
+ <wf:field name="currencyUomId"><wf:hidden/></wf:field>
+ </wf:form>
+
+ <wf:form name="EditInvoice" extends="EditInvoice" extends-resource="component://accounting/widget/InvoiceForms.xml">
+ <wf:alt-target target="Accounting/Invoice/update" use-when="invoice!=null"/>
+ <wf:alt-target target="Accounting/Invoice/create" use-when="invoice==null" />
+ <wf:field position="1" name="description"><wf:textarea maxlength="100"/></wf:field>
+ <wf:field position="1" name="invoiceMessage"><wf:textarea maxlength="100"/></wf:field>
+ </wf:form>
+
+ </wf:forms>
+
+</compound-widgets>
diff --git a/applications/accounting/widget/accounting/AccountingInvoiceItemCpd.xml b/applications/accounting/widget/accounting/AccountingInvoiceItemCpd.xml
new file mode 100644
index 0000000000..6ecc651da3
--- /dev/null
+++ b/applications/accounting/widget/accounting/AccountingInvoiceItemCpd.xml
@@ -0,0 +1,431 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- This document serves as an example for Compound Screen Widget feature -->
+<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sc="http://ofbiz.apache.org/Site-Conf"
+ xmlns:wf="http://ofbiz.apache.org/Widget-Form"
+ xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
+ xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
+
+ <sc:site-conf>
+
+ <sc:request-map uri="Accounting/Invoice/Items"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Items"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Item/Add"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Item/Add"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Item/Edit"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Item/Edit"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Items/Edit"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Items/Edit"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Items/List"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Items/List"/></sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Item/create">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="createInvoiceItem"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Item/update">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="updateInvoiceItem"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Items/update">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service-multi" invoke="updateInvoiceItem"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Item/delete">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="removeInvoiceItem"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:view-map name="Accounting/Invoice/Items" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml#InvoiceItems"/>
+ <sc:view-map name="Accounting/Invoice/Item/Add" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml#AddInvoiceItem"/>
+ <sc:view-map name="Accounting/Invoice/Item/Edit" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml#EditInvoiceItem"/>
+ <sc:view-map name="Accounting/Invoice/Items/Edit" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml#EditInvoiceItems"/>
+ <sc:view-map name="Accounting/Invoice/Items/List" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml#ListInvoiceItems"/>
+
+ </sc:site-conf>
+
+ <ws:screens>
+
+ <ws:screen name="InvoiceItems">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="viewIndex" from-field="parameters.viewIndex"/>
+ <ws:set field="viewSize" from-field="parameters.viewSize"/>
+ <ws:set field="titleProperty" value="PageTitleListInvoices"/>
+ <ws:set field="tabButtonItem" value="listInvoiceItems"/>
+ <ws:set field="helpAnchor" value="_help_for_edit_invoice_time_entries"/>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:set field="invoiceItemSeqd" from-field="parameters.invoiceItemSeqId"/>
+ <ws:property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="actions">
+ <ws:include-menu name="InvoiceItemsTabBar" location="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml"/>
+ </ws:decorator-section>
+ <ws:decorator-section name="single">
+ <ws:include-screen name="ListInvoiceItems"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="AddInvoiceItem">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:section>
+ <ws:condition>
+ <ws:not><ws:if-compare field="invoice.invoiceTypeId" operator="equals" value="PAYROL_INVOICE"/></ws:not>
+ </ws:condition>
+ <ws:widgets>
+ <ws:include-screen name="InvoiceItem"/>
+ </ws:widgets>
+ <ws:fail-widgets>
+ <ws:include-screen name="InvoiceItemsPayrol"/>
+ </ws:fail-widgets>
+ </ws:section>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="EditInvoiceItem">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:section>
+ <ws:condition>
+ <ws:not><ws:if-compare field="invoice.invoiceTypeId" operator="equals" value="PAYROL_INVOICE"/></ws:not>
+ </ws:condition>
+ <ws:widgets>
+ <ws:include-screen name="InvoiceItem"/>
+ </ws:widgets>
+ <ws:fail-widgets>
+ <ws:include-screen name="InvoiceItemsPayrol"/>
+ </ws:fail-widgets>
+ </ws:section>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="InvoiceItem">
+ <ws:section>
+ <ws:actions>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ <ws:entity-one entity-name="InvoiceItem" value-field="invoiceItem"/>
+ <ws:script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/GetAccountOrganizationAndClass.groovy"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:include-form name="EditInvoiceItem" location="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="InvoiceItemsPayrol">
+ <ws:section>
+ <ws:actions>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ <ws:entity-one entity-name="InvoiceItem" value-field="invoiceItem"/>
+ <ws:entity-condition entity-name="InvoiceItemType" list="PayrolGroup">
+ <ws:condition-expr field-name="parentTypeId" value="PAYROL"/>
+ </ws:entity-condition>
+ <ws:entity-condition entity-name="InvoiceItemType" list="PayrolList"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:platform-specific>
+ <ws:html>
+ <ws:html-template location="component://accounting/template/invoice/InvoiceItemsPayrol.ftl"/>
+ </ws:html>
+ </ws:platform-specific>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="ListInvoiceItems">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="sortField" from-field="parameters.sortField" default-value="invoiceItemSeqId"/>
+ <ws:entity-condition entity-name="InvItemAndOrdItem" list="invItemAndOrdItems">
+ <ws:condition-expr field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="${sortField}"/>
+ </ws:entity-condition>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="list">
+ <ws:screenlet title="${uiLabelMap.AccountingInvoiceItems}">
+ <ws:include-grid name="InvoiceItems" location="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml"/>
+ </ws:screenlet>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="EditInvoiceItems">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="sortField" from-field="parameters.sortField" default-value="invoiceItemSeqId"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ <ws:entity-and entity-name="InvoiceItem" list="invoiceItems">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="${sortField}"/>
+ </ws:entity-and>
+ <ws:script location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/GetAccountOrganizationAndClass.groovy"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="list">
+ <ws:include-form name="EditInvoiceItems" location="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ </ws:screens>
+
+ <wm:menus>
+
+ <wm:menu name="InvoiceItemsTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+ <wm:menu-item name="AddInvoiceItem" title="${uiLabelMap.AccountingInvoiceItemAdd}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Item/Add" link-type="layered-modal">
+ <wm:parameter param-name="invoiceId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Items">
+ <wm:parameter param-name="invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ <wm:menu-item name="EditInvoiceItems" title="${uiLabelMap.AccountingInvoiceItemsEdit}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Items/Edit" link-type="layered-modal" width="1600">
+ <wm:parameter param-name="invoiceId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Items">
+ <wm:parameter param-name="invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ </wm:menu>
+
+ <wm:menu name="ListInvoiceItemsInLineBar"
+ extends="CommonInlineBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+ <wm:menu-item name="UpdateInvoiceItem" title="${uiLabelMap.CommonEdit}">
+ <wm:condition>
+ <wm:and>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ <wm:if-compare field="invoice.invoiceTypeId" operator="not-equals" value="PAYROL_INVOICE"/>
+ </wm:and>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Item/Edit" link-type="layered-modal" style="buttontext">
+ <wm:parameter param-name="invoiceId"/>
+ <wm:parameter param-name="invoiceItemSeqId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Items/List">
+ <wm:parameter param-name="invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ <wm:menu-item name="DeleteInvoiceItem" title="${uiLabelMap.CommonRemove}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Item/delete" request-confirmation="true" style="buttontext">
+ <wm:parameter param-name="invoiceId"/>
+ <wm:parameter param-name="invoiceItemSeqId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Items/List">
+ <wm:parameter param-name="invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ </wm:menu>
+
+ </wm:menus>
+
+ <wf:forms>
+
+ <wf:form name="EditInvoiceItem" type="single" target="Accounting/Invoice/Item/create" title="" default-map-name="invoiceItem" default-entity-name="InvoiceItem"
+ header-row-style="header-row" default-table-style="basic-table"
+ extends="CommonBasicSingle" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:alt-target use-when="invoiceItem!=null" target="Accounting/Invoice/Item/update"/>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="invoiceItemSeqId"><wf:hidden/></wf:field>
+ <wf:field position="1" name="invoiceItemTypeId">
+ <wf:drop-down allow-empty="false">
+ <wf:list-options list-name="invoiceItemTypes" key-name="invoiceItemTypeId" description="${groovy:uiLabelMap.get('InvoiceItemType.description.'+invoiceItemTypeId)}"/>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field position="1" name="description"><wf:text size="80"/></wf:field>
+ <wf:field position="1" name="overrideGlAccountId">
+ <wf:drop-down allow-empty="true">
+ <wf:list-options list-name="glAccountOrganizationAndClassList" key-name="glAccountId" description="${glAccountId} ${accountName}"/>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field position="1" name="inventoryItemId"><wf:text/></wf:field>
+ <wf:field position="1" name="productId">
+ <wf:lookup target-form-name="LookupProduct"/>
+ </wf:field>
+ <wf:field position="1" name="productFeatureId">
+ <wf:lookup target-form-name="LookupProductFeature"/>
+ </wf:field>
+ <wf:field position="1" name="quantity"><wf:text size="10"/></wf:field>
+ <wf:field position="1" name="uomId">
+ <wf:drop-down allow-empty="true">
+ <wf:entity-options key-field-name="uomId" description="${description} - ${abbreviation}" entity-name="Uom">
+ <wf:entity-constraint name="uomTypeId" operator="not-equals" value="CURRENCY_MEASURE"/>
+ <wf:entity-order-by field-name="description"/>
+ </wf:entity-options>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field position="1" name="amount" title="${uiLabelMap.AccountingUnitPrice}"><wf:text size="10"/></wf:field>
+ <wf:field position="1" name="taxableFlag">
+ <wf:drop-down allow-empty="false" current="selected">
+ <wf:option key="Y" description="${uiLabelMap.CommonYes}"/>
+ <wf:option key="N" description="${uiLabelMap.CommonNo}"/>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field name="addButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit" use-when="invoiceItem==null">
+ <wf:submit button-type="button"/>
+ </wf:field>
+ <wf:field name="updateButton" title="${uiLabelMap.CommonEdit}" widget-style="smallSubmit" use-when="invoiceItem!=null">
+ <wf:submit button-type="button"/>
+ </wf:field>
+ </wf:form>
+
+ <wf:form name="EditInvoiceItems" type="multi" list-name="invoiceItems" default-entity-name="InvoiceItem" separate-columns="true"
+ target="Accounting/Invoice/Items/update?invoiceId=${invoiceId}&viewSize=${viewSize}&viewIndex=${viewIndex}"
+ title="Edit Invoice Items" paginate-target="Accounting/Invoice/Items/Edit" odd-row-style="alternate-row"
+ default-table-style="basic-table hover-bar" extends="CommonDynamicMulti" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:row-actions>
+ <wf:set field="total" value="${groovy: (quantity ?: 1) * (amount ?: 0)}" type="BigDecimal"/>
+ </wf:row-actions>
+ <wf:field name="viewSize"><wf:hidden value="${viewSize}"/></wf:field>
+ <wf:field name="viewIndex"><wf:hidden value="${viewIndex}"/></wf:field>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="uomId"><wf:hidden/></wf:field>
+ <wf:field name="taxableFlag"><wf:hidden/></wf:field>
+ <wf:field name="invoiceItemSeqId"><wf:display/></wf:field>
+ <wf:field name="quantity"><wf:text size="10"/></wf:field>
+ <wf:field name="invoiceItemTypeId">
+ <wf:drop-down allow-empty="false">
+ <wf:list-options list-name="invoiceItemTypes" key-name="invoiceItemTypeId" description="${groovy:uiLabelMap.get('InvoiceItemType.description.'+invoiceItemTypeId)}"/>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field name="productId"><wf:lookup target-form-name="LookupProduct" size="20"/></wf:field>
+ <wf:field name="description"><wf:text size="50"/></wf:field>
+ <wf:field name="overrideGlAccountId">
+ <wf:drop-down allow-empty="true">
+ <wf:list-options list-name="glAccountOrganizationAndClassList" key-name="glAccountId" description="${glAccountId} ${accountName}"/>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field name="amount" title="${uiLabelMap.AccountingUnitPrice}"><wf:text size="10"/></wf:field>
+ <wf:field name="total" widget-area-style="align-text"><wf:display type="currency" currency="${invoice.currencyUomId}"/></wf:field> <!-- this should not look like something you can modify, hence display -->
+ <wf:field name="updateButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit" ><wf:submit button-type="button"/></wf:field>
+ </wf:form>
+
+ <wf:grid name="ListInvoiceItems" list-name="invItemAndOrdItems" separate-columns="true"
+ paginate-target="Accounting/Invoice/Items/List" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+ extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:row-actions>
+ <wf:set field="quantity" value="${groovy: quantity ?: 1}" type="BigDecimal"/>
+ <wf:set field="total" value="${groovy: quantity * amount ?: 0}" type="BigDecimal"/>
+ </wf:row-actions>
+ <wf:auto-fields-entity entity-name="InvoiceItem" default-field-type="display"/>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="invoiceItemSeqId"><wf:display/></wf:field>
+ <wf:field name="invoiceItemTypeId"><wf:display-entity entity-name="InvoiceItemType"/></wf:field>
+ <wf:field name="orderId" widget-style="linktext">
+ <wf:hyperlink description="${orderId}" target="/ordermgr/control/orderview" target-type="inter-app">
+ <wf:parameter param-name="orderId"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field name="orderItemSeqId" widget-area-style="align-text"><wf:display/></wf:field>
+ <wf:field name="inventoryItemId" widget-area-style="align-text"><wf:display/></wf:field>
+ <wf:field name="quantity" widget-area-style="align-text"><wf:display/></wf:field>
+ <wf:field name="amount" title="${uiLabelMap.AccountingUnitPrice}" widget-area-style="align-text"><wf:display type="currency" currency="${invoice.currencyUomId}"/></wf:field>
+ <wf:field name="total"><wf:display type="currency" currency="${invoice.currencyUomId}"/></wf:field>
+ <wf:field name="productId" widget-style="linktext">
+ <wf:hyperlink description="${productId}" target="/catalog/control/EditProduct" target-type="inter-app">
+ <wf:parameter param-name="productId"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field name="overrideGlAccountId" widget-area-style="align-text">
+ <wf:hyperlink description="${overrideGlAccountId}" target="GlAccountNavigate">
+ <wf:parameter param-name="glAccountId" from-field="overrideGlAccountId"/>
+ </wf:hyperlink>
+ </wf:field>
+ </wf:grid>
+
+ <wf:grid name="InvoiceItems" separate-columns="true"
+ extends="ListInvoiceItems" extends-resource="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml">
+ <wf:field name="menuAction" title=" ">
+ <wf:include-menu name="ListInvoiceItemsInLineBar" location="component://accounting/widget/accounting/AccountingInvoiceItemCpd.xml"/>
+ </wf:field>
+ </wf:grid>
+
+ </wf:forms>
+
+</compound-widgets>
diff --git a/applications/accounting/widget/accounting/AccountingInvoiceNoteCpd.xml b/applications/accounting/widget/accounting/AccountingInvoiceNoteCpd.xml
new file mode 100644
index 0000000000..bc3d5473f0
--- /dev/null
+++ b/applications/accounting/widget/accounting/AccountingInvoiceNoteCpd.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- This document serves as an example for Compound Screen Widget feature -->
+<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sc="http://ofbiz.apache.org/Site-Conf"
+ xmlns:wf="http://ofbiz.apache.org/Widget-Form"
+ xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
+ xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
+
+ <sc:site-conf>
+
+ <sc:request-map uri="Accounting/Invoice/Notes"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Notes"/></sc:request-map>
+
+ <sc:view-map name="Accounting/Invoice/Notes" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceNoteCpd.xml#InvoiceNotes"/>
+
+ </sc:site-conf>
+
+ <ws:screens>
+
+ <ws:screen name="InvoiceNotes">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="titleProperty" value="PageTitleInvoiceNotes"/>
+ <ws:set field="tabButtonItem" value="invoiceNotes"/>
+ <ws:set field="sortField" from-field="parameters.sortField" default-value="noteId"/>
+ <ws:entity-and entity-name="InvoiceNote" list="invoiceNotesList">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="${sortField}" />
+ </ws:entity-and>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:screenlet title="${uiLabelMap.CommonNote}">
+ <ws:include-grid name="InvoiceNotes" location="component://accounting/widget/accounting/AccountingInvoiceNoteCpd.xml"/>
+ </ws:screenlet>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ </ws:screens>
+
+
+ <wf:forms>
+
+ <wf:grid name="InvoiceNotes" list-name="invoiceNotesList" paginate-target="Accounting/Invoice/Notes"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+ <wf:auto-fields-entity entity-name="InvoiceNote" default-field-type="display"/>
+ </wf:grid>
+
+ </wf:forms>
+
+</compound-widgets>
diff --git a/applications/accounting/widget/accounting/AccountingInvoiceRoleCpd.xml b/applications/accounting/widget/accounting/AccountingInvoiceRoleCpd.xml
new file mode 100644
index 0000000000..fa1505727b
--- /dev/null
+++ b/applications/accounting/widget/accounting/AccountingInvoiceRoleCpd.xml
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- This document serves as an example for Compound Screen Widget feature -->
+<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sc="http://ofbiz.apache.org/Site-Conf"
+ xmlns:wf="http://ofbiz.apache.org/Widget-Form"
+ xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
+ xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
+
+ <sc:site-conf>
+
+ <sc:request-map uri="Accounting/Invoice/Role/Add"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Role/Add"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Roles"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Roles"/></sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Role/create">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="createInvoiceRole"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:view-map name="Accounting/Invoice/Role/Add" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceRoleCpd.xml#EditInvoiceRole"/>
+ <sc:view-map name="Accounting/Invoice/Roles" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceRoleCpd.xml#InvoiceRoles"/>
+
+ </sc:site-conf>
+
+ <ws:screens>
+
+ <ws:screen name="InvoiceRoles">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="titleProperty" value="PageTitleListInvoiceRoles"/>
+ <ws:set field="tabButtonItem" value="invoiceRoles"/>
+ <ws:set field="helpAnchor" value="_help_for_invoice_roles"/>
+ <ws:set field="sortField" from-field="parameters.sortField" default-value="partyId"/>
+ <ws:entity-and entity-name="InvoiceRole" list="invoiceRoles">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="${sortField}" />
+ </ws:entity-and>
+ </ws:actions>
+ <ws:widgets>
+ <ws:section>
+ <ws:condition>
+ <ws:or>
+ <ws:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <ws:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </ws:or>
+ </ws:condition>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="actions">
+ <ws:include-menu name="InvoiceRolesTabBar" location="component://accounting/widget/accounting/AccountingInvoiceRoleCpd.xml"/>
+ </ws:decorator-section>
+ <ws:decorator-section name="single">
+ <ws:screenlet title="${uiLabelMap.CommonRole}">
+ <ws:include-grid name="ListInvoiceRoles" location="component://accounting/widget/accounting/AccountingInvoiceRoleCpd.xml"/>
+ </ws:screenlet>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ <ws:fail-widgets>
+ <ws:screenlet title="${uiLabelMap.CommonRoles}">
+ <ws:include-grid name="InvoiceRoles" location="component://accounting/widget/accounting/AccountingInvoiceRoleCpd.xml"/>
+ </ws:screenlet>
+ </ws:fail-widgets>
+ </ws:section>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="EditInvoiceRole">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:include-form name="EditInvoiceRole" location="component://accounting/widget/accounting/AccountingInvoiceRoleCpd.xml"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ </ws:screens>
+
+ <wm:menus>
+
+ <wm:menu name="InvoiceRolesTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+ <wm:menu-item name="AddInvoiceRole" title="${uiLabelMap.AccountingPartyRoleAdd}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Role/Add" link-type="layered-modal">
+ <wm:parameter param-name="invoiceId" from-field="parameters.invoiceId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Roles">
+ <wm:parameter param-name="invoiceId" from-field="parameters.invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ </wm:menu>
+
+ </wm:menus>
+
+ <wf:forms>
+
+ <wf:form name="EditInvoiceRole" target="Accounting/Invoice/Role/create" type="single"
+ title="" header-row-style="header-row" default-table-style="basic-table">
+ <wf:auto-fields-entity entity-name="InvoiceRole"/>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="partyId"><wf:lookup target-form-name="LookupPartyName"/></wf:field>
+ <wf:field name="roleTypeId">
+ <wf:drop-down allow-empty="false">
+ <wf:entity-options entity-name="RoleType">
+ <wf:entity-order-by field-name="description"/>
+ </wf:entity-options>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field name="submitButton" widget-style="smallSubmit"><wf:submit button-type="button"/></wf:field>
+ </wf:form>
+
+ <wf:grid name="ListInvoiceRoles" paginate-target="Accounting/Invoice/Roles" list-name="invoiceRoles" use-row-submit="true"
+ odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"
+ extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:auto-fields-entity entity-name="InvoiceRole" default-field-type="display"/>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="partyId" widget-style="buttontext">
+ <wf:hyperlink description="${partyId}" target-type="inter-app" target="/partymgr/control/viewprofile">
+ <wf:parameter param-name="partyId"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field name="name" entry-name="partyId">
+ <wf:display-entity also-hidden="false" entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${firstName} ${lastName}"/>
+ </wf:field>
+ <wf:field name="roleTypeId">
+ <wf:display-entity also-hidden="false" entity-name="RoleType"/>
+ </wf:field>
+ <wf:field name="percentage"><wf:display/></wf:field>
+ <wf:field name="datetimePerformed"><wf:display/></wf:field>
+ <wf:field name="removeButton" widget-style="buttontext">
+ <wf:hyperlink description="${uiLabelMap.CommonRemove}" target="removeInvoiceRole">
+ <wf:parameter param-name="invoiceId"/>
+ <wf:parameter param-name="partyId"/>
+ <wf:parameter param-name="roleTypeId"/>
+ <wf:parameter param-name="viewIndex"/>
+ <wf:parameter param-name="viewSize"/>
+ </wf:hyperlink>
+ </wf:field>
+ </wf:grid>
+
+ <wf:grid name="InvoiceRoles" paginate-target="Accounting/Invoice/Roles" list-name="invoiceRoles"
+ use-row-submit="true" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="partyId" widget-style="buttontext">
+ <wf:hyperlink description="${partyId}" target-type="inter-app" target="/partymgr/control/viewprofile">
+ <wf:parameter param-name="partyId"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field name="name" entry-name="partyId">
+ <wf:display-entity also-hidden="false" entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${firstName} ${lastName}"/>
+ </wf:field>
+ <wf:field name="roleTypeId">
+ <wf:display-entity also-hidden="false" entity-name="RoleType"/>
+ </wf:field>
+ <wf:field name="percentage"><wf:display/></wf:field>
+ <wf:field name="datetimePerformed"><wf:display/></wf:field>
+ </wf:grid>
+
+ </wf:forms>
+
+</compound-widgets>
diff --git a/applications/accounting/widget/accounting/AccountingInvoiceStatusCpd.xml b/applications/accounting/widget/accounting/AccountingInvoiceStatusCpd.xml
new file mode 100644
index 0000000000..6e63922cab
--- /dev/null
+++ b/applications/accounting/widget/accounting/AccountingInvoiceStatusCpd.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- This document serves as an example for Compound Screen Widget feature -->
+<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sc="http://ofbiz.apache.org/Site-Conf"
+ xmlns:wf="http://ofbiz.apache.org/Widget-Form"
+ xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
+ xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
+
+ <sc:site-conf>
+ <sc:request-map uri="Accounting/Invoice/Status/History"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Status/History"/></sc:request-map>
+
+ <sc:view-map name="Accounting/Invoice/Status/History" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceStatus.xml#InvoiceStatus"/>
+ </sc:site-conf>
+
+ <ws:screens>
+
+ <ws:screen name="InvoiceStatus">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="titleProperty" value="PageTitleListInvoices"/>
+ <ws:set field="tabButtonItem" value="invoiceStatus"/>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice" auto-field-map="true"/>
+ <ws:entity-and entity-name="InvoiceStatus" list="invoiceStatus">
+ <ws:field-map field-name="invoiceId" from-field="invoice.invoiceId"/>
+ <ws:order-by field-name="statusDate"/>
+ </ws:entity-and>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
+ <ws:decorator-section name="body">
+ <ws:screenlet title="${uiLabelMap.AccountingInvoiceStatusHistory}">
+ <ws:include-grid name="ListInvoiceStatus" location="component://accounting/widget/InvoiceForms.xml"/>
+ </ws:screenlet>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ </ws:screens>
+
+ <wf:forms>
+
+ <wf:grid name="ListInvoiceStatus" list-name="invoiceStatus" paginate-target="ListInvoiceStatus"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="statusDate"><wf:display description="${groovy:statusDate.toString().substring(0,10)}"/></wf:field>
+ <wf:field name="statusId" title="${uiLabelMap.CommonStatus}"><wf:display-entity entity-name="StatusItem"/></wf:field>
+ <wf:field name="changeByUserLoginId"><wf:display /></wf:field>
+ </wf:grid>
+
+ </wf:forms>
+
+</compound-widgets>
diff --git a/applications/accounting/widget/accounting/AccountingInvoiceTermCpd.xml b/applications/accounting/widget/accounting/AccountingInvoiceTermCpd.xml
new file mode 100644
index 0000000000..160a67a70e
--- /dev/null
+++ b/applications/accounting/widget/accounting/AccountingInvoiceTermCpd.xml
@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- This document serves as an example for Compound Screen Widget feature -->
+<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sc="http://ofbiz.apache.org/Site-Conf"
+ xmlns:wf="http://ofbiz.apache.org/Widget-Form"
+ xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
+ xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
+
+ <sc:site-conf>
+
+ <sc:request-map uri="Accounting/Invoice/Terms"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Terms"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Term/Add"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Term/Add"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Term/Edit"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Term/Edit"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/Terms/Edit"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/Terms/Edit"/></sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Term/create">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="createInvoiceTerm"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Term/update">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="updateInvoiceTerm"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Term/delete">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="deleteInvoiceTerm"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/Terms/update">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service-multi" invoke="updateInvoiceTerm"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:view-map name="Accounting/Invoice/Terms" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml#InvoiceTerms"/>
+ <sc:view-map name="Accounting/Invoice/Term/Add" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml#EditInvoiceTerm"/>
+ <sc:view-map name="Accounting/Invoice/Term/Edit" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml#EditInvoiceTerm"/>
+ <sc:view-map name="Accounting/Invoice/Terms/Edit" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml#EditInvoiceTerms"/>
+
+ </sc:site-conf>
+
+ <ws:screens>
+
+ <ws:screen name="InvoiceTerms">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="viewIndex" from-field="parameters.viewIndex"/>
+ <ws:set field="viewSize" from-field="parameters.viewSize"/>
+ <ws:set field="titleProperty" value="PageTitleListInvoiceTerms"/>
+ <ws:set field="tabButtonTerm" value="invoiceTerms"/>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:set field="sortField" from-field="parameters.sortField" default-value="termTypeId"/>
+ <ws:entity-and entity-name="InvoiceTerm" list="invoiceTerms">
+ <ws:field-map field-name="invoiceId" from-field="invoiceId"/>
+ <ws:order-by field-name="${sortField}"/>
+ </ws:entity-and>
+ <ws:entity-one entity-name="InvoiceTerm" value-field="invoiceTerm">
+ <ws:field-map field-name="invoiceTermId" from-field="parameters.invoiceTermId"/>
+ </ws:entity-one>
+ </ws:actions>
+ <ws:widgets>
+ <ws:section>
+ <ws:condition>
+ <ws:and>
+ <ws:or>
+ <ws:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <ws:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </ws:or>
+ </ws:and>
+ </ws:condition>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="actions">
+ <ws:include-menu name="InvoiceTermsTabBar" location="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml"/>
+ </ws:decorator-section>
+ <ws:decorator-section name="single">
+ <ws:screenlet title="${uiLabelMap.PartyTerms}">
+ <ws:include-grid name="InvoiceTerms" location="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml"/>
+ </ws:screenlet>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ <ws:fail-widgets>
+ <ws:screenlet title="${uiLabelMap.PartyTerms}">
+ <ws:include-grid name="InvoiceTerms" location="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml"/>
+ </ws:screenlet>
+ </ws:fail-widgets>
+ </ws:section>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="EditInvoiceTerm">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:set field="invoiceTermId" from-field="parameters.invoiceTermId"/>
+ <ws:entity-one entity-name="Invoice" value-field="invoice"/>
+ <ws:entity-one entity-name="InvoiceTerm" value-field="invoiceTerm"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:section>
+ <ws:condition>
+ <ws:not>
+ <ws:and>
+ <ws:or>
+ <ws:if-compare field="invoice.statusId" operator="equals" value="INVOICE_APPROVED"/>
+ </ws:or>
+ </ws:and>
+ </ws:not>
+ </ws:condition>
+ <ws:widgets>
+ <ws:include-form name="EditInvoiceTerm" location="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml"/>
+ </ws:widgets>
+ </ws:section>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="EditInvoiceTerms">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="sortField" from-field="parameters.sortField" default-value="invoiceTermId"/>
+ <ws:entity-and entity-name="InvoiceTerm" list="invoiceTerms">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="${sortField}"/>
+ </ws:entity-and>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="list">
+ <ws:include-form name="EditInvoiceTerms" location="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ </ws:screens>
+
+ <wm:menus>
+
+ <wm:menu name="InvoiceTermsTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+ <wm:menu-item name="AddInvoiceTerm" title="${uiLabelMap.AccountingInvoiceTermsAdd}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Term/Add" link-type="layered-modal">
+ <wm:parameter param-name="invoiceId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Terms">
+ <wm:parameter param-name="invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ <wm:menu-item name="EditInvoiceTerm" title="${uiLabelMap.AccountingInvoiceTermsEdit}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Terms/Edit" link-type="layered-modal" width="1600">
+ <wm:parameter param-name="invoiceId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Terms">
+ <wm:parameter param-name="invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ </wm:menu>
+
+ <wm:menu name="ListInvoiceTermsInLineBar"
+ extends="CommonInlineBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+ <wm:menu-item name="UpdateInvoiceTerm" title="${uiLabelMap.CommonEdit}">
+ <wm:condition>
+ <wm:and>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:and>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Term/Edit" link-type="layered-modal" style="buttontext">
+ <wm:parameter param-name="invoiceId"/>
+ <wm:parameter param-name="invoiceTermId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Terms">
+ <wm:parameter param-name="invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ <wm:menu-item name="DeleteInvoiceTerm" title="${uiLabelMap.CommonRemove}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/Term/delete" request-confirmation="true" style="buttontext">
+ <wm:parameter param-name="invoiceTermId"/>
+ <wm:parameter param-name="invoiceId"/>
+ <wm:set-callback area-target="Accounting/Invoice/Terms">
+ <wm:parameter param-name="invoiceId"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ </wm:menu>
+
+ </wm:menus>
+
+ <wf:forms>
+
+ <wf:grid name="ListInvoiceTerms" list-name="invoiceTerms"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+ <wf:auto-fields-entity entity-name="InvoiceTerm" default-field-type="display"/>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="invoiceTermId"><wf:display/></wf:field>
+ <wf:field name="termTypeId">
+ <wf:display-entity entity-name="TermType"/>
+ </wf:field>
+ <wf:field name="termDays" widget-area-style="align-right" title-area-style="align-right">
+ <wf:display/>
+ </wf:field>
+ <wf:field name="uomId" title="${uiLabelMap.Uom}">
+ <wf:display-entity entity-name="Uom"/>
+ </wf:field>
+ </wf:grid>
+
+ <wf:grid name="InvoiceTerms" list-name="invoiceTerms" paginate-target="Accounting/Invoice/Terms"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+ extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="invoiceTermId"><wf:display/></wf:field>
+ <wf:field name="termTypeId" title="${uiLabelMap.CommonType}">
+ <wf:display-entity entity-name="TermType"/>
+ </wf:field>
+ <wf:field name="invoiceItemSeqId" title="${uiLabelMap.CommonItem}"><wf:display/></wf:field>
+ <wf:field name="termValue" title="${uiLabelMap.CommonValue}" widget-area-style="align-right" title-area-style="align-right">
+ <wf:display type="currency" currency="${uomId}"/>
+ </wf:field>
+ <wf:field name="termDays" title="${uiLabelMap.CommonDays}" widget-area-style="align-right" title-area-style="align-right">
+ <wf:display/>
+ </wf:field>
+ <wf:field name="textValue" title="${uiLabelMap.CommonText}"><wf:display/></wf:field>
+ <wf:field name="description" title="${uiLabelMap.CommonDescription}"><wf:display/></wf:field>
+ <wf:field name="uomId" title="${uiLabelMap.CommonCurrency}">
+ <wf:display-entity entity-name="Uom"/>
+ </wf:field>
+ <wf:field name="menuAction" title=" ">
+ <wf:include-menu name="ListInvoiceTermsInLineBar" location="component://accounting/widget/accounting/AccountingInvoiceTermCpd.xml"/>
+ </wf:field>
+ </wf:grid>
+
+ <wf:form name="EditInvoiceTerm" type="single" target="Accounting/Invoice/Term/create" title=""
+ header-row-style="header-row" default-table-style="basic-table" default-map-name="invoiceTerm" default-entity-name="InvoiceTerm"
+ extends="CommonBasicSingle" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:alt-target use-when="invoiceTerm!=null" target="Accounting/Invoice/Term/update"/>
+ <wf:auto-fields-entity entity-name="InvoiceTerm"/>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="invoiceTermId" use-when="invoiceTerm!=null"><wf:display/></wf:field>
+ <wf:field name="invoiceTermId" use-when="invoiceTerm==null"><wf:text/></wf:field>
+ <wf:field name="termTypeId">
+ <wf:drop-down>
+ <wf:entity-options entity-name="TermType">
+ <wf:entity-constraint name="parentTypeId" operator="in" value="FINANCIAL_TERM,FIN_PAYMENT_TERM"/>
+ <wf:entity-order-by field-name="description"/>
+ </wf:entity-options>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field name="description"><wf:textarea/></wf:field>
+ <wf:field name="uomId" title="${uiLabelMap.CommonUom}">
+ <wf:drop-down allow-empty="true">
+ <wf:entity-options key-field-name="uomId" description="${description} - ${abbreviation}" entity-name="Uom">
+ <wf:entity-order-by field-name="description"/>
+ </wf:entity-options>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field name="submitButton" widget-style="smallSubmit"><wf:submit button-type="button"/></wf:field>
+ </wf:form>
+
+ <wf:form name="EditInvoiceTerms" type="multi" paginate-target="Accounting/Invoice/Terms/Edit" separate-columns="true" list-name="invoiceTerms"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+ target="Accounting/Invoice/Terms/update?invoiceId=${invoiceId}&viewSize=${viewSize}&viewIndex=${viewIndex}">
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="invoiceTermId"><wf:display/></wf:field>
+ <wf:field name="termTypeId">
+ <wf:drop-down>
+ <wf:entity-options entity-name="TermType">
+ <wf:entity-constraint name="parentTypeId" operator="in" value="FINANCIAL_TERM,FIN_PAYMENT_TERM"/>
+ <wf:entity-order-by field-name="description"/>
+ </wf:entity-options>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field name="invoiceItemSeqId" title="${uiLabelMap.CommonItem}"><wf:text size="5"/></wf:field>
+ <wf:field name="termDays"><wf:text size="5"/></wf:field>
+ <wf:field name="termValue"><wf:text size="5"/></wf:field>
+ <wf:field name="textValue"><wf:text/></wf:field>
+ <wf:field name="description"><wf:textarea rows="2" cols="40"/></wf:field>
+ <wf:field name="uomId" title="${uiLabelMap.CommonUom}">
+ <wf:drop-down allow-empty="true">
+ <wf:entity-options key-field-name="uomId" description="${description} - ${abbreviation}" entity-name="Uom">
+ <wf:entity-order-by field-name="description"/>
+ </wf:entity-options>
+ </wf:drop-down>
+ </wf:field>
+ <wf:field name="updateButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit" ><wf:submit/></wf:field>
+ </wf:form>
+
+ </wf:forms>
+
+</compound-widgets>
diff --git a/applications/accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml b/applications/accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml
new file mode 100644
index 0000000000..3d9933edd5
--- /dev/null
+++ b/applications/accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- This document serves as an example for Compound Screen Widget feature -->
+<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sc="http://ofbiz.apache.org/Site-Conf"
+ xmlns:wf="http://ofbiz.apache.org/Widget-Form"
+ xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
+ xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
+ xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
+
+ <sc:site-conf>
+
+ <sc:request-map uri="Accounting/Invoice/TimeEntries"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/TimeEntries"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/TimeEntries/List"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/TimeEntries/List"/></sc:request-map>
+ <sc:request-map uri="Accounting/Invoice/TimeEntries/View"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="Accounting/Invoice/TimeEntries/View"/></sc:request-map>
+
+ <sc:request-map uri="Accounting/Invoice/TimeEntry/delete">
+ <sc:security https="true" auth="true"/>
+ <sc:event type="service" invoke="deleteTimeEntry"/>
+ <sc:response name="success" type="request" value="json"/>
+ <sc:response name="error" type="request" value="json"/>
+ </sc:request-map>
+
+ <sc:view-map name="Accounting/Invoice/TimeEntries" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml#InvoiceTimeEntries"/>
+ <sc:view-map name="Accounting/Invoice/TimeEntries/List" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml#ListInvoiceTimeEntries"/>
+ <sc:view-map name="Accounting/Invoice/TimeEntries/View" type="screen" page="component://accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml#ViewInvoiceTimeEntries"/>
+
+ </sc:site-conf>
+
+ <ws:screens>
+
+ <ws:screen name="InvoiceTimeEntries">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="titleProperty" value="PageTitleListInvoiceTimeEntries"/>
+ <ws:set field="tabButtonItem" value="EditInvoiceTimeEntries"/>
+ <ws:set field="helpAnchor" value="_help_for_edit_invoice_time_entries"/>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="single">
+ <ws:screenlet title="${uiLabelMap.AccountingInvoiceTimeEntries}">
+ <ws:section>
+ <ws:condition>
+ <ws:or>
+ <ws:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <ws:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </ws:or>
+ </ws:condition>
+ <ws:widgets>
+ <ws:include-screen name="ListInvoiceTimeEntries"/>
+ </ws:widgets>
+ <ws:fail-widgets>
+ <ws:include-screen name="ViewInvoiceTimeEntries"/>
+ </ws:fail-widgets>
+ </ws:section>
+ </ws:screenlet>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="ListInvoiceTimeEntries">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="sortField" from-field="parameters.sortField" default-value="timeEntryId"/>
+ <ws:entity-and entity-name="TimeEntry" list="timeEntries">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="${sortField}" />
+ </ws:entity-and>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="list">
+ <ws:include-grid name="ListInvoiceTimeEntries" location="component://accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ <ws:screen name="ViewInvoiceTimeEntries">
+ <ws:section>
+ <ws:actions>
+ <ws:set field="sortField" from-field="parameters.sortField" default-value="timeEntryId"/>
+ <ws:entity-and entity-name="TimeEntry" list="timeEntries">
+ <ws:field-map field-name="invoiceId" from-field="parameters.invoiceId"/>
+ <ws:order-by field-name="${sortField}" />
+ </ws:entity-and>
+ </ws:actions>
+ <ws:widgets>
+ <ws:decorator-screen name="CommonEmbeddedDecorator" location="component://accounting/widget/CommonScreens.xml">
+ <ws:decorator-section name="list">
+ <ws:include-grid name="ViewInvoiceTimeEntries" location="component://accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml"/>
+ </ws:decorator-section>
+ </ws:decorator-screen>
+ </ws:widgets>
+ </ws:section>
+ </ws:screen>
+
+ </ws:screens>
+
+ <wm:menus>
+
+ <wm:menu name="ListInvoiceTimeEntriesInLineBar"
+ extends="CommonInlineBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+ <wm:actions>
+ <wm:set field="viewIndex" from-field="parameters.viewIndex"/>
+ <wm:set field="viewSize" from-field="parameters.viewSize"/>
+ </wm:actions>
+ <wm:menu-item name="DeleteInvoiceTimeEntry" title="${uiLabelMap.CommonDelete}">
+ <wm:condition>
+ <wm:or>
+ <wm:if-has-permission permission="ACCOUNTING" action="_CREATE"/>
+ <wm:if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
+ </wm:or>
+ </wm:condition>
+ <wm:link target="Accounting/Invoice/TimeEntry/delete" request-confirmation="true" style="buttontext">
+ <wm:parameter param-name="timeEntryId"/>
+ <wm:set-callback area-target="Accounting/Invoice/TimeEntries/List">
+ <wm:parameter param-name="invoiceId"/>
+ <wm:parameter param-name="viewIndex"/>
+ <wm:parameter param-name="viewSize"/>
+ </wm:set-callback>
+ </wm:link>
+ </wm:menu-item>
+ </wm:menu>
+
+ </wm:menus>
+
+ <wf:forms>
+
+ <wf:grid name="ListInvoiceTimeEntries" list-name="timeEntries" paginate-target="Accounting/Invoice/TimeEntries/List"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+ extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:auto-fields-service service-name="updateTimeEntry" default-field-type="display"/>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="menuAction" title=" ">
+ <wf:include-menu name="ListInvoiceTimeEntriesInLineBar" location="component://accounting/widget/accounting/AccountingInvoiceTimeEntryCpd.xml"/>
+ </wf:field>
+ </wf:grid>
+
+ <wf:grid name="ViewInvoiceTimeEntries" list-name="timeEntries" paginate-target="Accounting/Invoice/TimeEntries/View"
+ odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
+ extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
+ <wf:row-actions>
+ <wf:entity-one entity-name="Timesheet" value-field="timesheet">
+ <wf:field-map field-name="timesheetId" from-field="timesheetId"/>
+ </wf:entity-one>
+ </wf:row-actions>
+ <wf:field name="invoiceId"><wf:hidden/></wf:field>
+ <wf:field name="invoiceItemSeqId"><wf:display/></wf:field>
+ <wf:field name="timeEntryId"><wf:display/></wf:field>
+ <wf:field name="timesheetId" entry-name="timesheet.timesheetId">
+ <wf:hyperlink description="${timesheetId}" target="/workeffort/control/EditTimesheet" target-type="inter-app">
+ <wf:parameter param-name="timesheetId"/>
+ </wf:hyperlink>
+ </wf:field>
+ <wf:field name="partyId" entry-name="partyId">
+ <wf:display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName} ${firstName} ${middleName} ${lastName}">
+ <wf:sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description=" [${partyId}]">
+ <wf:parameter param-name="partyId"/>
+ </wf:sub-hyperlink>
+ </wf:display-entity>
+ </wf:field>
+ <wf:field name="timesheetPartyId" entry-name="timesheet.partyId">
+ <wf:display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName} ${firstName} ${middleName} ${lastName}">
+ <wf:sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description=" [${timesheet.partyId}]">
+ <wf:parameter param-name="partyId" from-field="timesheet.partyId"/>
+ </wf:sub-hyperlink>
+ </wf:display-entity>
+ </wf:field>
+ <wf:field name="hours"><wf:display/></wf:field>
+ <wf:field name="rateTypeId"><wf:display-entity entity-name="RateType"/></wf:field>
+ <wf:field name="workEffortId">
+ <wf:display-entity entity-name="WorkEffort" description="${workEffortName} [${workEffortId}]">
+ <wf:sub-hyperlink description=" [${workEffortId}]" target="/workeffort/control/WorkEffortSummary" target-type="inter-app">
+ <wf:parameter param-name="workEffortId"/>
+ </wf:sub-hyperlink>
+ </wf:display-entity>
+ </wf:field>
+ <wf:field name="fromDate"><wf:display type="date"/></wf:field>
+ <wf:field name="thruDate"><wf:display type="date"/></wf:field>
+ <wf:field name="comments"><wf:display/></wf:field>
+ </wf:grid>
+
+ </wf:forms>
+
+</compound-widgets>
diff --git a/themes/bluelight/webapp/bluelight/style.css b/themes/bluelight/webapp/bluelight/style.css
index 26e73504ae..ec7858f198 100644
--- a/themes/bluelight/webapp/bluelight/style.css
+++ b/themes/bluelight/webapp/bluelight/style.css
@@ -2653,8 +2653,9 @@ button.ui-button::-moz-focus-inner {
.ui-dialog {
position: absolute;
- top: 0;
- left: 0;
+ top: 50%;
+ left:50%;
+ transform: translate(-50%, -50%);
padding;
padding: .2em;
width: 300px;
diff --git a/themes/flatgrey/webapp/flatgrey/javascript.css b/themes/flatgrey/webapp/flatgrey/javascript.css
index 811e4311f3..36d19ecd77 100644
--- a/themes/flatgrey/webapp/flatgrey/javascript.css
+++ b/themes/flatgrey/webapp/flatgrey/javascript.css
@@ -623,8 +623,9 @@ button.ui-button::-moz-focus-inner {
.ui-dialog {
position: absolute;
- top: 0;
- left: 0;
+ top: 50%;
+ left:50%;
+ transform: translate(-50%, -50%);
padding: .2em;
width: 300px;
overflow: hidden;
diff --git a/themes/rainbowstone/webapp/rainbowstone/javascript.css b/themes/rainbowstone/webapp/rainbowstone/javascript.css
index b3984ccea3..83e01d6b12 100644
--- a/themes/rainbowstone/webapp/rainbowstone/javascript.css
+++ b/themes/rainbowstone/webapp/rainbowstone/javascript.css
@@ -623,8 +623,9 @@ button.ui-button::-moz-focus-inner {
.ui-dialog {
position: absolute;
- top: 0;
- left: 0;
+ top: 50%;
+ left:50%;
+ transform: translate(-50%, -50%);
padding;
padding: .2em;
width: 300px;
diff --git a/themes/tomahawk/webapp/tomahawk/css/style.css b/themes/tomahawk/webapp/tomahawk/css/style.css
index 41180209d9..aecc9fbe06 100644
--- a/themes/tomahawk/webapp/tomahawk/css/style.css
+++ b/themes/tomahawk/webapp/tomahawk/css/style.css
@@ -3002,8 +3002,9 @@ button.ui-button::-moz-focus-inner {
.ui-dialog {
position: absolute;
- top: 0;
- left: 0;
+ top: 50%;
+ left:50%;
+ transform: translate(-50%, -50%);
padding: .2em;
width: 300px;
overflow: hidden;