* Added VatCodeAssociation

This commit is contained in:
2025-08-22 07:01:13 +02:00
parent eb40cc35fe
commit 8c646d4bc7
8 changed files with 492 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
using AutoMapper;
using SytelineSaAppEfDataModel.Dtos;
namespace SytelineSaAppEfDataModel.Services;
public class VatCodeAssociationService(SytelineSaAppDbContext context, IMapper mapper) : IVatCodeAssociationService
{
public async Task<VatCodeAssociationDto?> GetVatCodesAssociation(string customerDoInvoice, string endUserType,
string productCode)
{
return await Task.FromResult(mapper.Map<VatCodeAssociationDto?>(context.VatCodeAssociations.FirstOrDefault(x =>
x.VATRegisterType == customerDoInvoice && x.EndUserType == endUserType && x.ProdCode == productCode)));
}
}