Categorie: reference Bijgewerkt: 2026-04-08 actionfield workflow actionfield1130

ActionField1130

Beschrijving: Register actual usage (InvoiceQuantity and Start/EndTime) for this ReservationLine via dialog. Custom: Nee

Propertiesbewerken

Property Type Accessor
ReservationLine ReservationLine Root

XMLbewerken

<Workflow Name="ActionField1130" Version="2025.07.28" WorkflowType="Standard" xmlns="urn:Ultimo.Framework.Workflow-mapping">
	<Security EditLevel="10" ViewLevel="20" UserContentLevel="30" />
	<Description>Register actual usage (InvoiceQuantity and Start/EndTime) for this ReservationLine via dialog.</Description>
	<Properties>
		<Property	Name="ReservationLine"	Type="ReservationLine"	Accessor="Root"		Direction="In" />

		<Property	Name="EndTime"			Type="DateTime"			Accessor="Internal" />
		<Property	Name="QuantityUsed"		Type="Decimal"			Accessor="Internal" />
		<Property	Name="StartTime"		Type="DateTime"			Accessor="Internal" />
	</Properties>
	<Execution>
		<UserContent Name="Pre" />

		<Dialog Name="ReservationLine_RegisterUsage" TitleCode="REGISTERUSAGE">
			<Container Border="True">
				<Number Name="QuantityUsed" Value="${ReservationLine.InvoiceQuantity}" OutputProperty="${QuantityUsed}" ColumnName="ReslQuantity" LabelCode="QUANTITY" />
			</Container>
		</Dialog>

		<When Name="When actual usage is different from reserved usage" Condition="${ReservationLine.InvoiceQuantity} != ${QuantityUsed}">
			<Transaction>
				<Assign Name="Update InvoiceQuantity" Property="${ReservationLine.InvoiceQuantity}" Value="${QuantityUsed}" />

				<WorkflowCall Name="Get start time for this ReservationLine" WorkflowName="ReservationLine_GetStartTime">
					<Parameter	Name="ReservationLine"	Direction="In"		Value="${ReservationLine}" />
					<Parameter	Name="StartTime"		Direction="Out"									OutputProperty="${StartTime}" />
				</WorkflowCall>

				<WorkflowCall Name="Get end time for this ReservationLine" WorkflowName="ReservationLine_GetEndTime">
					<Parameter	Name="ReservationLine"	Direction="In"		Value="${ReservationLine}" />
					<Parameter	Name="EndTime"			Direction="Out"									OutputProperty="${EndTime}" />
				</WorkflowCall>

				<Assign Name="Update InvoiceCost" Property="${ReservationLine.InvoiceCost}" Value="=${ReservationLine.Price} + (${QuantityUsed} * #getdatedifference(h, ${StartTime}, ${EndTime}, True) * ${ReservationLine.HourPrice}) + (${QuantityUsed} * ${ReservationLine.UnitPrice})" />
			</Transaction>
		</When>

		<UserContent Name="Post" />
	</Execution>
</Workflow>