Sum loading aid (Shipment)

Event action – Abstract

Purpose: Totals the quantities for one or all Loading aids types in a shipment and writes the sum(s) to loading equipment attributes in the shipment header. All explicit quantities for Loading aids at line item level of the shipment are added together with the number of loading aid definitions for the same Loading aids type in the shipment header.

See also: Sum loading aid (Manifest), Loading aids

images/download/attachments/177912678/image-2024-9-23_8-47-55-version-1-modificationdate-1727074075121-api-v2.png

The event action Sum loading aid (Shipment) totals the quantity for one or all Loading aids types within in the items of a reference object of the shipment type (see Shipments).

Here, all explicit specifications for Loading aids quantities in all item levels of the shipment are added together with the number of loading aid definitions for the same loading aid type.

The total sum per Loading aids type is written to the corresponding Loading aids sum attribute in the shipment header.

There is a corresponding event action for Manifests (Sum loading aid (Manifest)), which, however, refers exclusively to the Loading aids quantities of the contained Shipments.

NOTE◄ For Manifests – in contrast to Shipments – there is no possibility to maintain custom loading aid definitions.

Configuration

images/download/attachments/177912678/image-2024-9-23_8-48-56-version-1-modificationdate-1727074135463-api-v2.png

The event action Sum loading aid (Shipment) expects a shipment (see Shipments) as the reference object. In the context of another object type, the event action has no effect without an error occurring at runtime.

The optional Type parameter can be used to limit the evaluation to a specific Loading aids.

  • Without any specification of Type, all Loading aids types that occur in the shipment items are totaled together.

IMPORTANT◄ If no Type is specified, the event action updates only the sum attributes of the Loading aids types that are currently in use. If sum values were calculated in previous calculations for types that currently no longer appear in any of the shipment items, these values are retained unchanged. If necessary, they must be explicitly reset or deleted.

Example

In an input form for Shipments, the sum attributes for each Loading aids are updated by clicking on a Button (via a Eigenes Aktionsevent). At the latest, the same calculation is triggered automatically when the shipment is saved.

Configuration:

  • 'Create' and 'Modify' (see Common action event) are selected as Triggering events, so that the update of the sum attributes takes place with each 'Save'. In addition, the calculation is triggered on request via a Custom action event ('Calculate now').


  • The Validating rule uses Check type to ensure that the Actions on passed rule are executed only in the context of a shipment.


The Actions on passed rule are configured as shown on the right:

  • Before the calculation of the Loading aids sum attributes for all existing attributes of this type are deleted by an event action of the Modify list / Clear type, so that after the recalculation no obsolete data for possibly no longer relevant Loading aids are contained in the header of the shipment (see, 'Important' above). The list is determined by an All attributes of one type.

  • Then the event action Sum loading aid (Shipment) is executed without restrictions for the Type, so that a total is calculated for each Loading aids type that is in use within the items of the shipment.

images/download/attachments/177912678/image-2024-9-23_8-52-37-version-1-modificationdate-1727074356369-api-v2.png

Runtime example:

The following example shows an input form for Shipments that contains the Loading aid summary per Verpackungstyp (configured here: EURO-Pallet and Box) in the header level of the shipment.

Below, Loading aid definition (Shipment header) can be added for the shipment header, each identifying exactly one loading aid via Type and Barcode.

In the Line item section, several line items with sub-items can be seen, for each of which the Quantity for the Loading aids Type predefined for each item level can be specified.

images/download/attachments/177912678/image2021-7-29_9-55-51-version-1-modificationdate-1726740580815-api-v2.png

In the screenshot, the Loading aid summary have already been calculated by clicking on the 'Totalize' Button.

After removing the subheadings (1.1 and 2.1) for the samples, the shipment is saved. The recalculation triggered by this results in the following image:

images/download/attachments/177912678/image2021-7-29_9-57-11-version-1-modificationdate-1726740580812-api-v2.png

NOTE

  • For the Loading aids type Box no value appears any more, because this loading aid type does not occur in any of the line items any more and because the event handling (see above) deletes all Loading aids sum attributes before calculation.

  • Without explicitly resetting (deleting) all Loading aids sum attributes in event handling, the value 2 would still appear in the Box field.