Skip to content

Commit

Permalink
Fixed: PartyFinancialHistory shows parentTypeId of invoice, not invoi…
Browse files Browse the repository at this point in the history
…ceTypeId (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)
  • Loading branch information
JacquesLeRoux committed May 30, 2024
1 parent 6718c46 commit a7afe3c
Showing 1 changed file with 29 additions and 38 deletions.
67 changes: 29 additions & 38 deletions applications/party/widget/partymgr/PartyForms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -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">
Expand All @@ -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>
Expand All @@ -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"
>
Expand All @@ -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}"/>
Expand All @@ -1153,19 +1148,14 @@ 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"
>
<actions>
<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=" ">
Expand All @@ -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>
Expand All @@ -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">
Expand All @@ -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">
Expand Down Expand Up @@ -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>
Expand All @@ -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">
Expand Down Expand Up @@ -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"/>
Expand All @@ -1334,15 +1327,15 @@ 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>
<field name="idValue"><text /></field>
<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">
Expand All @@ -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>
Expand Down Expand Up @@ -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>

0 comments on commit a7afe3c

Please sign in to comment.