* Extended CustomerOrdersController and CustomerOrderService

This commit is contained in:
2025-12-23 12:00:28 +01:00
parent c4b1561cbc
commit e9a3e91082
3 changed files with 15 additions and 0 deletions

View File

@@ -72,6 +72,13 @@ namespace SytelineSaAppEfDataModel.Services
.Where(x => x.CustNum == customerNumber && x.CustSeq == customerSequence && x.CustPo == poNumber)
.Select(x => mapper.Map<CustomerOrderDto>(x)).FirstOrDefaultAsync();
}
public async Task<CustomerOrderDto?> GetByPo(string poNumber)
{
return await context.CustomerOrders.Where(x => x.CustPo == poNumber && x.Stat == "O")
.OrderByDescending(x => x.CreateDate).Select(x => mapper.Map<CustomerOrderDto>(x))
.FirstOrDefaultAsync();
}
public async Task<IList<CustomerOrderDto>> GetListByCustomerAndPo(string customerNumber, int customerSequence,
string poNumber)