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/05/05 07:39:36 UTC

svn commit: r1742364 - in /ofbiz/branches/release15.12: ./ applications/accounting/webapp/accounting/WEB-INF/ applications/accounting/widget/

Author: jleroux
Date: Thu May  5 07:39:36 2016
New Revision: 1742364

URL: http://svn.apache.org/viewvc?rev=1742364&view=rev
Log:
"Applied fix from trunk for revision: 1727894" 
------------------------------------------------------------------------
r1727894 | jleroux | 2016-02-01 08:18:35 +0100 (lun. 01 f�vr. 2016) | 5 lignes

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/branches/release15.12/   (props changed)
    ofbiz/branches/release15.12/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/branches/release15.12/applications/accounting/widget/AccountingMenus.xml
    ofbiz/branches/release15.12/applications/accounting/widget/InvoiceForms.xml
    ofbiz/branches/release15.12/applications/accounting/widget/InvoiceScreens.xml

Propchange: ofbiz/branches/release15.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May  5 07:39:36 2016
@@ -9,4 +9,4 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/trunk:1722712,1723007,1723248,1724402,1724411,1724566,1724689,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951,1724957,1724975,1724978,1725006,1725217,1725257,1725561,1725574,1726388,1726486,1726493,1726828,1728398,1728411,1729005,1729078,1729609,1729809,1730035,1730456,1730735-1730736,1730747,1730758,1730882,1730889,1731382,1731396,1732454,1732570,1732721,1733951,1733956,1734246,1734269,1734276,1734912,1734918,1735021,1735244,1735385,1735398,1735569,1735731,1735734,1735750,1735753,1735756,1735759,1735773,1736083,1736087,1736272,1736434,1736628,1736851,1736854,1736890,1737156,1737440,1738235,1738303,1738407,1738902,1739438,1739448,1739571,1740008,1740442,1740629,1741146,1741563,1741684,1741925,1741930,1741960,1742018,1742097
+/ofbiz/trunk:1722712,1723007,1723248,1724402,1724411,1724566,1724689,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951,1724957,1724975,1724978,1725006,1725217,1725257,1725561,1725574,1726388,1726486,1726493,1726828,1727894,1728398,1728411,1729005,1729078,1729609,1729809,1730035,1730456,1730735-1730736,1730747,1730758,1730882,1730889,1731382,1731396,1732454,1732570,1732721,1733951,1733956,1734246,1734269,1734276,1734912,1734918,1735021,1735244,1735385,1735398,1735569,1735731,1735734,1735750,1735753,1735756,1735759,1735773,1736083,1736087,1736272,1736434,1736628,1736851,1736854,1736890,1737156,1737440,1738235,1738303,1738407,1738902,1739438,1739448,1739571,1740008,1740442,1740629,1741146,1741563,1741684,1741925,1741930,1741960,1742018,1742097

Modified: ofbiz/branches/release15.12/applications/accounting/webapp/accounting/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=1742364&r1=1742363&r2=1742364&view=diff
==============================================================================
--- ofbiz/branches/release15.12/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/branches/release15.12/applications/accounting/webapp/accounting/WEB-INF/controller.xml Thu May  5 07:39:36 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/branches/release15.12/applications/accounting/widget/AccountingMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/accounting/widget/AccountingMenus.xml?rev=1742364&r1=1742363&r2=1742364&view=diff
==============================================================================
--- ofbiz/branches/release15.12/applications/accounting/widget/AccountingMenus.xml (original)
+++ ofbiz/branches/release15.12/applications/accounting/widget/AccountingMenus.xml Thu May  5 07:39:36 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/branches/release15.12/applications/accounting/widget/InvoiceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/accounting/widget/InvoiceForms.xml?rev=1742364&r1=1742363&r2=1742364&view=diff
==============================================================================
--- ofbiz/branches/release15.12/applications/accounting/widget/InvoiceForms.xml (original)
+++ ofbiz/branches/release15.12/applications/accounting/widget/InvoiceForms.xml Thu May  5 07:39:36 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/branches/release15.12/applications/accounting/widget/InvoiceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/accounting/widget/InvoiceScreens.xml?rev=1742364&r1=1742363&r2=1742364&view=diff
==============================================================================
--- ofbiz/branches/release15.12/applications/accounting/widget/InvoiceScreens.xml (original)
+++ ofbiz/branches/release15.12/applications/accounting/widget/InvoiceScreens.xml Thu May  5 07:39:36 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>