phronCare/Domain/Constants/SalesDocumentOriginTypeExtensions.cs

19 lines
741 B
C#
Raw Normal View History

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.")
};
}
}
}