This is an automated email from the ASF dual-hosted git repository.

jleroux 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 a7afe3ccbd Fixed: PartyFinancialHistory shows parentTypeId of invoice, 
not invoiceTypeId (OFBIZ-13068)
a7afe3ccbd is described below

commit a7afe3ccbd2ce69253fcacca0d8a34c1ec14b4bf
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Thu May 30 15:52:29 2024 +0200

    Fixed: PartyFinancialHistory shows parentTypeId of invoice, not 
invoiceTypeId (OFBIZ-13068)
    
    Thanks to Deepak's review (much appreciated see
    https://lists.apache.org/thread/94xw3rpdr0o44n6sd2s7m250joy4c7q6)
    this improves previous commit (6718c46)
    
    This also removes few trailing blanks (Eclipse automation)
---
 applications/party/widget/partymgr/PartyForms.xml | 67 ++++++++++-------------
 1 file changed, 29 insertions(+), 38 deletions(-)

diff --git a/applications/party/widget/partymgr/PartyForms.xml 
b/applications/party/widget/partymgr/PartyForms.xml
index 4eaa195d72..b00629dc56 100644
--- a/applications/party/widget/partymgr/PartyForms.xml
+++ b/applications/party/widget/partymgr/PartyForms.xml
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
+<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";>
 
     <form name="LookupParty" type="single" target="findparty" 
focus-field-name="partyId">
@@ -302,8 +302,8 @@ under the License.
 
     <form name="EditPartyGroupForNewQuote" type="single" 
target="createPartyGroup" default-map-name="partyGroup" extends="EditPartyGroup"
         header-row-style="header-row" default-table-style="basic-table">
-        <field name="cancelLink"><hidden/></field> 
-        
+        <field name="cancelLink"><hidden/></field>
+
     </form>
 
     <form name="ViewPartyGroup" type="single" default-map-name="lookupGroup">
@@ -1099,9 +1099,6 @@ under the License.
             <set field="total" 
value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,
 invoiceId, actualCurrency)}"/>
             <set field="amountToApply" 
value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId,
 actualCurrency)}"/>
             <set field="amountApplied" 
value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(delegator,invoiceId,
 org.apache.ofbiz.base.util.UtilDateTime.nowTimestamp(), actualCurrency)}"/>
-            <entity-one entity-name="InvoiceType" value-field="invoiceType"/>
-            <set field="invoiceTypeId" from-field="invoiceType.parentTypeId"/>
-            <entity-one entity-name="InvoiceType" 
value-field="parentInvoiceType"/>
         </row-actions>
         <field name="invoiceId">
             <display-entity entity-name="Invoice" description=" " 
also-hidden="true">
@@ -1110,9 +1107,7 @@ under the License.
                 </sub-hyperlink>
             </display-entity>
         </field>
-        <field name="typeDescription" title="${uiLabelMap.CommonType}">
-            <display description="${invoiceType.description}"/> 
-        </field>
+        <field name="invoiceTypeId"><display-entity 
entity-name="InvoiceType"/></field>
         <field name="invoiceDate"><display type="date"/></field>
         <field name="total"><display type="currency" 
currency="${actualCurrencyUomId}"/></field>
         <field name="amountToApply"><display type="currency" 
currency="${actualCurrencyUomId}"/></field>
@@ -1128,7 +1123,7 @@ under the License.
         <field name="pmAmount" title="${uiLabelMap.AccountingPaymentAmount}" 
use-when="actualCurrency==false"><display type="currency" 
currency="${actualCurrencyUomId}"/></field>
         <field name="pmAmount" title="${uiLabelMap.AccountingPaymentAmount}" 
entry-name="pmActualCurrencyAmount" use-when="actualCurrency==true"><display 
type="currency" currency="${actualCurrencyUomId}"/></field>
     </grid>
-    
+
     <grid name="ListUnAppliedInvoices" list-name="ListUnAppliedInvoices"
         default-title-style="tableheadtext" odd-row-style="alternate-row" 
default-table-style="basic-table hover-bar"
        >
@@ -1137,14 +1132,14 @@ under the License.
             <script 
location="component://party/src/main/groovy/org/apache/ofbiz/party/party/UnAppliedInvoicesForParty.groovy"/>
         </actions>
         <row-actions>
-            <entity-one entity-name="InvoiceType" value-field="invoiceType"/>
-            <set field="invoiceTypeId" from-field="invoiceType.parentTypeId"/>
-            <entity-one entity-name="InvoiceType" 
value-field="parentInvoiceType"/>
+            <entity-one entity-name="InvoiceType" use-cache="true" 
value-field="invoiceType"/>
         </row-actions>
         <field name="invoiceId">
-            <hyperlink target="/accounting/control/viewInvoice" 
description="[${invoiceId}]" target-type="inter-app">
-                <parameter param-name="invoiceId"/>
-            </hyperlink>
+            <display-entity entity-name="Invoice">
+                <sub-hyperlink target="/accounting/control/invoiceOverview" 
description="[${invoiceId}]" target-type="inter-app">
+                    <parameter param-name="invoiceId"/>
+                </sub-hyperlink>
+            </display-entity>
         </field>
         <field name="typeDescription" title="${uiLabelMap.CommonType}">
             <display description="${invoiceType.description}"/>
@@ -1153,7 +1148,7 @@ under the License.
         <field name="amount"><display type="currency" 
currency="${invoiceCurrencyUomId}"/></field>
         <field name="unAppliedAmount"><display type="currency" 
currency="${invoiceCurrencyUomId}"/></field>
     </grid>
-    
+
     <grid name="ListUnAppliedPayments" list-name="paymentList"
         default-title-style="tableheadtext" odd-row-style="alternate-row" 
default-table-style="basic-table hover-bar"
        >
@@ -1161,11 +1156,6 @@ under the License.
             <set field="actualCurrency" from-field="actualCurrency" 
default-value="true" type="Boolean"/>
             <script 
location="component://party/src/main/groovy/org/apache/ofbiz/party/party/UnAppliedPaymentsForParty.groovy"/>
         </actions>
-        <row-actions>
-            <entity-one entity-name="PaymentType" value-field="paymentType"/>
-            <set field="paymentTypeId" from-field="paymentType.parentTypeId"/>
-            <entity-one entity-name="PaymentType" 
value-field="parentPaymentType"/>
-        </row-actions>
         <field name="paymentId"><hidden/></field>
         <field name="paymentId">
             <display-entity entity-name="Payment" description=" ">
@@ -1175,13 +1165,16 @@ under the License.
             </display-entity>
         </field>
         <field name="effectiveDate"><display type="date"/></field>
-        <field name="typeDescription" title="${uiLabelMap.CommonType}">
-            <display description="${paymentType.description}"/>
+       <field name="paymentTypeId">
+            <display-entity entity-name="PaymentType"/>
+        </field>
+        <field name="paymentParentTypeId">
+            <display-entity entity-name="PaymentType" 
key-field-name="paymentTypeId"/>
         </field>
         <field name="amount"><display type="currency" 
currency="${paymentCurrencyUomId}"/></field>
         <field name="unAppliedAmount"><display type="currency" 
currency="${paymentCurrencyUomId}"/></field>
     </grid>
-    
+
     <form name="PartyFinancialSummary" type="single" title="Financial summary" 
default-map-name="finanSummary"
         default-title-style="tableheadtext">
         <actions>
@@ -1198,7 +1191,7 @@ under the License.
         <field position="1" name="totalToBePaid" 
use-when="finanSummary.get(&quot;totalToBePaid&quot;)!=null" 
title="${uiLabelMap.PartyToBeReceivedFrom} ${parameters.partyId}"><display 
type="currency" currency="${actualCurrencyUomId}"/></field>
         <field position="1" name="totalToBeReceived" 
use-when="finanSummary.get(&quot;totalToBeReceived&quot;)!=null" 
title="${uiLabelMap.PartyToBePaidTo} ${parameters.partyId}"><display 
type="currency" currency="${actualCurrencyUomId}"/></field>
     </form>
-    
+
     <grid name="ViewPartyRoles" list-name="partyRoles" target="viewroles"
         default-title-style="tableheadtext"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
@@ -1212,7 +1205,7 @@ under the License.
             </hyperlink>
         </field>
     </grid>
-    
+
     <form name="AddPartyRole" type="single" title="Add a role to party" 
target="addrole">
         <field name="partyId"><hidden value="${parameters.partyId}"/></field>
         <field name="roleTypeId">
@@ -1259,7 +1252,7 @@ under the License.
         <field name="description" title="${uiLabelMap.CommonDescription}" 
required-field="true"><text/></field>
         <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field>
     </form>
-    
+
     <grid name="ListPreference" target="removePreference" 
list-name="enumTypeChildAndEnums"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar" separate-columns="true" use-row-submit="true" >
         <row-actions>
@@ -1277,21 +1270,21 @@ under the License.
         <field name="userPrefValue" 
title="${uiLabelMap.CommonValue}"><display/></field>
         <field name="submit" title="${uiLabelMap.CommonRemove}" 
use-when="userPrefValue!=null"><submit/></field>
     </grid>
-    
+
     <grid name="PartyBillingAccount" list-name="billingAccounts" 
default-table-style="basic-table hover-bar">
         <field name="billingAccountId"><display/></field>
         <field name="accountLimit"><display type="currency"/></field>
         <field name="accountBalance"><display type="currency"/></field>
         <field name="description"><display/></field>
     </grid>
-    
+
     <grid name="PartyReturns" list-name="returnList" 
default-table-style="basic-table hover-bar">
         <field name="returnId"><display/></field>
         <field name="statusId"><display-entity 
entity-name="StatusItem"/></field>
         <field name="fromPartyId"><display/></field>
         <field name="toPartyId"><display/></field>
     </grid>
-    
+
     <form name="PartySalesOpportunities" type="list" 
list-name="salesOpportunities" default-table-style="basic-table hover-bar">
         <field name="opportunityName" title="${uiLabelMap.SfaOpportunityName}">
             <hyperlink description="${opportunityName} 
[${salesOpportunityId}]" target="ViewSalesOpportunity">
@@ -1323,7 +1316,7 @@ under the License.
         </field>
         <field name="submit" title="${uiLabelMap.CommonUpdate}"><submit 
/></field>
     </form>
-    
+
     <form name="EditPartyIdentification" type="single" list-name="partyIdents"
                  default-table-style="basic-table" 
target="createPartyIdentification" focus-field-name="idValue">
         <alt-target use-when="partyIdentification !=null" 
target="updatePartyIdentification"/>
@@ -1334,7 +1327,7 @@ under the License.
                 </entity-options>
             </drop-down>
         </field>
-        <field name="partyIdentificationTypeId" use-when="partyIdentification 
!= null"> 
+        <field name="partyIdentificationTypeId" use-when="partyIdentification 
!= null">
             <display-entity entity-name="PartyIdentificationType"/>
         </field>
         <field name="partyId"><hidden /></field>
@@ -1342,7 +1335,7 @@ under the License.
         <field name="submit" title="${uiLabelMap.CommonCreate}" 
use-when="partyIdentification == null"><submit /></field>
         <field name="submit" title="${uiLabelMap.CommonUpdate}" 
use-when="partyIdentification != null"><submit /></field>
     </form>
-    
+
     <form name="EditProductStoreRole" type="single" 
extends="EditProductStoreRole" 
extends-resource="component://product/widget/catalog/StoreForms.xml">
         <field name="partyId"><hidden/></field>
         <field name="productStoreId" use-when="productStoreRole==null" 
title="${uiLabelMap.ProductStoreId}" required-field="true">
@@ -1364,7 +1357,7 @@ under the License.
             </drop-down>
         </field>
     </form>
-    
+
     <grid name="ListProductStoreRole" list-name="listIt" 
paginate-target="FindProductStoreRoles" default-entity-name="ProductStoreRole" 
separate-columns="true"
             odd-row-style="alternate-row" header-row-style="header-row-2" 
default-table-style="basic-table hover-bar">
         <actions>
@@ -1448,12 +1441,10 @@ under the License.
         <field name="postalCode" title="postalCode"><display/></field>
         <field name="countryGeoId" title="countryGeoId"><display/></field>
     </grid>
-    
+
     <form name="ImportParty" type="upload" target="uploadParty" title="" >
         <field name="uploadedFile" 
title="${uiLabelMap.ContentFile}"><file/></field>
         <field name="submitButton" title="${uiLabelMap.CommonUpload}"><submit 
button-type="button"/></field>
     </form>
-    
 
-    
 </forms>

Reply via email to