You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2016/02/01 08:18:35 UTC
svn commit: r1727894 - in /ofbiz/trunk/applications/accounting:
webapp/accounting/WEB-INF/controller.xml widget/AccountingMenus.xml
widget/InvoiceForms.xml widget/InvoiceScreens.xml
Author: jleroux
Date: Mon Feb 1 07:18:35 2016
New Revision: 1727894
URL: http://svn.apache.org/viewvc?rev=1727894&view=rev
Log:
A patch from Pierre Smits for "Have the ability to add terms to invoices" https://issues.apache.org/jira/browse/OFBIZ-6865
Currently in UI there is no way that terms can be added to an invoice.
jleroux: Works well, links to edit/delete a Term, for instance from the list at "createInvoiceTerm" request would be welcome...
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml
ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml
ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml
Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=1727894&r1=1727893&r2=1727894&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Mon Feb 1 07:18:35 2016
@@ -233,7 +233,8 @@ under the License.
<security https="true" auth="true"/>
<response name="success" type="view" value="invoiceStatus"/>
</request-map>
-
+
+ <!-- re Invoice Roles -->
<request-map uri="invoiceRoles">
<security https="true" auth="true"/>
<response name="success" type="view" value="invoiceRoles"/>
@@ -250,13 +251,26 @@ under the License.
<response name="success" type="view" value="invoiceRoles"/>
<response name="error" type="view" value="invoiceRoles"/>
</request-map>
+
<request-map uri="setInvoiceStatus">
<security https="true" auth="true"/>
<event type="service" invoke="setInvoiceStatus"/>
<response name="success" type="view" value="invoiceOverview"/>
<response name="error" type="view" value="invoiceOverview"/>
</request-map>
-
+
+ <!-- re Invoice Terms -->
+ <request-map uri="invoiceTerms">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="invoiceTerms"/>
+ </request-map>
+ <request-map uri="createInvoiceTerm">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="createInvoiceTerm"/>
+ <response name="success" type="view" value="invoiceTerms"/>
+ <response name="error" type="view" value="invoiceTerms"/>
+ </request-map>
+
<request-map uri="sendPerEmail">
<security https="true" auth="true"/>
<response name="success" type="view" value="sendPerEmail"/>
@@ -2696,6 +2710,7 @@ under the License.
<view-map name="invoiceStatus" type="screen" page="component://accounting/widget/InvoiceScreens.xml#InvoiceStatus"/>
<view-map name="editInvoiceApplications" type="screen" page="component://accounting/widget/InvoiceScreens.xml#EditInvoiceApplications"/>
<view-map name="invoiceRoles" type="screen" page="component://accounting/widget/InvoiceScreens.xml#InvoiceRoles"/>
+ <view-map name="invoiceTerms" type="screen" page="component://accounting/widget/InvoiceScreens.xml#InvoiceTerms"/>
<view-map name="sendPerEmail" type="screen" page="component://accounting/widget/InvoiceScreens.xml#SendPerEmail"/>
<view-map name="EditInvoiceItemType" type="screen" page="component://accounting/widget/InvoiceItemTypeScreens.xml#EditInvoiceItemType"/>
Modified: ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml?rev=1727894&r1=1727893&r2=1727894&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml Mon Feb 1 07:18:35 2016
@@ -110,7 +110,7 @@ under the License.
<parameter param-name="invoiceId" from-field="invoice.invoiceId"/>
</link>
</menu-item>
-
+
<menu-item name="invoiceRoles" title="${uiLabelMap.AccountingInvoiceRoles}">
<condition>
<and>
@@ -125,7 +125,22 @@ under the License.
<parameter param-name="invoiceId" from-field="invoice.invoiceId"/>
</link>
</menu-item>
-
+
+ <menu-item name="invoiceTerms" title="${uiLabelMap.PartyTerms}">
+ <condition>
+ <and>
+ <not><if-empty field="invoice.invoiceId"/></not>
+ <or>
+ <if-compare field="invoice.statusId" operator="equals" value="INVOICE_IN_PROCESS"/>
+ <if-compare field="invoice.statusId" operator="equals" value="INVOICE_RECEIVED"/>
+ </or>
+ </and>
+ </condition>
+ <link target="invoiceTerms">
+ <parameter param-name="invoiceId" from-field="invoice.invoiceId"/>
+ </link>
+ </menu-item>
+
<menu-item name="editInvoiceApplications" title="${uiLabelMap.AccountingApplications}">
<condition>
<and>
Modified: ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml?rev=1727894&r1=1727893&r2=1727894&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml Mon Feb 1 07:18:35 2016
@@ -442,12 +442,30 @@ under the License.
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"><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>
</form>
-
+
+ <form name="EditInvoiceTerm" type="single" target="createInvoiceTerm" title=""
+ header-row-style="header-row" default-table-style="basic-table">
+ <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="submitButton" widget-style="smallSubmit"><submit button-type="button"/></field>
+ </form>
+
<form name="EditInvoiceApplications" type="list" list-name="invoiceApplications" default-entity-name="InvoiceItem" use-row-submit="true" target="updateInvoiceApplication" title="Apply payments to invoices" separate-columns="false"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<field name="statusId"><hidden/></field>
@@ -528,6 +546,7 @@ under the License.
</hyperlink>
</field>
</form>
+
<form name="EditInvoiceRole" type="single" target="createInvoiceRole" title=""
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-entity entity-name="InvoiceRole"/>
@@ -542,6 +561,7 @@ under the License.
</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>
Modified: ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml?rev=1727894&r1=1727893&r2=1727894&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml Mon Feb 1 07:18:35 2016
@@ -242,6 +242,11 @@ under the License.
<include-form name="invoiceRoles" location="component://accounting/widget/InvoiceForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PartyTerms}">
+ <container>
+ <link target="invoiceTerms" text="${uiLabelMap.CommonUpdate}" style="buttontext">
+ <parameter param-name="invoiceId"/>
+ </link>
+ </container>
<include-form name="ListInvoiceTerms" location="component://accounting/widget/InvoiceForms.xml"/>
<include-form name="ListInvoicePaymentInfo" location="component://accounting/widget/InvoiceForms.xml"/>
</screenlet>
@@ -527,6 +532,31 @@ under the License.
</decorator-section>
</decorator-screen>
</widgets>
+ </section>
+ </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 from-field="invoiceId" field-name="invoiceId"/>
+ <order-by field-name="invoiceTermId"/>
+ </entity-and>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
+ <decorator-section name="body">
+ <screenlet id="PartyInvoiceTermPanel" title="${uiLabelMap.AccountingPartyRoleAdd}" collapsible="true">
+ <include-form name="EditInvoiceTerm" location="component://accounting/widget/InvoiceForms.xml"/>
+ </screenlet>
+ <include-form name="ListInvoiceTerms" location="component://accounting/widget/InvoiceForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
</section>
</screen>