Categorie: reference
Bijgewerkt: 2026-04-08
actionfield workflow actionfield1131
ActionField1131
Beschrijving: Calculate totals for all InvoiceLines of the Invoice. Custom: Nee
Propertiesbewerken
| Property | Type | Accessor |
|---|---|---|
| Invoice | Invoice | Root |
XMLbewerken
<Workflow Name="ActionField1131" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
<Description>Calculate totals for all InvoiceLines of the Invoice.</Description>
<Properties>
<Property Name="Invoice" Type="Invoice" Accessor="Root" Direction="In" />
<Property Name="InvoiceLines" Type="List[InvoiceLine]" Accessor="Internal" />
</Properties>
<Execution>
<UserContent Name="Pre" />
<Choose Name="Check UltimoSettings.InvoiceMorePurchaseAllowed">
<When Name="When only one purchase allowed per invoice" Condition="#{UltimoSettings.InvoiceMorePurchaseAllowed} == False">
<When Name="Invoice has Purchase and UseFixedExchangeRate is true" Condition="${Invoice.Purchase} != Empty && ${Invoice.Purchase.UseFixedExchangeRate} == true">
<Transaction>
<Assign Name="Set Currency from Purchase" Property="${Invoice.Currency}" Value="${Invoice.Purchase.Currency}" />
</Transaction>
<Message Name="Currency may not be changed" MessageCode="2924">
<Parameter Name="Invoice" Direction="In" Value="${Invoice}" />
</Message>
<Stop Name="Stop" Mode="Abort" />
</When>
</When>
<Otherwise Name="More then one purchase allowed per invoice">
<Transaction>
<GetList Name="Get invoicelines" Type="InvoiceLine" OutputProperty="${InvoiceLines}" OrderBy="Id" OrderDirection="Ascending">
<Filters>
<PropertyFilter PropertyName="Id.Invoice" Operator="=" PropertyValue="${Invoice}" />
</Filters>
</GetList>
</Transaction>
<ForEach Name="Foreach InvoiceLine" In="${InvoiceLines}" As="InvoiceLine">
<When Name="InvoiceLine has Purchase and UseFixedExchangeRate is true" Condition="${InvoiceLine.PurchaseLine.Id.Purchase?} != Empty && ${InvoiceLine.PurchaseLine.Id.Purchase.UseFixedExchangeRate} == true">
<Transaction>
<Assign Name="Set Currency from Purchase" Property="${Invoice.Currency}" Value="${InvoiceLine.PurchaseLine.Id.Purchase.Currency}" />
</Transaction>
<Message Name="Currency may not be changed" MessageCode="2926">
<Parameter Name="Invoice" Direction="In" Value="${Invoice}" />
<Parameter Name="InvoiceLine" Direction="In" Value="${InvoiceLine}" />
</Message>
<Stop Name="Stop" Mode="Abort" />
</When>
</ForEach>
</Otherwise>
</Choose>
<Transaction>
<Command Name="FindExchangeRateForBookDate" CommandName="FindExchangeRateForBookDate">
<Parameter Name="CounterCurrency" Direction="In" Value="${Invoice.Currency}" />
<Parameter Name="Date" Direction="In" Value="${Invoice.BookDate}" />
<Parameter Name="ConversionFactor" Direction="Out" OutputProperty="${Invoice.CurrencyConversionFactor}" />
<Parameter Name="Rate" Direction="Out" OutputProperty="${Invoice.CurrencyRate}" />
</Command>
<WorkflowCall Name="Invoice_RecalculateInvoiceLines" WorkflowName="Invoice_RecalculateInvoiceLines">
<Parameter Name="Invoice" Direction="In" Value="${Invoice}" />
</WorkflowCall>
</Transaction>
<UserContent Name="Post" />
</Execution>
</Workflow>