Get Xml Eulanda Tiered Prices
Last Modified: February 25, 2024 18:18 CEST

Get-XmlEulandaTieredPrices #

SYNOPSIS #

Retrieves the tier prices for an article from the EULANDA ERP software, either from the regular tier price table or by simulating them based on the article’s rebate group and a list of customer groups.

SYNTAX #

Get-XmlEulandaTieredPrices [[-barcode] <String>] [[-articleNo] <String>] [[-articleId] <Int32>]
 [[-articleUid] <Guid>] [[-customerGroups] <String>] [[-conn] <Object>] [[-udl] <String>] [[-connStr] <String>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION #

The Get-XmlEulandaTieredPrices function retrieves the tier prices for an article from the EULANDA ERP software by connecting to the SQL database and executing a SQL query. The article can be identified by its barcode, article number, article ID, or article UID. At least one of these parameters must be specified. The function supports three ways of specifying the database connection: a UDL file, a connection string, or a connection object.

The function can retrieve the tier prices from the regular tier price table or simulate them based on the article’s rebate group and a list of customer groups. If the customerGroups parameter is specified, the function simulates the tier price structure for the article based on the rebate group and a list of customer groups, and returns the simulated prices as an XML structure. If the customerGroups parameter is not specified, the function retrieves the tier prices from the regular tier price table and returns them as an XML structure.

EXAMPLES #

Example 1:Get simulated tier prices for customer groups #

PS C:\> Get-XmlEulandaTierPrice -articleNo '1100' -customerGroups 'HA,HB,HC' -udl 'C:\temp\Eulanda_1 JohnDoe.udl'
<PREISLISTE>
    <PREIS>
        <NAME>HA</NAME>
        <WAEHRUNG>EUR</WAEHRUNG>
        <BRUTTOFLG>0</BRUTTOFLG>
        <STAFFEL>1</STAFFEL>
        <MENGEAB>1.00</MENGEAB>
        <VK>297.5</VK>
    </PREIS>
    <PREIS>
        <NAME>HB</NAME>
        <WAEHRUNG>EUR</WAEHRUNG>
        <BRUTTOFLG>0</BRUTTOFLG>
        <STAFFEL>1</STAFFEL>
        <MENGEAB>1.00</MENGEAB>
        <VK>262.5</VK>
    </PREIS>
    <PREIS>
        <NAME>HC</NAME>
        <WAEHRUNG>EUR</WAEHRUNG>
        <BRUTTOFLG>0</BRUTTOFLG>
        <STAFFEL>1</STAFFEL>
        <MENGEAB>1.00</MENGEAB>
        <VK>227.5</VK>
    </PREIS>
</PREISLISTE>

Retrieves the tier prices for the article with article number ‘1100’, using the UDL file located at C:\temp\Eulanda_1 JohnDoe.udl. The function simulates the tier price structure based on the article’s rebate group and the customer groups ‘HA’, ‘HB’, and ‘HC’, and returns the simulated prices as an XML structure.

PARAMETERS #

-articleId #

The ArticleId is a unique key in the table. It is normally only used internally to link tables together.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-articleNo #

The ArticleNo is a unique alphanumeric field in the ERP system. If the value is set, then the article is searched for here and its Id is returned.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-articleUid #

A UID (Unique Identifier) is a unique identifier assigned to a specific record in a database. In the context of EULANDA ERP software, each article is assigned a UID to uniquely identify it, regardless of its name, number, or other properties. The UID is usually automatically generated by the database and has a fixed length and formatting to ensure its uniqueness. The articleUid parameter is used to specify the UID of the article to retrieve the record.

Type: Guid
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-barcode #

The barcode (= GTIN) is a field in the article table which is not defined as a unique field by default. However, if you want to achieve a reliable search, the field should be set to uniqueness in the database beforehand.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-conn #

The connection can be established via an existing ADO object of the type ‘ADODB.Connection’. If the connection is already open, it remains open even after the function has been executed. If it was closed, it will be closed again after the function has been executed.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-connStr #

A ConnectionString can be specified here, with which a database can be opened.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-customerGroups #

When specifying the customerGroups parameter, you can either provide a single customer group or multiple groups separated by commas. If the parameter is specified, the function generates a simulated tier price list based on the discounts of the group(s) provided.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-udl #

Alternatively to a connection, a string to a UDL file can be specified. In this case an ADO object is created and closed again at the end of the function.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters #

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS #

None #

OUTPUTS #

System.String #

NOTES #