19 lines
741 B
C#
19 lines
741 B
C#
|
|
namespace Domain.Constants
|
||
|
|
{
|
||
|
|
public static class SalesDocumentOriginTypeExtensions
|
||
|
|
{
|
||
|
|
public static string ToStorageCode(this SalesDocumentOriginType originType)
|
||
|
|
{
|
||
|
|
return originType switch
|
||
|
|
{
|
||
|
|
SalesDocumentOriginType.Manual => "MANUAL",
|
||
|
|
SalesDocumentOriginType.QuoteDetail => "QUOTE",
|
||
|
|
SalesDocumentOriginType.Adjustment => "ADJUSTMENT",
|
||
|
|
SalesDocumentOriginType.Capita => "CAPITA",
|
||
|
|
SalesDocumentOriginType.DeliveryNote => "DELIVERY_NOTE",
|
||
|
|
_ => throw new ArgumentOutOfRangeException(nameof(originType), originType, "Tipo de origen de documento de venta no soportado.")
|
||
|
|
};
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|