Class VorgangExtensions
- Namespace
- BpNexT.NET.Extensions.Vorgang
- Assembly
- BpNexT.NET.dll
Provides extension methods for the IVorgang interface.
public static class VorgangExtensions
- Inheritance
-
objectVorgangExtensions
Methods
AddProtokollEintrag<T>(T, VorgangProtokollTyp, string, int?, string?)
Adds a protocol entry (VPtk) to the Vorgang.
public static void AddProtokollEintrag<T>(this T vorgang, VorgangProtokollTyp typ, string text, int? quellVorgangArt = null, string? quellBelegNr = null) where T : IVorgang, IHasNestedDataSets
Parameters
vorgangTThe Vorgang to add the protocol entry to.
typVorgangProtokollTypThe type of protocol entry.
textstringThe text for the protocol entry (max 100 characters).
quellVorgangArtint?Optional: The Vorgangsart that triggered this entry.
quellBelegNrstringOptional: The BelegNr that triggered this entry.
Type Parameters
TType that implements both IVorgang and IHasNestedDataSets.
BucheLagerplatzbewegungsvorschlag(IVorgang, bool)
Creates or removes warehouse location movement suggestions (requires chaotic warehouse management).
public static bool BucheLagerplatzbewegungsvorschlag(this IVorgang vorgang, bool erzeugen)
Parameters
vorgangIVorgangThe Vorgang to process.
erzeugenboolTrue to create suggestions, false to remove them.
Returns
- bool
True if successful, false otherwise.
Buchen(IVorgang)
Books the current Vorgang.
public static bool Buchen(this IVorgang vorgang)
Parameters
vorgangIVorgang
Returns
Exceptions
CalculateFracht(IVorgang)
Recalculates shipping costs based on current values (address, weight, etc.).
public static void CalculateFracht(this IVorgang vorgang)
Parameters
vorgangIVorgangThe Vorgang to recalculate.
CalculatePreis(IVorgang)
Recalculates prices from current values without fetching new defaults.
public static void CalculatePreis(this IVorgang vorgang)
Parameters
vorgangIVorgangThe Vorgang to recalculate.
CalculateRabatt(IVorgang)
Recalculates discounts and prices using minimum prices and discounts from microtech.
public static void CalculateRabatt(this IVorgang vorgang)
Parameters
vorgangIVorgangThe Vorgang to recalculate.
CalculateSteuer(IVorgang)
Recalculates taxes. Useful when the destination address differs from the original (e.g., non-EU).
public static void CalculateSteuer(this IVorgang vorgang)
Parameters
vorgangIVorgangThe Vorgang to recalculate.
CalculateWaehrung(IVorgang)
Converts the Vorgang to a different currency using exchange rates from the program.
public static void CalculateWaehrung(this IVorgang vorgang)
Parameters
vorgangIVorgangThe Vorgang to convert.
GetLayoutBuilder(IVorgang, string)
Gets a layout builder for the Vorgang.
public static LayoutBuilder GetLayoutBuilder(this IVorgang vorgang, string layoutName = "default")
Parameters
vorgangIVorganglayoutNamestringOptional layout name. Default will use the first available layout for the Vorgang.Art
Returns
Exceptions
GetLieferbarStatus(IVorgang)
Gets the delivery status of the Vorgang. Only returns a value if: the Vorgangsart belongs to "Bestellung vom Kunden", "Teillieferbarinfo-Felder bereitstellen" is active, and the Vorgang has no processed booking parameters.
public static LieferbarStatus GetLieferbarStatus(this IVorgang vorgang)
Parameters
vorgangIVorgangThe Vorgang to check.
Returns
- LieferbarStatus
The LieferbarStatus enum value.
GetPossibleStornoArten(IVorgang)
Gets possible Storno types for this Vorgang as numeric values.
public static int[] GetPossibleStornoArten(this IVorgang vorgang)
Parameters
vorgangIVorgangThe Vorgang to check.
Returns
- int[]
Array of possible Vorgangsart numbers for Storno.
GetPossibleStornoArtenStrings(IVorgang)
Gets possible Storno types for this Vorgang as readable names.
public static string[] GetPossibleStornoArtenStrings(this IVorgang vorgang)
Parameters
vorgangIVorgangThe Vorgang to check.
Returns
- string[]
Array of Vorgangsart names for Storno.
SetLieferAnschrift(IVorgang, IAnschriften)
Sets the Lieferanschrift for the Vorgang.
public static void SetLieferAnschrift(this IVorgang vorgang, IAnschriften ans)
Parameters
vorgangIVorgangansIAnschriften
SetLieferAnsprechpartner(IVorgang, IAnsprechpartner)
Sets the Liefer Ansprechpartner for the Vorgang.
public static void SetLieferAnsprechpartner(this IVorgang vorgang, IAnsprechpartner asp)
Parameters
vorgangIVorgangaspIAnsprechpartner
SetRechnungAnschrift(IVorgang, IAnschriften)
Sets the Rechnung Anschrift for the Vorgang.
public static void SetRechnungAnschrift(this IVorgang vorgang, IAnschriften ans)
Parameters
vorgangIVorgangansIAnschriften
SetRechnungAnsprechpartner(IVorgang, IAnsprechpartner)
Sets the Rechnung Ansprechpartner for the Vorgang.
public static void SetRechnungAnsprechpartner(this IVorgang vorgang, IAnsprechpartner asp)
Parameters
vorgangIVorgangaspIAnsprechpartner
Stornieren(IVorgang, bool, bool, int)
Storniert den aktuellen Vorgang.
public static bool Stornieren(this IVorgang vorgang, bool archiv, bool gutschrift, int gutschriftArt)
Parameters
vorgangIVorgangThe Vorgang to cancel.
archivboolMove the original record to archive after creating the credit note.
gutschriftboolCreate a credit note (Gutschrift).
gutschriftArtintVorgangsart for the credit note (from BEARBEITEN - PARAMETER - ARTEN).
Returns
- bool
True if successful, false otherwise.
Wandeln(IVorgang, int)
Creates a WandelnBuilder to convert this Vorgang to a different Vorgangsart.
public static WandelnBuilder Wandeln(this IVorgang vorgang, int targetVorgangArt)
Parameters
vorgangIVorgangThe source Vorgang to convert.
targetVorgangArtintThe target Vorgangsart number (from BEARBEITEN - PARAMETER - ARTEN).
Returns
- WandelnBuilder
A WandelnBuilder for fluent configuration.
Exceptions
- InvalidOperationException
Thrown when the Vorgang is not attached to a DataSet or has no BelegNr.