diff --git a/FaKrosnoApi/Controllers/ItemCustPriceAllController.cs b/FaKrosnoApi/Controllers/ItemCustPriceAllController.cs index deca1a9..1fbb591 100644 --- a/FaKrosnoApi/Controllers/ItemCustPriceAllController.cs +++ b/FaKrosnoApi/Controllers/ItemCustPriceAllController.cs @@ -10,9 +10,9 @@ namespace FaKrosnoApi.Controllers; public class ItemCustPriceAllController(IItemCustPriceAllService service, IMapper mapper) : Controller { [HttpGet("by-parameters")] - public async Task> GetItemCustPriceAll(string itemCode, string customerDoInvoice) + public async Task> GetItemCustPriceAll([FromQuery] string itemNumber, [FromQuery] string customerNumber) { - var result = await service.GetItemCustPriceAllAsync(itemCode, customerDoInvoice); + var result = await service.GetItemCustPriceAllAsync(itemNumber, customerNumber); if (result == null) { return NotFound(); diff --git a/SytelineSaAppEfDataModel/Services/IItemCustPriceAllService.cs b/SytelineSaAppEfDataModel/Services/IItemCustPriceAllService.cs index c52f43e..408acef 100644 --- a/SytelineSaAppEfDataModel/Services/IItemCustPriceAllService.cs +++ b/SytelineSaAppEfDataModel/Services/IItemCustPriceAllService.cs @@ -4,5 +4,5 @@ namespace SytelineSaAppEfDataModel.Services; public interface IItemCustPriceAllService { - Task GetItemCustPriceAllAsync(string item, string customerNumber); + Task GetItemCustPriceAllAsync(string itemNumber, string customerNumber); } \ No newline at end of file diff --git a/SytelineSaAppEfDataModel/Services/ItemCustPriceAllService.cs b/SytelineSaAppEfDataModel/Services/ItemCustPriceAllService.cs index c0b0969..a06b5ec 100644 --- a/SytelineSaAppEfDataModel/Services/ItemCustPriceAllService.cs +++ b/SytelineSaAppEfDataModel/Services/ItemCustPriceAllService.cs @@ -5,9 +5,9 @@ namespace SytelineSaAppEfDataModel.Services; public class ItemCustPriceAllService(SytelineSaAppDbContext context, IMapper mapper) : IItemCustPriceAllService { - public async Task GetItemCustPriceAllAsync(string item, string customerNumber) + public async Task GetItemCustPriceAllAsync(string itemNumber, string customerNumber) { return await Task.FromResult(mapper.Map(context.ItemCustPriceAlls - .OrderByDescending(x => x.EffectDate).FirstOrDefault(x => x.Item == item && x.CustNum == customerNumber))); + .OrderByDescending(x => x.EffectDate).FirstOrDefault(x => x.Item == itemNumber && x.CustNum == customerNumber))); } } \ No newline at end of file