pCon.basket - Plugin Development
    Preparing search index...

    Interface EaiwsSessionDefaults

    Default settings for eaiws sessions. Can be used to assign default settings to new sessions.

    interface EaiwsSessionDefaults {
        currency: string | undefined;
        dataLanguage: readonly string[];
        exchangeRates: ReadonlyMap<string, number>;
        partyInCharge: Readonly<AddressData> | undefined;
        projectValidity: string;
        referenceCurrency: string | undefined;
        taxRates: readonly DefaultTaxRate[];
        taxScheme: string | undefined;
        applyDefaults(
            pContext: EaiwsContext,
            pSettingsToApply?: DefaultSessionSetting[],
        ): Promise<void>;
        setCurrency(pCurrency: string | undefined): void;
        setExchangeRates(
            pReferenceCurrency: string | undefined,
            pExchangeRates: Map<string, number>,
        ): void;
        setPartyInCharge(
            pAddress: AddressData | undefined,
            pTransient?: boolean,
        ): void;
        setTaxScheme(
            pTaxScheme: string | undefined,
            pRates: DefaultTaxRate[] | undefined,
        ): void;
        storeDefaultsOnUserStorage(): Promise<void>;
    }
    Index
    currency: string | undefined

    default currency

    dataLanguage: readonly string[]

    default data language (identical to ApplicationSettings.dataLanguage )

    exchangeRates: ReadonlyMap<string, number>

    default currency exchange rates (map from currency code to exchange rate)

    partyInCharge: Readonly<AddressData> | undefined

    default party in charge

    projectValidity: string

    default project validity (identical to ApplicationSettings.projectValidity )

    referenceCurrency: string | undefined

    default reference currency for the exchange rates

    taxRates: readonly DefaultTaxRate[]

    default rates for the default taxScheme

    taxScheme: string | undefined

    default tax scheme id

    • Applies the current defaults to the given session. If pSettingsToApply is undefined, all settings will be applied otherwise only the settings part of the array.

      Parameters

      Returns Promise<void>

    • Sets new default currency.

      Parameters

      • pCurrency: string | undefined

      Returns void

    • Sets new default exchange rates (map from currency code to exchange rate).

      Parameters

      • pReferenceCurrency: string | undefined
      • pExchangeRates: Map<string, number>

      Returns void

    • Sets new default party in charge.

      Parameters

      • pAddress: AddressData | undefined
      • OptionalpTransient: boolean

        If true the address will not be stored permanently and will be reset on next application start. (default: false)

      Returns void

    • Sets new default tax scheme and default rates.

      Parameters

      Returns void

    • Stores the current defaults on the user settings storage if available.

      Returns Promise<void>